Best Alarm App for Android?

There are tons of choices to choose from when looking for a great alarm app for Android. While the stock … more

Unofficial CM12.1 Available for Moto E 2014

While Motorola is yet to release a final 5.0.2 build for the Moto E 2014, XDA Senior … more

Pinsy Brings Social Sketching To Your Watch & Phone

Did you watch Apple’s VP draw on his wrist during the Apple Watch announcement … more

CyanogenMod 12.1 for Samsung Galaxy S5

Android 5.1 is slowly putting its mark in the custom ROM world. CyanogenMod 12.1 is available to … more
Post Reply Subscribe to Thread Email Thread

232 - serial - USART - UART

29th January 2010, 09:12 PM   |  #1  
OP Junior Member
Thanks Meter: 1
 
29 posts
Join Date:Joined: Jan 2010
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.
29th January 2010, 09:41 PM   |  #2  
swetland's Avatar
Member
Mountain View, CA
Thanks Meter: 45
 
96 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by d1mbu1b

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.
30th January 2010, 12:04 AM   |  #3  
jairuncaloth's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 5
 
147 posts
Join Date:Joined: Dec 2008
More
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.
2nd February 2010, 01:04 PM   |  #4  
OP Junior Member
Thanks Meter: 1
 
29 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by swetland

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

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
Last edited by d1mbu1b; 2nd February 2010 at 02:06 PM. Reason: changed zerner to zener
2nd February 2010, 01:09 PM   |  #5  
rotohammer's Avatar
Senior Member
Flag New Jersey
Thanks Meter: 1,067
 
1,380 posts
Join Date:Joined: Jan 2007
More
One zener is marked 5V, the other two are 3V3 which means 3.3 volts.
2nd February 2010, 01:41 PM   |  #6  
OP Junior Member
Thanks Meter: 1
 
29 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by rotohammer

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
2nd February 2010, 02:01 PM   |  #7  
OP Junior Member
Thanks Meter: 1
 
29 posts
Join Date:Joined: Jan 2010
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.
2nd February 2010, 10:31 PM   |  #8  
rotohammer's Avatar
Senior Member
Flag New Jersey
Thanks Meter: 1,067
 
1,380 posts
Join Date:Joined: Jan 2007
More
Quote:
Originally Posted by d1mbu1b

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.
3rd February 2010, 04:47 AM   |  #9  
jairuncaloth's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 5
 
147 posts
Join Date:Joined: Dec 2008
More
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.
Last edited by jairuncaloth; 3rd February 2010 at 06:00 AM.
3rd February 2010, 12:23 PM   |  #10  
OP Junior Member
Thanks Meter: 1
 
29 posts
Join Date:Joined: Jan 2010
Quote:
Originally Posted by jairuncaloth

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

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes