Difference between revisions of "IoTGateway/BSP/Android/Gettingstarted/How to use UART"
From ESS-WIKI
Yuming.lin (talk | contribs) |
Yuming.lin (talk | contribs) |
||
Line 1: | Line 1: | ||
− | <span style="color: rgb(0, 0, 205);">'''<span style="font-size: large;"> | + | = <span style="color: rgb(0, 0, 205);">'''<span style="font-size: large;">Overview</span>'''</span> = |
− | <span lang="en"><font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font></span><br/><span style="color: rgb(0, 0, 205);"><span style="font-size: large;">''' | + | <span lang="en"><font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font></span> |
+ | |||
+ | = <br/><span style="color: rgb(0, 0, 205);"><span style="font-size: large;">'''Configuration'''</span></span> = | ||
<span lang="en"><font color="#000000">The utility stty can configure the serial speed. Then the com port can be accessed as a file:</font></span> | <span lang="en"><font color="#000000">The utility stty can configure the serial speed. Then the com port can be accessed as a file:</font></span> | ||
Line 17: | Line 19: | ||
#echo test > /dev/ttymxc1 | #echo test > /dev/ttymxc1 | ||
− | '''<span style="font-size: large;"><span style="color: rgb(0, 0, 205);"> | + | = '''<span style="font-size: large;"><span style="color: rgb(0, 0, 205);">Boards</span></span>''' = |
− | + | == ROM3420 Borad == | |
{| style="width: 500px;" cellpadding="1" cellspacing="1" border="1" align="left" | {| style="width: 500px;" cellpadding="1" cellspacing="1" border="1" align="left" | ||
Line 36: | Line 38: | ||
| | | | ||
− | + | Yes | |
|- | |- | ||
Line 45: | Line 47: | ||
| | | | ||
− | + | Yes | |
|- | |- | ||
Line 54: | Line 56: | ||
| | | | ||
− | + | Yes | |
|} | |} | ||
Line 72: | Line 74: | ||
| | ||
− | [[File:ROM3420 COM.png|252x213px]] | + | [[File:ROM3420 COM.png|252x213px|ROM3420 COM.png]] |
− | + | == ROM7421 Borad == | |
{| style="width: 500px;" cellpadding="1" cellspacing="1" border="1" align="left" | {| style="width: 500px;" cellpadding="1" cellspacing="1" border="1" align="left" | ||
Line 91: | Line 93: | ||
| | | | ||
− | + | No | |
|- | |- | ||
Line 100: | Line 102: | ||
| | | | ||
− | + | No | |
|} | |} |
Revision as of 09:52, 25 January 2017
Overview
The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.
Configuration
The utility stty can configure the serial speed. Then the com port can be accessed as a file:
Check baudrate
# stty -F /dev/ttymxc1 115200
Read
#cat /dev/ttymxc1 &
Send
#echo test > /dev/ttymxc1
Boards
ROM3420 Borad
COM Name | NXP/Freescale Name | Device |
RS485 support |
---|---|---|---|
COM0 | UART2 |
/dev/ttymxc1 |
Yes |
COM1 | UART4 |
/dev/ttymxc3 |
Yes |
COM2 | UART5 |
/dev/ttymxc4 |
Yes |
ROM7421 Borad
COM Name | NXP/Freescale Name | Device |
RS485 support |
---|---|---|---|
COM0 | UART2 |
/dev/ttymxc1 |
No |
COM1 | UART4 |
/dev/ttymxc3 |
No |