I want to transfer some serial data as explained here:http://www.cse.dmu.ac.uk/~sexton/ENGD2003/openwrt/arduino%20teensy%20openwrt.html on an openwrt router. However, I directly connected to the serial port of the router as opposed to usb(in the guide) so now I don’t know which of the following is the device:
Which one of the following is the serial port of the router?
bus mtd1 mtd5 null ttyATH0 ttyS15 ttyS9 console mtd1ro mtd5ro port ttyS0 ttyS2 urandom full mtd2 mtdblock0 ppp ttyS1 ttyS3 watchdog kmsg mtd2ro mtdblock1 ptmx ttyS10 ttyS4 zero log mtd3 mtdblock2 pts ttyS11 ttyS5 mem mtd3ro mtdblock3 random ttyS12 ttyS6 mtd0 mtd4 mtdblock4 shm ttyS13 ttyS7 mtd0r o mtd4ro mtdblock5 tty ttyS14 ttyS8
When I connect the device using serial, nothing new shows up so it must be one of those. Any ideas?
Edit: The results of cat /proc/cmdline board=TL-WR703N console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
Advertisement
Answer
As far as I understand, you are trying to connect Arduino board to your router’s console port, that you’ve soldered. The device name is /dev/ttyATH0
.
I would make following test. If Arduino sends something on start, you can set the desired baudrate via stty
and then execute cat /dev/ttyATH0
and see, if startup message appears.
If Arduino awaits commands, before it sends data, you will need minicom
or screen
, so that you can send/receive data over serial link.
Possible issues: this port is owned by both kernel (console=ttyATH0,115200
) and init processes (see /etc/inittab
), that means, that even if can use the port, kernel messages can interfere with your data.