I have a new Raspberry Pi 5 running Bookworm with a Waveshare RS485 CAN HAT and am unable to get the HAT to transmit. Is this a known problem with Bookworm? Can anybody see what the problem might be? I am out of ideas.
Here is what I’ve done so far:
HAT attached via 40-pin GPIO on Pi 5. RS485 terminal block connected with a short jumper between A and B for loopback testing.
Verified serial devices:
ls -l /dev/serial* (/dev/serial0 → ttyAMA10)
Confirmed UART availability:
sudo dmesg | grep -i tty (ttyAMA10 active, no console attached)
Tried initial PySerial loopback script (without RS485 mode):
ser = serial.Serial(“/dev/serial0”, 4800, timeout=2)
ser.write(b’TEST’)
received = ser.read(4)
Result: Failed — no data received (b’').
Loopback Tests with PySerial RS485 Mode:
ser.rs485_mode = serial.rs485.RS485Settings()
Result: Failed — still no data received
GPIO Monitoring for DE/RE:
gpioget gpiochip0 4
Result: GPIO 4 was high at boot and never toggled during UART transmission attempts.
Tried ‘watch’ to monitor GPIO 4 while writing UART data — no change observed.
Added standard RS485 overlay for Pi 5 / Bookworm:
dtoverlay=uart1,txd1_pin=14,rxd1_pin=15,auto_rs485=on
Result: Rebooted; still, GPIO 4 did not toggle, and Python loopback test continued to fail.
Attempted to toggle GPIO 4 manually using libgpiod while sending UART data:
Result: Still failed — no data received over the loopback. GPIO 4 manual control did not enable transmission.
