Hi,
My app' is talking with a GSM modem, over USB.
- /dev/ttyACM0 is used for pppd (external process, not within my Qt app').
- /dev/ttyACM5 is used for 'control' AT commands (RSSI, provider local time, voice calls, etc.)
Everything is working fine till the modem's USB cable is plugged out (actually, every few hours the modem crashes, or something else, which ends up in the USB interface is destroyed, what seems to my Linux as a detach-event).
On detach:
- pppd dies and frees /dev/ttyACM0.
- My QSerialPort receives a ResourceError signal, I call MyQSerialPort.close() and receive another ResourceError signal, in an endless loop. The app' finally crashes (but the Linux doesn't), but the modem has already reconnected and uDev creates ttyACM0, 1, 2, 3, 4, 6, 7 - missing ttyACM5 (because it was held by the app').
What am I doing wrong?
Should I disconnect all signals from MyQSerialPort before calling close(), and reconnect after?
I'm afraid of a memory/resource leak.
Qt 5.5.1, Linux.
Thanks
Bookmarks