this is somewhat related to this post:
http://smstools3.kekekasvi.com/topic.php?id=825
I'm on OpenWRT/LEDE (using custom built 3.1.21 package) and my modem has 3 devices:
/dev/ttyUSB[0-2] by default. I'm using ttyUSB2.
On the smsd side everything works fine, but the HW is used in an industrial environment with lots of EMI. This causes the usb bus to disconnect/reconnect the modem every now and then. (It can be simulated by unplugging/repluging the modem, I think.)
When this happens smsd recieves EIO, but insists on using the non-existent device. Ie I get a line of
every second without smsd ever recovering.
And what's even worse: It seems since ttyUSB2 is still "in use" after reconnecting the modem, the linux kernel assigns the modem to the devices ttyUSB0, ttyUSB1 and ttyUSB3.
I managed to work around this with an alarmhandler, that detects the EIO error and a startup script that links /dev/modem to the right device node, but it is clumsy and has some annoying side effects. I think smsd could handle this much better:
* do something sane on EIO - probably closing the device and following the usual startup procedure
* maybe also provide an option to use the highest number ttyUSB*, whatever it might be.