Chinese InfoTM X220 based tablet.

So, I finally got that one. Took 22 days for it to get here.
I remember the bunch of bugs SmartQ7 came along with, so I got myself morally prepared for several days of making different things work.
Surprisingly – that wasn’t really needed.

The touchscreen is resistive, but quite usable, nevertheless. No noticeable jitter, as smq7 had, and I don’t miss the on-screen-keyboard keys.
GPS is also around and works fine. On a 10′ screen it’s just awesome. The exteral antenna that came along with it is quite useful, if you want to use that in the car.
SD and HD videos play fine, with builtin CCPlayer.This thing with a drugged pacman in headphones as an icon comes only in chinese, but does the job pretty well – luckily not much to translate there.
3D games work, and run quite fast, even though a resolution of 1024×600 is a bit too much for a 256m memory the device has.
Accelerometer is also around, and even works as expected. aTilt3D works fine.
Camera – just a plain webcam, not much to say about that. Works. That’s all. You don’t expect a 5 megapixel thing in there, are you?
Microphone could be a bit more sensitive, but also bearable.
The loudsoeakers a a bit too quiet, although there might be a software fix to that problem.
USB made me more than glad. Both ports really work as 2.0, read and write really fast and supply enough current to spin an external HDD. Well, two of them, actually in my test copying an ubuntu iso from one to another. USB flash drives and HDDs mount automatically, if the FS is fat. All other filesystems are just ignored.
And now the bad stuff.
wowHome. A shitty app, that replaces standart homescreen. Slow as hell and buggy. Eve if u select Launcher Pro as the default homescreen it will still pop out. Looks like it uses 2d to render 3d effects. It uses about 40 megs ram and is… just crap.
Live wallpapersJust don’t work as expected i they use 3d. Not a big loss anyway.
Skype fails on outgoing and ingoing calls.

And now let’s make the device work faster.
First we’ll need Universal AndRoot to root the device and move/rename wowHome.apk. that turns off that crap and boosts device performance. LauncherPro works flawlessly.
Btw, that also turned on a nice wallpaper of some 3d-art girl. Developers dream?

The resulting system is now just about as fast as on my Motorola milestone.
The only thing remaining is to install a bunch of apps and you’re done.

Watching a 40-minute episode of Frnge from external HDD drained the battery from 100 to 60% using max backlight. So I guess it’s ok.
Wifi reception is good, signal is stable. Even a little better then of my Motorola Milestone.
Looks like they didn’t manage to do the power management part properly – so there’s a switch on the side. Leave it on – and it will drain battery a bit faster.
Ethernet works fine, no problems with that.

the other bad parts are a beeping on the max backlight screen and crappy loudspeakers. The amp inside really need some more caps on Vcc pin.

Linux on Mediatek MT6235 Phones.

It’s started. Just give loads of thanks to osmocom-baseband guys who made the initial efforts.
Anyway, the whole stuff is working. Even on my old E1000 phone.
The instructions are pretty much straightforward. Take your phone

Hook it to youe favourite uart to usb chip (mine is ftdi)

And fire up osmocon and osmoload as described here: http://bb.osmocom.org/trac/wiki/SciphoneDreamG2

While now uboot has somewhat working support for nand, ram, mmc
Uncommenting PLL initialisation code makes my device hang in process, so we’re at somewhat really slow.
But nevertheless, here we go


/ # uname -a
Linux (none) 2.6.36-next-20101029+ #72 PREEMPT Wed Nov 17 14:10:39 CET 2010 armv5tejl GNU/Linux
/ # cat /proc/cpuinfo
Processor : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 104.24
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5

Hardware : E1000 Rachel
Revision : 0000
Serial : 0000000000000000
/ #

I copied all the sciphone’s code and tagged it e1000_rachel, since all the chineese device differ a little.
Now it’s time to fix some uart bugs, write more code… Hell, I didn’t even think that was possible.
With a 2d accelerator, wifi, bluetooth, full keyboard and TV this thing ca be a hell of thing to control.. say a mikrokopter with analog camera in there?
Possibilities are endless, hardware is dirt cheap.

First take on a DC motor controller.

Well, that was a hacky weekend. I teamed up with Inky and we went on hacking a small plotter with a multi-axis controller. Apart from finding out what design we could throw up with the parts I had around and salvaging a bunch of stuff from dead pc parts we managed to finish the design of the controller board.
There it is, the little beauty:


I managed to miss a few bugs, so I had to resort to several wires, and instead of up to seven dc motors this can control only 6.
Too bad we just didn’t manage to finish it all in time. I will still have to write the code, Inky will still have to deal with some mechanics.

ChinaPhone + MakeProgress = USB Bus Voltmeter

It’s been some time already, that I’ve been working on my  ‘Remote Debug Rig’. The whole setup involves a Chinese mobile phone, I use a gsm module, a couple of avrs and other stuff. The whole setup is yet to be described once finished, but one thing I can show off now.

Since I use a lot of usb devices in a powered 10-port hub, power is an issue. The hub is externally powered, but still the power drops significantly if I fire up just everything. Since a cool power supply is yet to be done ( I still need to eth a couple of boards for it), I needed live monitoring right now.  

Using AT+EADC=1 AT command to the Mediatek-based mobile I managed to get the ADC values from the cell phone, that tell the battery voltage and the charger/usb voltage.
Then a little magic and…

Here goes the pic:

I hooked that to the makeprogress plasmoid. That one had to be hacked a bit, since it displays the value in percents, but that was an easy task and I sent the feature request to Nikita. Hopefully he adds that to his plasmoid.

Voila: USB bus Voltage on my desktop. The script as well tells the mobile to enter the keyboard test mode, so that I can grab the keypresses and use it as a remote control. The same I demonstrated in my earlier post, but this one, but rewritten fully in bash. The very serial port I use is actually a bluetooth one, so the internal uart is free to work with the AVR that manages the rest of the power control circuitry and the remote control becomes kind of wireless.

I still need to make a better cradle for that thing though, ad attach it to avr, but this yet to come.

BTW: It looks like I can track the touch screen presses via the TST-PS setting of internal UART. Wonder how that can be of use…

The software. Completely in bash, completely useless to windoze junkies. Alter the BT MAC and SPP channel, add some more code, andhere you go. Quite dirty in parts, but works.

at_daemon.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
 
if [ -e /tmp/at_fifo ]; then
echo "Already ready."
cat /dev/rfcomm0 >> /tmp/at_fifo&
else
mkfifo /tmp/at_fifo
chmod 777 /tmp/at_fifo
echo "Configuring interface"
rfcomm bind rfcomm0 34:71:B9:53:66:01 10 
stty -F /dev/rfcomm0 115200 
echo "AT interface ready"
fi
 
#enable ADC & EKPD by default
 
./at_files/init.sh&
 
while true; do cat /tmp/at_fifo|while read line; do
#echo $line
CMD=`echo $line|cut -d" " -f1`
DATA=`echo $line|cut -d" " -f2| sed 's/.$//'`
case "$CMD" in
  "+EADC:")
  VBAT=`echo $DATA|cut -d"," -f1`
  VUSB=`echo $DATA|cut -d"," -f5`
  echo '{"minimum":0,"maximum":4.5,"value":'$VBAT'}' > /tmp/vbat
  echo '{"minimum":0,"maximum":6,"value":'$VUSB'}' > /tmp/vusb
  echo "VBAT=$VBAT; VUSB=$VUSB"
   ;;
  "+EKPDS:")
  KEYEVENT=`echo $DATA|cut -d"," -f1`
  KEYCODE=`echo $DATA|cut -d"," -f2`
  if [ $KEYEVENT -eq "1" ]; then
    echo $KEYCODE
    ./keymaps/e71.map $KEYCODE
    fi
  ;;
  "SEND")
  ATCMD=`echo $line|cut -d" " -f2`
  echo "$ATCMD" > /dev/rfcomm0
  echo "Sending CMD: $ATCMD"
  ;;
  "ERROR")
  echo "Bad stuff =("
  ;;
  "OK")
  echo "All fine"
  ;;
  *)
  echo $line
  ;;
 esac
done
done

init.sh
Use the AT() method found here for your custom stuff

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
AT()
{
echo "SEND AT$1" > /tmp/at_fifo
}
sleep 5
#Since there's a bug/feature - a double command of the same thing just increases the poll frequency
AT "+EKPD=0"
AT "+EADC=0"
AT "+EKPD=1"
AT "+EADC=1"

e71.map
A small and limited example of key mapping script. Yet to be remade into a better looking map using a more neat solution.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash -x
echo $1
 
case "$1" in
14)
  xdotool key Up
;;
15)
  xdotool key Down
;;
16)
  xdotool key Left
;;
17)
  xdotool key Right
;;

madwimax & ap mode

Well, it took me a while to figure out what was wrong and why the heck my atheros laptop wifi won’t go to AP mode.
Looks like the ath5k driver that is in stock ubuntu 10.04 cannot do any AP mode, so you’ll have to grab ath_pci one. However, the snapshots didn’t work at all and I had to compile the svn version.
It looks like regular modbrobe -r ath5k && modprobe ath_pci DOESN’T work: Youll get 0 scan results/devices won;t see the ap created. You have to either blacklist ath5k, OR
modprobe -r ath5k
suspend the laptop
resume the laptop
modprobe ath_pci

Windows fans can do a reboot.
Well, nevertheless, I got it working and finally share a small script that does all the mode-switching between client mode and ap mode.

#!/bin/bash
WW=$1
if [ $WW == "ap" ]; then
ifconfig ath0 down
wlanconfig ath0 destroy
killall knetworkmanager
/etc/init.d/network-manager stop
wlanconfig ath0 create wlandev wifi0 wlanmode ap
#wlanconfig ath0 destroy
#wlanconfig ath0 create wlandev wifi0 wlanmode ap
#wlanconfig ath1 create wlandev wifi0 wlanmode sta nosbeacon
hostapd -B /etc/hostapd/anomalia.conf&
sleep 1
ifconfig ath0 192.168.0.1
/etc/init.d/dhcp3-server start
exit 0
fi
if [ "$WW" == "sta" ]; then
killall hostapd
ifconfig ath0 down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode sta nosbeacon
sleep 1
/etc/init.d/network-manager start
su necromant -c knetworkmanager&
/etc/init.d/dhcp3-server stop
sleep 1
exit 0
fi

./ap.sh ap kills the network-manager & knetworkmanager
(Gnome users need to kill nm-applet)
./ap.sh sta brings back the sta mode.
Quite quick and dirty – but it does the job

Q&D air conditioner (2.5 hrs to make one!)

It’s damn hot in Russia now. no… Well, it’s HOT AS HELL HERE.
This weekend sitting in my country house with no air conditioner there, I got finally just a bit too sick of it. Besides the heat the smoke from those damned fires is always around. (see photos under the cut)
Freaking smoke!

Anyways, I got tired of my brain throttling 4 out 5 clock cycles due to overheat, I decided it’s time for some hacking =). So I loaded some water into the fridge and while it was slowly turning to ice…


The setup is simple. I got two buckets. The smaller one I used as the water tank. I later added ice to the water. the bigger – as the main chamber. The pump (some old junk I found lying around) pumps the water up, and inside the big bucket it is sprinkled into small particles. I cooler fan I ripped of an old PC power supply pushes the air through this watery chamber. The resulting air is cool, and the smell of smoke&ash is finally gone. It took this baby about 10 minutes to clean the air in my room so that my brain began to function normally. Besides it cooled the air from 34 (Celsius) to about 30, till I ran out of ice.
I guess, that if this heat goes on I will have to make something more powerful. It’s far better, than sitting in the basement all day… And more fun than buying a ready to use solution.
Here goes the video of the rig.

P.S. This is not the worst case of smoke you might see here. Back in the city it is a real ‘gasenvagen’ and even a real air conditioner doesn’t help.

Where’s my Base Station, Dude?

I was really frustrated by the wimax signal quality, so I was off making a good wimax antennae. A ended up using a biquad antennae, tuned for WiMax, but… I was a bit too lazy to position the antennae myself. So I took an ATTiny2313, ULN2003A and a stepper motor I salvaged from an old flatbed scanner.
The result is best viewed in the video after the break.
Continue reading “Where’s my Base Station, Dude?”