
When you start the game of being a programmer it is common to point fingers on others when something goes wrong. When you been in the game for some time you end up in the other end always thinking the problem is on your side.
So I have looked into this problem of mine for almost a week now. Harden code and tested, tested, tested. The problems is intermittent so it takes a very long time to debug.
So
kernel: ch341-uart ttyUSB0: usb_serial_generic_read_bulk_callback – urb stopped: -32
is spotted in the logs. The problem sits in the USB <-> serial adapter.
Well well… Found it eventually. NOT my fault. Possibly somewhat responsible for having bought cheap USB<->serial adapters from China, though. This is when you wish you worked at a bigger company so you could point the finger at someone else…. 🙂 But when it’s just you, you obviously can’t do that. You’re stuck standing there. Gotta fix it yourself.
Swapping the adapter is of course the obvious solution. But it would be even nicer if you could detect this in the driver and account for it. I’ll probably start down that road.
We’ll see how it goes.