Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a laptop with only one serial port and want to add a serial port via usb.
I have attached the adapter and /var/log/messages shows it as recognized.
The system sees the device and has an entry in /dev for ttyUSB0, but I need to send data that would normally go to /dev/ttyS1 to /dev/ttyUSB0.
How do I redirect all traffic that applications normally send to com2 (/dev/ttyS1) to /dev/ttyUSB0 ???
The connections on both serial ports are for null modem connections to another computer.
When I change the script in the app to use /dev/ttyUSB0 or 1 or 2 or 3, there is no data flow.
If I try to echo a test through /dev/ttyUSB0 it returns a "no such device"
The same test goes through /dev/ttyS1 with no problem, even though it does not physically exist.
The O/S sees the device as a serial port but does not seem to automatically assign ttyS1 to it.
Has anyone out there had success with getting LINUX to recognize a USB to SERIAL adapter as if it were ttyS1?
I have seen several other posts in other threads, and none have been able to resolve this.
I would really appreciate it if someone who has a procedure would share it.
As it turns out, I've been tying to get Atmel's FLIP software to use a USB to serial converter (Aten UC-232A using the Prolific PL2303 driver). FLIP will only talk to "serial" ports ttyS0 - ttyS3. I've managed to get it to function using the following steps (if I remember correctly).
The following assumes that the USB driver is installed and functioning. In my case (Ubunty:Feisty) I didn't need to do anything - it work "out of the (virtual) box". Try "tail -f /var/log/messages" soon after you insert the USB-Serial converter. You should see something like "pl2303 converter now attached to ttyUSB0" indicating that the driver is working and your converter is connected to /dev/ttyUSB0.
OK, so here's the steps to redirect it...
1. Delete the ttySx port you are going to use - in my case I'm using /dev/ttyS3
sudo rm /dev/ttyS3
BE WARNED!!! I have no idea on how to re-instate the serial port (that's why I chose ttyS3)
2. Create a Symlink from the USB port to the chosen serial port.
sudo ln /dev/ttyUSB0 /dev/ttyS3
3. Change the permissions of the Symlink to allow owner and group r/w access
sudo chmod 660 /dev/ttyS3
4. Change the owner & group of the Symlink to match the USB port.
sudo chown root:dialout /dev/ttyS3
All going well you should get a good result.
Things to check:
1. Permissions, owner and group of /dev/ttyUSB0 and /dev/ttyS3 (or your port choice) are the same. In my case they look like this:
2. Regardless of any of the above, if you have a LED on your USB-Serial converter, an echo test should get it to flicker:
echo "test" > /dev/ttyUSB0
3. If the echo test works on the ttySx port, then try it on the new "link":
echo "test" > /dev/ttyS3
If you can get the light to flicker again, then it should be working! Try it with the software you originally intended to use.