Every so often, I run into this problem where the port cannot be found.
E:serial error 2 opening /dev/ttyUSB0: No such file or directory
E:serial Open serial port failed
When this happens, sometimes I can unplug and plug the device back into the USB port then it can be found, other times, this doesn't work and a full reboot is needed. It gets weirder when a reboot without anything connected to the USB port works and other times it does not. And even stranger is sometimes, once this is working, it survives across reboots.
I do not understand the seemingly (to me) random behavior so wondered if there is some way to hard code this in some way so that when openwrt reboots, the serial/USB port would always be ready no matter if something is connected to the USB or not.
I currently have this in my rc.local to get things started but the above happens.
modprobe ftdi_sio (this usually only needs to run once)
echo 0400 000f1 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
exit 0
Maybe the problem is that I should not be doing this from the rc.local? I really don't know as searching for days has not revealed anything obvious which is why I'm posting here at this point.