Posts: 2
Joined: Sun Nov 10, 2019 10:05 pm

Help with USB -> R232 on Pi Zero W

Sun Nov 10, 2019 10:13 pm

Hi there

I know there are several posts on this topic, but I've scoured them all and haven't been able to figure this out. I'm trying to control my projector via a R232 port. I have a USB to R232 cable, specifically this one:

https://www.amazon.com/gp/product/B0769 ... UTF8&psc=1

I can't seem to get it to register anything on my Pi.

Code: Select all

pi@raspberrypi:~ $ dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:25:6C:54 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=f991b5bc-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.001276] console [tty1] enabled
[    1.062493] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    1.070613] 20215040.serial: ttyS0 at MMIO 0x0 (irq = 53, base_baud = 31250000) is a 16550
[   16.242115] usb 1-1: pl2303 converter now attached to ttyUSB0
I've copied some python scripts to write to ttyS0 and read from ttyUSB0. I'm apparently able to write to ttyS0 but cannot read anything from ttyUSB0.

Even if I do

Code: Select all

echo "hi" > /dev/ttyUSB0
cat /dev/ttyUSB0
I get nothing.

I have serial login disabled.

The chipset here is PL2303.

Is there a way I can determine if, for example, this device is defective?

Posts: 2
Joined: Sun Nov 10, 2019 10:05 pm

Re: Help with USB -> R232 on Pi Zero W

Wed Nov 13, 2019 3:58 pm

Turns out the issue was with permissions on the `dev/ttyUSB0` port. I have a user associated with a daemon that would be accessing this port, and that user simply didn't have permissions to access the port. Once I gave my user appropriate permissions (by changing their group, not by changing the owner or permissions of the port itself) everything worked great.

Return to “Troubleshooting”