Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,985 Members 53,611 Now Online
XDA Developers Android and Mobile Development Forum

232 - serial - USART - UART

Tip us?
 
d1mbu1b
Old
#1  
Junior Member - OP
Thanks Meter 1
Posts: 29
Join Date: Jan 2010
Default 232 - serial - USART - UART

anyone know if there is a serial port hidden anywhere.
The PSP has one in the earphone jack and the iphone has on pinned out in the connector.

I searched high and low for the Nexus One pinout/schematic cant find it.
(probably right in front of my face)

I did see /dev/console and /dev/ttyHS0 and console but I dont know what that is.

Any pointers would be appreciated.
 
swetland
Old
#2  
swetland's Avatar
Member
Thanks Meter 45
Posts: 96
Join Date: Jan 2010
Location: Mountain View, CA
Quote:
Originally Posted by d1mbu1b View Post
anyone know if there is a serial port hidden anywhere.
The PSP has one in the earphone jack and the iphone has on pinned out in the connector.

I searched high and low for the Nexus One pinout/schematic cant find it.
(probably right in front of my face)

I did see /dev/console and /dev/ttyHS0 and console but I dont know what that is.

Any pointers would be appreciated.
TTL level (~3.3v?) serial is present on the D+/D- pins of the micro USB connector whenever VBUS (usb +5v power) is not present. This is physical UART1 (ttyMSM0). In standard builds the FIQ kernel debugger runs there. You'll have to disable the FIQ debugger and enable the serial device in your kernel config if you want to use it as a regular serial port.
 
jairuncaloth
Old
#3  
jairuncaloth's Avatar
Senior Member
Thanks Meter 4
Posts: 147
Join Date: Dec 2008
Location: Atlanta
http://www.instructables.com/id/Andr..._Serial_Cable/

Obviously you need a micro usb cable instead of mini, but this should work I think. I'll let you know when my serial adapter shows up.
 
d1mbu1b
Old
(Last edited by d1mbu1b; 2nd February 2010 at 02:06 PM.) Reason: changed zerner to zener
#4  
Junior Member - OP
Thanks Meter 1
Posts: 29
Join Date: Jan 2010
Quote:
Originally Posted by swetland View Post
You'll have to disable the FIQ debugger and enable the serial device in your kernel config if you want to use it as a regular serial port.
Thank you for the info.
Is this a kernel compile time or run time configuration?

Quote:
Originally Posted by jairuncaloth View Post
http://www.instructables.com/id/Andr..._Serial_Cable/Obviously you need a micro usb cable instead of mini, but this should work I think. I'll let you know when my serial adapter shows up.
thanks for the link. If Im not mistaken you may be able to eliminate a lot of this by splicing an existing micro USB cable with a MAX232 cable, will need to verify D+/- can handle 0-5 volts instead of 0-3.3v
Motorola T 191 serial cable

http://www.yoreparo.com/foros/files/t191cable_817.jpg
I can't tell is thats a 5 or 3 volt zener in the schematic
 
rotohammer
Old
#5  
rotohammer's Avatar
Senior Member
Thanks Meter 1066
Posts: 1,380
Join Date: Jan 2007
Location: New Jersey
One zener is marked 5V, the other two are 3V3 which means 3.3 volts.
-Rotohammer
T879 Note on T-Mobile
Do not quote my entire first post in a reply!
 
d1mbu1b
Old
#6  
Junior Member - OP
Thanks Meter 1
Posts: 29
Join Date: Jan 2010
Quote:
Originally Posted by rotohammer View Post
One zener is marked 5V, the other two are 3V3 which means 3.3 volts.
So it seems that one can simply splice the existing T191 and micro-usb cables and have a working adapter. I will be trying this when I get a chance.

The open questions are:
1) are the D+/- actually 3.3v levels
2) how is the kernel configuration performed to get /dev/tty?S?0
 
d1mbu1b
Old
#7  
Junior Member - OP
Thanks Meter 1
Posts: 29
Join Date: Jan 2010
Default measured AM601 T191

tx is generating a 0-1.9v waveform at 19200 and 115200 and it took about 1 ms to charge the cap and start clocking data.
 
rotohammer
Old
#8  
rotohammer's Avatar
Senior Member
Thanks Meter 1066
Posts: 1,380
Join Date: Jan 2007
Location: New Jersey
Quote:
Originally Posted by d1mbu1b View Post
The open questions are:
1) are the D+/- actually 3.3v levels
USB signals are typically 3.6v, but the phone hardware may have a circuit to switch from USB to TTL serial. Regardless, the 3.3v zeners will give the MAX232 a nice flat topped square wave signal to work with.

Typically, to get a console on a serial port, you just specify a kernel boot option, or edit an entry in /etc/initab file. I'm not familiar the specifics of the android kernel though.
-Rotohammer
T879 Note on T-Mobile
Do not quote my entire first post in a reply!
 
jairuncaloth
Old
(Last edited by jairuncaloth; 3rd February 2010 at 06:00 AM.)
#9  
jairuncaloth's Avatar
Senior Member
Thanks Meter 4
Posts: 147
Join Date: Dec 2008
Location: Atlanta
I ended up with this one.

http://www.sparkfun.com/commerce/pro...roducts_id=718

snipped a usb cable and soldered it together. Works well.
 
d1mbu1b
Old
#10  
Junior Member - OP
Thanks Meter 1
Posts: 29
Join Date: Jan 2010
Quote:
Originally Posted by jairuncaloth View Post
I ended up with this one.http://www.sparkfun.com/commerce/pro...roducts_id=718snipped a usb cable and soldered it together. Works well.
This data sheet says it implements the enture USB protocol on the chip.
Does this implement a USB host for the nexus one device?
I am confused.
I see there is a fuse and 5v connected to the USB 5v.
This implies the N1 is emulating a UART over the USB interface
and not clocking UART 232 over these same pins.

So my question is this an emulated 232 serial interface on the N1 or a UART in the N1 clocking 232 over the microUSB pins 2 and 3?

Please let me know what SW configuration you did on the N1 and what was the resulting name of the serial port in /dev/tty*
Thank you

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more

Make Your Own DIY Capacitive Stylus

The XDA Portal is a place where we like to talkabout things that are interesting, fun, and sometimes … more