Jump to content

Using rs232 on the Pulse


Guest Tom G

Recommended Posts

We have always known that the Pulse could support an rs232 port as it is part of the MSM7201A SoC platform. It was possible that the rs232 port on the MSM7201a was not connected to anything, but unlikely since manufacturors usually want ports like this for debugging. The port can be seen as /dev/ttyMSM2 in the OS.

There are many uses for an RS232 port, but I am most interested in it for debugging. The master console can be directed to the RS232 port using the console kernel parameter. This will hopefully make it easier to debug kernel problems.

Under the SIM card there is an 11 contact interface. Three of the contact are for the RS232 port.

post-651053-1284727404_thumb.jpg

What you will need.

  • A 3V RS232 adapter. Most PC RS232 ports are 5V, do not hook that up directly to the phone. The are many options here, I used one of these, but there are many other choices. The FTDI USB solutions appear to be well supported, but a MAX232 based serial converter would also work and should be a bit cheaper.
  • Some wire. You want fairly small single core wire. I used 30awg because I have a spool of it, but a bit bigger would be fine.
  • Soldering iron.
  • Flux.
  • An RS232 console application. I'm using minicom on linux, but there are heaps of alternatives on all platforms. I think PuTTY does RS232, so if your on windows take a look at that.

What to do.

Pin-out

=======


1  2  3  4  5  6

  7  8  9  10 11


   4=TX

  10=RX

  11=GND


Connections

===========


Phone --- PC adapter

  GND --- GND

  RX  ---  TX

  TX  ---  RX
post-651053-1284727448_thumb.jpg Red = TX Green = RX Blue = GND Cut some wires. The shorter the better. The longer the wires the greater the chance of interference. Connect TX on the phone to RX on the RS232 adapter. Connect RX on the phone to TX on the adapter. Connect GND to GND. It will work without GND connected, but you will probably get more noise. I recommend soldering, but you could try tape or hot glue if you don't want to solder on the board. Unfortunitely this isn't very good if you actually use your phone. I needed to use a bit of flux to get the solder to stick on the board. post-651053-1284727696_thumb.jpgpost-651053-1284727711_thumb.jpg post-651053-1284727730_thumb.jpg All done. Now connect it to your PC. Configuring the PC First, figure out what your comm port is called and if needed install drivers. The FT232R doesn't need any drivers in linux (as long as right driver is in the kernel) and appears as /dev/ttyUSB0. Now start your console software. You will need to configure the port. The setting you want are 9600 8N1, no hardware or software flow control. Testing Connect with the console software On the phone run
echo Hello > /dev/ttyMSM2
You should see 'Hello' appear in the console on the PC. Next, on the phone run
cat /dev/ttyMSM2

Now enter 'Hello' in the console on the PC and press enter. You should see 'Hello' displayed in the phones shell.

If that all worked you now have a working RS232 port.

Link to comment
Share on other sites

Guest SpankyHam

Now that is dedication to the cause!

How difficult (if even possible) do you think it would be to create a board that would lay on top of the points to make a contact? Even though I don't use my Pulse as a phone, I couldn't trust myself not to pull the wires off, and constant re-soldering surely can't be good for the phone.

Link to comment
Share on other sites

Im very confused about this thread.

What does this accomplish by doing all that stuff you done in the pictures?

Not being rude or anything :lol:

Edited by TGWS
Link to comment
Share on other sites

Guest david_dawkins
Im very confused about this thread.

What does this accomplish by doing all that stuff you done in the pictures?

Not being rude or anything :lol:

He states why in the very first paragraph.

Link to comment
Share on other sites

Now that is dedication to the cause!

How difficult (if even possible) do you think it would be to create a board that would lay on top of the points to make a contact? Even though I don't use my Pulse as a phone, I couldn't trust myself not to pull the wires off, and constant re-soldering surely can't be good for the phone.

Just hot glue the wires to the back of the phone so the glue gets pulled instead of the solder. Thats usually what I do modding other things.

The kernel cmdline in the official roms has console set to ttyMSM2,115200n8. That isn't working for me, I don't know if it because of the 3V adapter or if the phone/kernel simply doesn't support it. ttyMSM2,9600n8 is working fine.

Im very confused about this thread.

What does this accomplish by doing all that stuff you done in the pictures?

Not being rude or anything :lol:

Its useless to most people.

You can direct the linux console to the RS232 port. It is a low-level hardware interface, so it will always work. One of the problems with kernel development has been seeing what is happening. This should help. For adb to work a lot of other things need to be working.

You can also do all sort of other stuff with RS232, but most of it really isn't useful on a phone.

I think the console will always have root access, so this may be a way for people with busted usb ports to root their phone, but that will only work if the 115200n8 setting in the official roms will work.

On HTC phones it is also possible to use RS232 in fastboot to access things otherwise not accessible (radio firmware etc I think). I haven't got anything to work with fastboot on the pulse yet.

Edited by Tom G
Link to comment
Share on other sites

Thanks for the information! I have exactly 3V USB->RS232 adapter (old siemens M55 datacable) and busted usb port! Will try to root my phone in this way.

Edited by R_A_V
Link to comment
Share on other sites

Thanks for the information! I have exactly 3V USB->RS232 adapter (old siemens M55 datacable) and busted usb port! Will try to root my phone in this way.

I'm actually now fairly sure it won't work, i'll try it and let you know.

Link to comment
Share on other sites

Now that is dedication to the cause!

How difficult (if even possible) do you think it would be to create a board that would lay on top of the points to make a contact? Even though I don't use my Pulse as a phone, I couldn't trust myself not to pull the wires off, and constant re-soldering surely can't be good for the phone.

I was just thinking about that. A small board the size of a SIM card with spring loaded contacts that hit the right spots to make the RS232 connection. Flat ribbon cable coming off the board which you can then connect to the 3V adapter. That'll allow you to easily remove it from the phone when you don't need to debug. I'm pretty sure this is the same sort of thing the engineers use.

Link to comment
Share on other sites

I'm actually now fairly sure it won't work, i'll try it and let you know.

Tested on a boot image that should be locked down and it works :lol:

$ adb devices

List of devices attached 

????????????	offline
Welcome to minicom 2.4


OPTIONS: I18n 

Compiled on Mar  2 2010, 11:06:07.

Port /dev/ttyUSB0


Press CTRL-A Z for help on special keys													 



# id

uid=0(root) gid=0(root)

#

Now the problem is that the huawei boot parameters run the port at 115200 which won't work for me. Hopefully that is just a problem with my converter.

From there, get a copy of flash_image (it looks like it isn't included in the official roms) and put that and a custom recovery image on sdcard. The use flash_image to flash the recovery.

Link to comment
Share on other sites

I was just thinking about that. A small board the size of a SIM card with spring loaded contacts that hit the right spots to make the RS232 connection. Flat ribbon cable coming off the board which you can then connect to the 3V adapter. That'll allow you to easily remove it from the phone when you don't need to debug. I'm pretty sure this is the same sort of thing the engineers use.

Take a look at this.

Link to comment
Share on other sites

Now the problem is that the huawei boot parameters run the port at 115200 which won't work for me. Hopefully that is just a problem with my converter.

It looks like the port always runs at 9600? I have been trying it with the original huawei 115200 setting and it still runs at 9600 (which I guess is why it wouldn't work when I had the PC end set at 115200).

Link to comment
Share on other sites

Guest BigBearMDC

That are really good news :lol:

I thought of that earlier, but I just haven't got a clue where this port is. One thing that would be really handy is to connect those wires to the headphone jack. Put a little DIP switch in the phone (if that's even necessary), cut out an edge somewhere to access them and just solder the headset's wires to a RS232>USB converter. This way you could access it without pulling out the SIM card or removing the battery. I don't know though if it would be possible to do this without the DIP switch. I think it should be no problem, but then you'd still have to open up the Pulse and find a way to solder the wires to the headphone jack, which could be difficult as it might be a BGA mounted one meaning you can't access the pins. I opened up my Pulse a while ago but I cant remember how to jack was soldered onto the PCB.

Best regards,

BB

Edit: Oh and if you get a notification the console output would get messed up of course, but you could mute it anyway once its booted up :)

Link to comment
Share on other sites

Guest BigBearMDC
It looks like the port always runs at 9600? I have been trying it with the original huawei 115200 setting and it still runs at 9600 (which I guess is why it wouldn't work when I had the PC end set at 115200).

I think the FT232 works with every baudrate. I already used it in one of my projects in school, and I could even run it with 1 MBaud, which shouldn't be possible assuming I sent data from a PIC with 9600 baud :lol: Less baud also worked if I remember that correct. Just for reference, I was using an FT232RL from FTDI which is a really good choice imo.

Link to comment
Share on other sites

Guest DanWilson
So why didn't you tell me??

:(

We were toying with you.

We all knew all along.

We all laughed at you.

We are now all sorry.

:lol:

I still don't get what this is for, but I'm sure it will help us in some way.

:)

Link to comment
Share on other sites

I think the FT232 works with every baudrate. I already used it in one of my projects in school, and I could even run it with 1 MBaud, which shouldn't be possible assuming I sent data from a PIC with 9600 baud :lol: Less baud also worked if I remember that correct. Just for reference, I was using an FT232RL from FTDI which is a really good choice imo.

Yeah, the FT232 is working fine, it is the phone that is stuck at 9600. When I started playing with it I was matching the FT232 baud rate to the setting on the kernel cmdline and only getting garbage unless I ran them at 9600. It looks like no matter what I set the kernel to it always runs at 9600, so the default setting of ttyMSM2,115200n8 is actually 9600n8.

The headphone thing is a good idea, but would need a bit more work. It should be possible to get the sim card in with my setup, but the battery is going to be difficult, and having the FT232 board hanging off it isn't good if you want to use it as a phone.

Link to comment
Share on other sites

Guest BigBearMDC
Yeah, the FT232 is working fine, it is the phone that is stuck at 9600. When I started playing with it I was matching the FT232 baud rate to the setting on the kernel cmdline and only getting garbage unless I ran them at 9600. It looks like no matter what I set the kernel to it always runs at 9600, so the default setting of ttyMSM2,115200n8 is actually 9600n8.

The headphone thing is a good idea, but would need a bit more work. It should be possible to get the sim card in with my setup, but the battery is going to be difficult, and having the FT232 board hanging off it isn't good if you want to use it as a phone.

I think I'll be able to try it with the headphone jack the next Thursday, but I won't connect GND (the risk for me to connect it to another pin than the GND one is just too big :lol: ). I also think that it shouldn't be necessary to connect GND if the voltages are that big. I might be wrong though. The biggest problem is that you have to find a way to get the cables around the PCB. There isn't really much space left ... I'd say 1mm² is already too big to get it around the PCB (and that's the smallest I have at home :) ).

Best regards,

BB

Link to comment
Share on other sites

flibblesan

Thank you for flash_image.zip. You are so kind :lol:

Tom G

May I ask 2 stupid questions :) ?

1. Is it necessary to connect a battery or pulse can take a power from RS232 somehow?

2. My USB->RS232 converter actually gives 3.3V on RX and 2.6V on TX. Is it suitable?

Link to comment
Share on other sites

1. Is it necessary to connect a battery or pulse can take a power from RS232 somehow?

2. My USB->RS232 converter actually gives 3.3V on RX and 2.6V on TX. Is it suitable?

1. You could wire the battery to it, but if you connect the usb with no battery in it will power the phone from usb. I'm running mine off USB.

2. The voltages on the pulse are actually 2.6V. I didn't check the voltages on my adapter, but I assume they will be 3.3V. I think your adapter should be fine.

Link to comment
Share on other sites

Guest BigBearMDC

I took my phone apart again, and made a few photos. As you can see, soldering the cables to the headphone jack is no problem, but getting them there could be difficult unless you use 0.25mm² cables..

post-619279-1285156548_thumb.jpg post-619279-1285156558_thumb.jpg

I'll see what I can do tomorrow.

Best regards,

BB

Link to comment
Share on other sites

I took my phone apart again, and made a few photos. As you can see, soldering the cables to the headphone jack is no problem, but getting them there could be difficult unless you use 0.25mm² cables..

post-619279-1285156548_thumb.jpg post-619279-1285156558_thumb.jpg

I'll see what I can do tomorrow.

Best regards,

BB

If you use wire as small as I did I think it would fit between the bits of shielding. How much room is there between the shielding and the plastic? With small enough wire you could probably run it straight over the shielding and still get it back together.

I used 30awg kynar wire (0.25mm).

The Atmel USB dev boards I ordered weeks ago finally turned up today. After reading a little about them it sounds like as well as being useful for PS3 hacks, they can also be useful for interfacing with devices through JTAG. Maybe we can get JTAG going as well. I know very little about JTAG, so I doubt I will get it working.

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.