I want to read the single status lines (txd, dtr, ...) of a PL2303 USB2RS232 converter with statserial. I already attached my PL2303 to the ttyUSB0 port. But to read the data, I need the command statserial, wich just accepts ttyS* (if I try to use it with ttyUSB*, "permission denied" apperars). How can you change the ttyUSB* to a ttyS* "adress"??
lsusb: gernot@gernot-Lenovo-G505s:~$ lsusb Bus 002 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 004: ID 174f:147b Syntek Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 004: ID 0cf3:3004 Atheros Communications, Inc. Bus 003 Device 002: ID 062a:4101 Creative Labs Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub dmesg: ... [ 53.186869] ISO 9660 Extensions: Microsoft Joliet Level 3 [ 54.986337] ISOFS: changing to secondary root [ 76.485704] usb 5-1: new full-speed USB device number 2 using xhci_hcd [ 76.522777] usb 5-1: New USB device found, idVendor=067b, idProduct=2303 [ 76.522786] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 76.522791] usb 5-1: Product: USB-Serial Controller [ 76.522795] usb 5-1: Manufacturer: Prolific Technology Inc. [ 76.557641] usbcore: registered new interface driver usbserial [ 76.557658] usbcore: registered new interface driver usbserial_generic [ 76.557668] usbserial: USB Serial support registered for generic [ 76.559702] usbcore: registered new interface driver pl2303 [ 76.559719] usbserial: USB Serial support registered for pl2303 [ 76.560192] pl2303 5-1:1.0: pl2303 converter detected [ 76.588044] usb 5-1: pl2303 converter now attached to ttyUSB0 ...
Thanks for the help!
Update: It seems that I was not a member of the dialout group. I added my user to that group using
sudo usermod -a -G dialout <username>
After that I had permission to access the USB and Serial ports. Now terminal-programs like moserial work. But I still can't access the status lines using
statserial. Instead I get that message:
gernot@gernot-Lenovo-G505s:~$ statserial ttyUSB0 statserial: can't open device `ttyUSB0': No such file or directory
Update 2: I managed to make statserial work (the sense of this thread will collapse I guess): First you have to reset the port and then establish a hard link to a ttyS*-port with a higher number than the number of standard ports are:
sudo rm /dev/ttyS40 sudo ln /dev/ttyUSB0 /dev/ttyS40
But how can I copy the data displayed in terminal into any object i can read with selfmade code? And why is the statserial-tool reacting so slowly to changed staus lines?