faucamp / python-gsmmodem

Python module to control a GSM modem attached to the system: send/receive SMS messages, handle calls, etc
GNU Lesser General Public License v3.0
384 stars 302 forks source link

concurrent connections for sms and internet using huawei modem #34

Open wimalprasanna opened 10 years ago

wimalprasanna commented 10 years ago

how can i use huawei USB modem for internet and sms gateway concurrently.

each time i connect the modem, the port is changing. how can i fixed to user defined port name.

Kindly help me on this.

faucamp commented 10 years ago

This question is a bit outside of the scope of this project, as it is heavily dependent on your operating system (and, if on Windows, your modem's driver).

In Linux, most Huawei modems are accessible via multiple /dev/ttyUSBx entries - you can use e.g. /dev/ttyUSB2 for issueing AT commands (i.e. let python-gsmmodem use this) and another device (say, /dev/ttyUSB1) for internet.

Setting up the actual PPP (Internet) connection is currently outside the scope of python-gsmmodem; use NetworkManager, wvdial or whatever your distribution has to manage this.

The device node name/port number should not change between modem connections - my guess would be that the OS isn't releasing these nodes cleanly (again: this really depends on your OS environment) - googling would be your best bet, I'm afraid.