Hi there. I am having issues with serial connections in NodeRed. I am using the 'node-red-node-serialport' node to connect a Raspberry Pi 5b to various serial USB devices controlled by PIC24's.
This works fine, but if I leave the setup running for long enough then eventually some will timeout. This seems restricted only to devices connected to USB ports on the PI, whilst the other devices on a USB extension (which in itself is plugged into the PI of course), stay working fine. All start timing out at the same time, it is not a gradual failure.
'dmesg | grep usb' shows:
[54676.834941] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32
[54676.835316] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
repeated... ~ 10 times
This perfectly coincides with when I stopped receiving returns from requests in NodeRed, I only have 2 things unexplained:
- I stopped receiving data from 3 devices acc. to NodeRed - not just the 2 I can see in dmesg
- Disabling power management did not remedy the situation, and I am now stuck, as explained below:
My first thought was that this was a power management issue, so I set all the USB devices to autosuspend off:
for d in /sys/bus/usb/devices/*/power/control; do
echo on | sudo tee "$d"
done
However I still get the same recurring issue.
Manually requesting using, echo -ne "" > /<DEVICE_PATH> & cat /<DEVICE_PATH> | xxd, stops working at the same time too. It is not just NodeRed failing to request data from these, I have to restart the computer to get them to work again at all.
Have I disabled it wrong? Are there any other suggestions as to the issue being entirely different?