I would like to send some test data from the Yun to my PC. I've have a USB to serial adapter in the Yun and female/female cable connecting to the PC with another serial to USB adapter.
I've set the PC baud rate to 19200, I'm listening with Putty on the PC, I want to send something to the Yun serial port, but first how do I set the baud rate on the Yun ? stty isn't available.
I think this is what you are hooking up:
Yun USB host port <-> USB serial adapter <-> serial USB adapter <-> PC USB port
Correct?
If so the device you want will probably be on /dev/ttyUSB0 on the yun side, that’s were a ftdi adapter shows up on my Ubuntu box, I haven’t plugged it into the yun. In any case /dev/ATH0 is the connection to the 32u4.
If you ls /dev/tty* before and after you plug the adapter in whatever is new is the one you are looking for.
DOH!, I should have known you need kmod-usb-serial-ftdi (if you have a ftdi adapter). No need to cycle power, the device file will appear and disappear when (un)plugging. You can watch what happens with dmesg.
So here is what I see with a device that uses a FT232 :
root@Arduino:~# ls /dev/tty*
/dev/tty /dev/ttyS1 /dev/ttyS12 /dev/ttyS15 /dev/ttyS4 /dev/ttyS7
/dev/ttyATH0 /dev/ttyS10 /dev/ttyS13 /dev/ttyS2 /dev/ttyS5 /dev/ttyS8
/dev/ttyS0 /dev/ttyS11 /dev/ttyS14 /dev/ttyS3 /dev/ttyS6 /dev/ttyS9
root@Arduino:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check passed.
root@Arduino:~# opkg install kmod-usb-serial-ftdi
Package kmod-usb-serial-ftdi (3.3.8-1) installed in root is up to date.
root@Arduino:~# ls /dev/tty*
/dev/tty /dev/ttyS1 /dev/ttyS12 /dev/ttyS15 /dev/ttyS4 /dev/ttyS7 /dev/ttyUSB0
/dev/ttyATH0 /dev/ttyS10 /dev/ttyS13 /dev/ttyS2 /dev/ttyS5 /dev/ttyS8
/dev/ttyS0 /dev/ttyS11 /dev/ttyS14 /dev/ttyS3 /dev/ttyS6 /dev/ttyS9
root@Arduino:~#
For testing:
echo "one, two, three, testing, one, two, three" >/dev/ttyUSB0 will send a string out on serial
Consider installing picocom on the Yun, then you should be able connect to a terminal session (PuTTY?) on the Windows box on the other end of the cable with something like:picocom -b 19200 /dev/ttyUSB0