The ATmega32u4 microcontroller, used on the Arduino Yun, has a serial port (PIN 0 and 1) connected internally to the AR9331 chip that runs the Linux distribution Linino:
As the Arduino Leonardo, also Arduino Yun emulates a serial port through an USB connection (micro USB connector). Sometimes it’s needed to have a physical serial port, for example to connect to devices that can’t act as USB host and therefore accept an USB connection (consoles of network equipments…).
Yun has also an USB host port, which can accept USB peripherals like keyboards, webcams… and also USB->serial adapters:
Choose an adapter based on one of the FTDI ICs, for example the famous FT232R:
Connect to the Yun via SSH and install the appropriate kernel module:
opkg install kmod-usb-serial-ftdi
If you now connect the adapter and display the system messages (using the dmesg command) you can read that the adapter is correctly detected and a new serial port is added (named ttyUSB0 in the screenshot below):
opkg install kmod-usb-serial-ftdi
Unknown package ‘kmod-usb-serial-ftdi’.
Collected errors:
* opkg_install_cmd: Cannot install package kmod-usb-serial-ftdi.
Hi Francis, is your Yun connected to Internet? Did you execute the “opkg update” command?
According to the log of dmesg tt seems that my usb/serial adapter works. Can I use this serial port in Arduino part anyhow?
Hi Piotr,
not directly but you may write a program running on the “Linux” side of the Yun:
Sketch -> Linux -> Serial
Ciao Luca.
Fantastico Blog.
Quindi se ho ben capito, volendo connettere alla Yun il modulino HC-06 Bluetooth non lo posso collegare ai pin 0-1 come ho sempre fatto con Arduino UNO Rev3 ma devo per forza collegare una seriale esterna ? 🙁
Ciao Mauro
esattamente: la seriale “fisica” dell’ATMega32 è connessa al SoC Linux, quella che è disponibile è “emulata” (CDC)