Dienstag, 13. Juli 2010

Access the serial port of your LG GW620

first real post!

i am currently working on porting android 2.2 / linux kernel 2.6.32 to my new phone, the GW620 ( also known as EVE or KH5200).

when you are developing on this kind of embedded hardware, it is very useful to have some sort of feedback from the device as early as possible (e.g right from the bootloader) . normally this is done through a JTAG or serial port. almost every embedded device has those ports. key is to find those :)

since i don't own a jtag-debugger, i went for the serial console.
if we look at the device closely, we find 5 little pads under the sim-card slot. looks a lot like some sort of debugging-/test-pads.
the chance of 2 of these pads being a serial port is fairly high. you could now go ahead and test all of those pads and look for common voltages used for serial communication. tedious.
but luckily we have the service manual from LG.
so we study that pdf. and we find...



... and we found our serial pins!


now we need to connect those 2 pins to our development box. if you have a 3.3volts serial adapter, fine. i don't.
but i own an arduino microcontroller board. if you remove the uC you get a simple serial-to-usb converter. sweet!

now go on to connecting the cables. i am no fan of soldering on my precious phone.. but since the pads are under the sim card slot, i used a very simple and non-intrusive method.
i took a piece of transparent plastic, cut it to the shape (well almost) of a simcard, and used a hot needle to cut 2 holes in it at the right positions. stick your rx/tx cables through that and insert your new "debugcard". very hacky, but it works.

now you can use a terminal program to connect to your phone. the serial console works at 115200 baud. i use the arduino serial-monitor.

if you boot your phone you should see something like this:

[KEY] is_qwerty_keypad_pressed()
ptn 0 name='usd' start=285 len=4
ptn 1 name='pkg' start=289 len=44
ptn 2 name='boot' start=400 len=55
ptn 3 name='system' start=455 len=1600
ptn 4 name='userdata' start=2589 len=1506
ptn 5 name='lgdrm' start=2055 len=22
ptn 6 name='cache' start=2077 len=512
nandcfg: aa5400c0 0004745e (initial)
nandcfg: e85408c0 0004745e (used)
nandid: 5510bcad maker ad device bc
LGE: changed to CFG0 = e85408c0, CFG1 = 0004745e
block 160 is bad
block 1120 is bad
[BATT] Battery is charging? 0
[BATT] Smart Battery Percentage : 0%
[BATT] valid = 0. Charging = 0
[BATT] Level = 0%. Volt = 0mV. Temp = -37C
[BATT] Battery is not charging!!
[IMG] Displaying image #16
[BATT] No Charging!! or Battery is Dummy!!
[KEY] is_qwerty_keypad_pressed()
[KEY] is_key_pressed() ret : 0x00000000
[BATT] Power_on_Status : 0x00000020
[BATT]


bingo!

that's it for now. if you are not that familiar with the internals of this particular phone, go check out my next post where i will shed some light on the inner workings of that device.

i hope this is helpful ;-)

maldn

update: a picture of my test-setup

2 Kommentare:

  1. Thank you for your job on GW620.

    I'm using GW620 in Korea. In korea, mobile banking and stock trade and all other domestic applications are based on Android 2.1 :-( but LG naver upgrade it.

    So you and XDA developers are our last hope to get higher version.

    Ich Libe Dich!

    AntwortenLöschen
  2. Looking forward for your next post ;)

    AntwortenLöschen