How to launch a program after gsmmodem link is generated
Posted: 19 Nov 2014, 15:21
Hello modeswitch forum! This is my first question 
I've been using a python script to listen udev events, when a ttyUSB* device is attached I try to send AT commands to every port, trying to gess which port should I use to communicate with AT commands. But it is not reliable as sometimes the modem responds to AT on two ports, but only one is fully funciontal (fo send SMS), and sometimes I fail to determine the appropiate port
Recently I noticed a /dev/gsmmodem* link is generated for the appropiate port by usb_modeswitch. Is there a way to trigger some command when this link is generated? and another one if the the device is detached? (i noticed the symbolic link is also removed)
I've been using a python script to listen udev events, when a ttyUSB* device is attached I try to send AT commands to every port, trying to gess which port should I use to communicate with AT commands. But it is not reliable as sometimes the modem responds to AT on two ports, but only one is fully funciontal (fo send SMS), and sometimes I fail to determine the appropiate port
Recently I noticed a /dev/gsmmodem* link is generated for the appropiate port by usb_modeswitch. Is there a way to trigger some command when this link is generated? and another one if the the device is detached? (i noticed the symbolic link is also removed)