Jump to content

RS232 on the Blade


Guest Tom G

Recommended Posts

This is of no use to most users, but it may be useful for some developers for debugging.

There is a 6 pad debug interface on the back of the blade.

The pin out for rs232 is below.

1=closest to SD slot.

1 2

3 4

5 6


Where

3 = TX 2.8V

5 = RX 2.8V

6 = GND
I will try to get some sort of connector working tomorrow and take some photos. The serial port is disabled in the kernel by default, so a kernel needs to be compiled to use it (or the kernel in my latest gingerbread rom has it enabled). More info to come... Edit. Updated pin out. Edit. Now with pics. ========================= This is my setup. There are many ways this could be done, this is only one example. What you will need Soldering iron. You want something with a fairly small tip. A little bit of solder Flux Wire. I used 30ag. You want something small and try to keep it short. Hot melt glue gun. This is optional, but these things are great for modding hardware. 3.3V RS232 adapter. I used the FT232R board below. They are available from sparkfun.com. There are many other solutions for this. If you want to do it really cheap a MAX232 should work. Do not hook the phone up directly to a PC RS232 port. PC ports us higher voltage and may seriously damage your phone. post-651053-1292765553_thumb.jpg The points to connect post-651053-1292765339_thumb.jpg post-651053-1292765321_thumb.jpg GND = Green RX = Blue TX = Red
PHONE  <-> RS232 adapter

GND	 -	  GND

RX	  -	  TX

TX	  -	  RX

Soldering

Use some flux on the area to be soldered.

Put a little solder on the points before trying to attach the wires.

post-651053-1292765597_thumb.jpg

When you solder the wires on have them running toward the sd card side of the phone. I initially soldered them facing towards the sim card and then found I couldnt easily put a card in.

I didn't get any decent photos of it soldered once complete, so here is one with GND connect to the worng point. DONT do it this way.

post-651053-1292765662_thumb.jpg

Once its all done use a bit of glue to hold the wires in place.

post-651053-1292765477_thumb.jpg

Edited by Tom G
Link to comment
Share on other sites

Guest El Nino9
Interesting - what are your plans for use with the serial port?

mainly debugging as mentioned :) lol but im sure this can/may/will lead to jtag of some sort to revive a dead phone

use my Arduino Mega 2560 with it and this application

originally used this for the G1

http://hackaday.com/2010/01/25/android-g1-serial-to-arduino/

wonder what the default baud rate is, 9600bps?

Link to comment
Share on other sites

Guest Sebastian404

I had noticed that . I assumed it was a jtag... odd that its rs232 tho... I thought Steve Jobs had killed that along with the Floppy and VGA years ago..

:0

Edited by Sebastian404
Link to comment
Share on other sites

Guest StevenHarperUK
I had noticed that . I assumed it was a jtag... odd that its rs232 tho... I thought Steve Jobs had killed that along with the Floppy and VGA years ago..

:0

Its not dead - I had to use Rs232 to flash a Humax PVR only 1 month ago

Link to comment
Share on other sites

Guest Sebastian404
Its not dead - I had to use Rs232 to flash a Humax PVR only 1 month ago

There was a certain amount of irony in my post, but yeah its not quite dead, however I've spoken to loads of engineers who are never happy about the lack of it in new laptops..

My company issued laptop is a macbook pro, but since I have to mess about with devices that have RS232 I also have a Dell Latitude that I'm suppose to drag around with me when I'm in 'the field'...

Tho the way my company works is you get a personal IT budget and you can do what you want with it, I could trade in my macbook and get a desktop, or visa versa, or trade it all in for a box of iphones... unfortunately I cant cash it in and buy a trip to Hawaii :)

Link to comment
Share on other sites

Guest StevenHarperUK
There was a certain amount of irony in my post, but yeah its not quite dead, however I've spoken to loads of engineers who are never happy about the lack of it in new laptops..

My company issued laptop is a macbook pro, but since I have to mess about with devices that have RS232 I also have a Dell Latitude that I'm suppose to drag around with me when I'm in 'the field'...

Tho the way my company works is you get a personal IT budget and you can do what you want with it, I could trade in my macbook and get a desktop, or visa versa, or trade it all in for a box of iphones... unfortunately I cant cash it in and buy a trip to Hawaii :)

Yeh, Work got me a Quadcore mac book pro with the shiny reflective screen. Any other laptop would have been better. However I needed OSX so I could do iPhone development - I do mostly boot into Ubuntu on it - just the touchpad is stupid sensitive.

I have a USB to serial converter to give me Rs232 when I need it.

Edited by StevenHarperUK
Link to comment
Share on other sites

Guest Sebastian404
I have a USB to serial converter to give me Rs232 when I need it.

I've been working with a bunch of Nokia Engineers of late, and they claim that those USB to Serial don't work with lots of the more exotic equipment out there.. specially in the telecoms world..

Link to comment
Share on other sites

Guest StevenHarperUK
I've been working with a bunch of Nokia Engineers of late, and they claim that those USB to Serial don't work with lots of the more exotic equipment out there.. specially in the telecoms world..

You are right, about 50% of the time the trusty old creaking laptop comes out :)

Link to comment
Share on other sites

I've been working with a bunch of Nokia Engineers of late, and they claim that those USB to Serial don't work with lots of the more exotic equipment out there.. specially in the telecoms world..

Agreed.

I work with lots of kit that defaults to RS232 and those USB to Serial just don't work which mean I have to lump a Dell D620 around with on board serial when I would much prefer to carry a netbook for for term sessions.

Link to comment
Share on other sites

I've updated the pin out. I don't know what 2 is, but it isn't GND (or atleast not the one we want). With 2 connected to GND on the rs232 the power led flashes red and it doesn't boot.

I couldn't find anything that would work reliably as a connector, so I soldered it. It wasn't as hard as I expected but I wouldn't recommend trying if you haven't done a bit of soldering before. Obviously soldering a port onto the back of the phone limits its portability, mine hasn't been out of the house since I got it so it won't be a problem for me, but it probably isn't an option for most people. I'll put up a bit of a guide later with photo.

Link to comment
Share on other sites

Agreed.

I work with lots of kit that defaults to RS232 and those USB to Serial just don't work which mean I have to lump a Dell D620 around with on board serial when I would much prefer to carry a netbook for for term sessions.

Maybe your using the wrong software or hardware. The FT232R usb-to-serial converters work well with most unix terminal emulators. I'm using an FT232R board from sparkfun.com with minicom.

Link to comment
Share on other sites

Guest eekcage

Hi all,

Guess I can come out of hiding after many hours browsing here.

2.8v seems odd for serial. I'd expect 3.3v TTL as obviously its not going to be true negative RS232 voltages. Are you probe/scoping it? I'd expect a strange voltage if using a multimeter and the blades churning out data.

How would I go about using the port? is it a hardware port that can be seen from a terminal app or mucking around in the blades shell type thingermagijjer (that i'm still learning)?, Thanks if anybody knows. I've got large electronics knowledge and would like to mess around with this area of phones, previously using bluetooth IC's scrounged from work on projects but prefer cables and wires to have fun.

How about this.. a 2 wheeled balancing robot using the phones accelerometers and compass (possibly removing the need for a gyro) ok It can be done over BT or TCP stack but again thats no fun. Ok i stop dribbling ideas on this keyboard and probe the pads this evening after some reading and voiding of the magic stickers. mmmm strike through

Oh Tom G is that FT232R a FTDI chip? I've been trying to get my hands on one for ages now. Does anyone know if the blades usb port can host?

Cheers

Link to comment
Share on other sites

Hi all,

Guess I can come out of hiding after many hours browsing here.

2.8v seems odd for serial. I'd expect 3.3v TTL as obviously its not going to be true negative RS232 voltages. Are you probe/scoping it? I'd expect a strange voltage if using a multimeter and the blades churning out data.

How would I go about using the port? is it a hardware port that can be seen from a terminal app or mucking around in the blades shell type thingermagijjer (that i'm still learning)?, Thanks if anybody knows. I've got large electronics knowledge and would like to mess around with this area of phones, previously using bluetooth IC's scrounged from work on projects but prefer cables and wires to have fun.

How about this.. a 2 wheeled balancing robot using the phones accelerometers and compass (possibly removing the need for a gyro) ok It can be done over BT or TCP stack but again thats no fun. Ok i stop dribbling ideas on this keyboard and probe the pads this evening after some reading and voiding of the magic stickers. mmmm strike through

Oh Tom G is that FT232R a FTDI chip? I've been trying to get my hands on one for ages now. Does anyone know if the blades usb port can host?

Cheers

It is an FTDI chip. The pulse and G1 also output 2.8V, but it works fine with a 3.3V TTL. The reading was from a multimeter, you should get a steady 2.8V even when its not sending.

My main plans for it is as a hardware console. You can use it as an interactive console or you can redirect kernel output to it with "console=ttyMSM2,115200n8" on the kernel command line. It should help with kernel dev as you can get a console without usb working plus it starts much earlier than adb.

I've been playing with it a bit more. The bootloader outputs data at 115200,8N1 but it looks like minicom is having trouble with it (i think because there are no new lines characters).

Fastboot mode also outputs at 115200,8n1

fastboot getvar version

version: 0.5

finished. total time: 0.000s
results in
fastboot: getvar:version

on the rs232.

I can't find a way to configure minicom to do what I want with the bootloader so I will try some other terminals.

Edited by Tom G
Link to comment
Share on other sites

Boot loader output :)

This is interesting. Check out the partition table.

^@^@welcome to lk


calling constructors

initializing heap

initializing threads

initializing dpc

initializing timers

creating bootstrap completion thread

top of bootstrap2()

initializing flash

nandcfg: 0 0 (initial)

nandcfg(Apps): a85408c0 4745e (used)

nandcfg(Modem): aa5400c0 4745e (used)

initializing platform

platform_init()

flash_read_image: success (0 errors)

[hp@lcd&fb]:lcd module init exit

!^@initializing target

target_init()

0: 0:MIBIB offs=0x00000000 size=0x0000000a attr: 0x00ffffff

1: 0:QCSBL offs=0x0000000a size=0x00000002 attr: 0x00ffffff

2: 0:OEMSBL1 offs=0x0000000c size=0x00000005 attr: 0x00ffffff

3: 0:OEMSBL2 offs=0x00000011 size=0x00000005 attr: 0x00ffffff

4: 0:AMSS offs=0x00000016 size=0x000000d4 attr: 0x00ffffff

5: 0:APPSBL offs=0x000000ea size=0x00000003 attr: 0x00ffffff

6: 0:FOTA offs=0x000000ed size=0x00000002 attr: 0x00ffffff

7: 0:EFS2 offs=0x000000ef size=0x00000060 attr: 0x00ffffff

8: 0:APPS offs=0x0000014f size=0x00000002 attr: 0x00ffffff

9: 0:FTL offs=0x00000151 size=0x00000005 attr: 0x00ff0101

10: 0:EFS2APPS offs=0x00000156 size=0xffffffff attr: 0x00ffffff

smem ptable found: ver: 3 len: 11

ptn 0 name='recovery' start=00000156 len=00000024 flags=00000000 type=Apps Writable=Yes

ptn 1 name='boot' start=0000017a len=00000024 flags=00000000 type=Apps Writable=Yes

ptn 2 name='splash' start=0000019e len=0000000c flags=00000000 type=Apps Writable=Yes

ptn 3 name='misc' start=000001aa len=00000003 flags=00000000 type=Apps Writable=Yes

ptn 4 name='cache' start=000001ad len=0000014a flags=00000000 type=Apps Writable=Yes

ptn 5 name='system' start=000002f7 len=0000067c flags=00000000 type=Apps Writable=Yes

ptn 6 name='userdata' start=00000973 len=00000681 flags=00000000 type=Apps Writable=Yes

ptn 7 name='persist' start=00000ff4 len=0000000c flags=00000000 type=Apps Writable=Yes

ptn 8 name='MIBIB' start=00000000 len=0000000a flags=00000000 type=Modem Writable=Yes

ptn 9 name='QCSBL' start=0000000a len=00000002 flags=00000000 type=Modem Writable=Yes

ptn 10 name='OEMSBL1' start=0000000c len=00000005 flags=00000000 type=Modem Writable=Yes

ptn 11 name='OEMSBL2' start=00000011 len=00000005 flags=00000000 type=Modem Writable=Yes

ptn 12 name='AMSS' start=00000016 len=000000d4 flags=00000000 type=Modem Writable=Yes

ptn 13 name='APPSBL' start=000000ea len=00000003 flags=00000000 type=Modem Writable=Yes

ptn 14 name='FOTA' start=000000ed len=00000002 flags=00000000 type=Modem Writable=Yes

ptn 15 name='EFS2' start=000000ef len=00000060 flags=00000000 type=Modem Writable=Yes

ptn 16 name='APPS' start=0000014f len=00000002 flags=00000000 type=Modem Writable=Yes

ptn 17 name='FTL' start=00000151 len=00000005 flags=00000000 type=Modem Writable=Yes

ptn 18 name='EFS2APPS' start=00000156 len=ffffffff flags=00000000 type=Modem Writable=Yes

calling apps_init()

[ZYF.BOOT] FTM NV = 2

jiangfeng: g_boot_key_exit_ftm = 0, first time

flash_read_image: success (0 errors)

flash_read_image: success (0 errors)

flash_read_image: success (0 errors)


kernel  @ 2a08000 (3479148 bytes)

ramdisk @ 3a00000 (232612 bytes)

cmdline = 'no_console_suspend=1 console=ttyMSM2,115200n8 androidboot.hardware=blade'


Booting Linux

booting linux @ 0x2a08000, ramdisk @ 0x3a00000 (232612)

cmdline: no_console_suspend=1 console=ttyMSM2,115200n8 androidboot.hardware=blade

Link to comment
Share on other sites

Guest eekcage

Fantastic baud rate info, Thankyou

I'll fish out the logic probes sometime this week. The probe Xapplication has a nice array of conversions and scripting opportunity and one TX line that'll become useful in the future. I wont try using a serial port yet as all my non-dead max232's are SMD. Keep up the great work!

___

Posted before i see your last. I'm not so hot on what i'm looking at yet but is it

10: 0:EFS2APPS offs=0x00000156 size=0xffffffff attr: 0x00ffffff

the odd one out :) ?

Edited by eekcage
Link to comment
Share on other sites

Guest BigBearMDC

What's that?

...
ptn 18 name='EFS2APPS' start=00000156 len=ffffffff flags=00000000 type=Modem Writable=Yes
...[/code]

The length seems strange?

[Hell I want to get developing again. Damn school is just too time consuming :) ]

Link to comment
Share on other sites

What's that?

...

ptn 18 name='EFS2APPS' start=00000156 len=ffffffff flags=00000000 type=Modem Writable=Yes

...

The length seems strange?

[Hell I want to get developing again. Damn school is just too time consuming :) ]

I noticed that one and it does look strange.

Just FYI. I tried booting an unmodifed codeaurora 2.6.35 kernel and it reboots after the "cmdline:" statement so it doesn't like that at all. On the pulse unmodified codeaurora code will boot (for 2.6.32, I never tried 2.6.35).

Link to comment
Share on other sites

Guest spiralbrain

Brilliant Info! RS232 is always handy, And yes FT232R is rock solid, the only chip close enough is the one from Prolific that never works. I wonder if its possible to make an android serial terminal app.

Link to comment
Share on other sites

Boot loader output :)

This is interesting. Check out the partition table.

Is there any way to dump partitions such as SBL etc, just curious, tried dd but they don't show up in /dev/block/mtdblock etc

Link to comment
Share on other sites

Is there any way to dump partitions such as SBL etc, just curious, tried dd but they don't show up in /dev/block/mtdblock etc

I have an idea how to do it, but I'm not sure it'll work. It will need a modified kernel, but I'm not sure the modem partitions will be visable.

Edit. I did a dump of the whole nand, but as I expect there is nothing until 0x2ac0000 (the start of recovery). I had the same problem with the pulse. The start of the nand where SBL etc should be is not readable, it all dumps as FF up until the start of the normal partitions.

Edited by Tom G
Link to comment
Share on other sites

I have an idea how to do it, but I'm not sure it'll work. It will need a modified kernel, but I'm not sure the modem partitions will be visable.

Edit. I did a dump of the whole nand, but as I expect there is nothing until 0x2ac0000 (the start of recovery). I had the same problem with the pulse. The start of the nand where SBL etc should be is not readable, it all dumps as FF up until the start of the normal partitions.

I guess they are locked somehow? Assume they can be dumped over the serial cable using something like QPST etc?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.