Arduino Yun with an additional FTDI USB Serial port

I connected an usb serial port to the USB port of Arduino Yun to have
an additiional serial port.
The FTDI drivers were included in the OS so the card has been registered succesfully.

My question is, can I use the serial library to read and write into this port (/dev/ttyUSBn).
or more in general how can I read and write to the port?

Schematic: [ARDUINO-YUN][USB] <--> [USB][FTDI USB/Serial]
Thanks,
Sandro

No, the serial library is to use the UART on the AVR Device. You have added a port to the AR9331 on the Linino side of the Yun.

I suppose you could write to this from the AVR through the bridge and some scripting in Linino, but I don't see the point since the bridge uses the AVR UART to talk to the AR9331 UART. You could just disable the console in inittab and use the AVR UART directly.

You can write to this port from Linino like any desktop/laptop running Linux would write to it.

Thanks for you answer, I try to explain my objective/need:
I would like to use ethernet port or the WiFi functionality to build a bridge between a physical RS232 and
a TCP socket with arduino yun
My idea is to run a TCP server on a tcp port then configure a bridge the serial port and the Ethernet/Wifi listener.
Something similar to Ser2net.
Can I load ser2net on linino side and run other stuff on AVR side ?
Thanks,
Sandro

I'm not familiar with ser2net but there is a Linino package.

You can install in in the Luci web interface under System->Software or in a ssh session like this:

opkg update
opkg install ser2net

You will need to deal with the hardware side, if you hook a true RS232 up to the Yun directly the magic smoke will probably be released. The AVR is good for 5V, the AR9331 is spec'd at 2.5V though many report you can hook them up to 3.3V or 5V. See this for more info on rs232 and microcontrollers. https://www.sparkfun.com/tutorials/215

Thank you very much,
I will try it to install the ser2net in the next weekend and keep the forum posted on outcome.
Sandro