LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   /dev/ttyUSB0 one way connection (https://www.linuxquestions.org/questions/linux-hardware-18/dev-ttyusb0-one-way-connection-4175630331/)

KenHorse 05-23-2018 06:12 PM

/dev/ttyUSB0 one way connection
 
I've been fighting a USB > serial converter on a Debian Stretch machine

dmseg confirms the adapter is connected to /dev/ttyUSB0 and I can
connect (via minicom) to it no problem. However, it only seems to
work on incoming data but won't send anything out

For example:

cat /dev/ttyUSB0 reads data coming in just fine but echo "test" >
/dev/ttyUSB0 doesn't send anything out

Same results within minicom

No permission issues as I'm doing this as root.

Thoughts?

michaelk 05-23-2018 06:36 PM

What type of device is connected to the serial adapter?

KenHorse 05-23-2018 06:40 PM

Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

michaelk 05-23-2018 06:45 PM

What is connected to the serial port?

KenHorse 05-23-2018 06:53 PM

This particular computer has both ttyS0 and ttyS1 but nothing is connected to either.

(and ttyS0 works just fine in both directions)

michaelk 05-23-2018 06:56 PM

Ok, you still have not answered what is connected to the usb serial adapter.

KenHorse 05-23-2018 07:30 PM

Oh I misunderstood your question.

I have it connected to another computer (genuine serial port) running a terminal program with which to test the one using the USB > serial.

Null-modem cable of course

michaelk 05-23-2018 09:49 PM

While I have used the pl2303 adapters for many years without problems I've not use them with the latest distributions / kernels. I assume that you have tested the cable with ttyS0 and if you have tested the usb serial adapter with an older version and it works then the problem may lie with debian 9, the kernel with the pl2303 driver.

KenHorse 05-24-2018 01:50 PM

Followup (and resolution) to this.

I tried a different converter I forgot I had (FTDI based) and it works just fine. So perhaps you're correct about the kernel. Or that the same affliction that affects Prolific-based units under Windows (counterfeit chips and/or drivers) ultimately affects Linux drivers as well...

TB0ne 05-24-2018 02:19 PM

Quote:

Originally Posted by KenHorse (Post 5858850)
Followup (and resolution) to this.

I tried a different converter I forgot I had (FTDI based) and it works just fine. So perhaps you're correct about the kernel. Or that the same affliction that affects Prolific-based units under Windows (counterfeit chips and/or drivers) ultimately affects Linux drivers as well...

Check permissions on the /dev/tty* devices. If you can read but can't write, that would indicate your user ID/device can't be written to. Do an ls -l on /dev/ttyUSB*, and see what it says

KenHorse 05-24-2018 02:31 PM

Quote:

Originally Posted by TB0ne (Post 5858861)
Check permissions on the /dev/tty* devices. If you can read but can't write, that would indicate your user ID/device can't be written to. Do an ls -l on /dev/ttyUSB*, and see what it says

As my original post stated, permissions were not an issue (/dev/ttyUSB0 is both writable and readable by root) and I made sure root was part of group dialup "just in case".

michaelk 05-25-2018 01:04 PM

Yes, it is possible that you have a "fake" or a PL-2303X device which is incompatible with the pl2303 driver. They look the same to the system but will not transmit data.


All times are GMT -5. The time now is 12:49 PM.