Difference between revisions of "Ms14 uart"
From Wiki for Dragino Project
(→Example 1: Debug UART transmit / receive feature in computer) |
(→Example 1: Debug UART transmit / receive feature in computer) |
||
Line 23: | Line 23: | ||
This test required: | This test required: | ||
#Your computer has a rs232/uart converter to connect to ms14 and have properly set up. [[Access_MS14#RS232_Access|'''Reference Link''']] | #Your computer has a rs232/uart converter to connect to ms14 and have properly set up. [[Access_MS14#RS232_Access|'''Reference Link''']] | ||
− | #Know how to edit files in ms14. [[ | + | #Know how to edit files in ms14. [[Transfer_/_Edit_files_in_ms14|'''Reference Link''']] |
==Use minicom== | ==Use minicom== |
Revision as of 19:26, 21 September 2013
Different modes of UART
ms14 has a uart interface expose on the 2x8 router connector. this interface can be act as:
- Console port to debug the openwrt system inside ms14. refer link here.
or
- UART interface to communicate to other devices such as a avr daughter board.
to disable UART as a console port, user can comment the related line in file /etc/inittab. And reboot the device.
root@dragino2-684db6:/# vi /etc/inittab ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown #ttyATH0::askfirst:/bin/ash --login // Comment this line to disable uart as console.
If your computer has serial port connect to ms14, you will still able to see output from serial when booting. but it will stop some while after boot.
Example 1: Debug UART transmit / receive feature in computer
A fast way to debug the UART interface is use your computer to simulate transaction between the ms14 and mcu. Here is simple test set up to do this test.
This test required:
- Your computer has a rs232/uart converter to connect to ms14 and have properly set up. Reference Link
- Know how to edit files in ms14. Reference Link
Use minicom
root@dragino2-684db6:/# opkg update Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz. Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz. Updated list of available packages in /var/opkg-lists/snapshots. root@dragino2-684db6:/# opkg install minicom Installing minicom (2.3-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/minicom_2.3-1_ar71xx.ipk. Configuring minicom. root@dragino2-684db6:/# minicom -s // use minicom -s to configure serial port A - Serial Device : /dev/ttyATH0 | // use ttyATH0 as serial port | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : No | | G - Software Flow Control : No | | | | Change which setting?