Is there any way to read GSM modem port number programmatically using Python, when I connect mobile to Windows XP machine?
Asked
Active
Viewed 937 times
1 Answers
0
Sorry I donot know the python syntaxes, just an idea to follow. You can use SerialPort.GetPortNames();
to get the list of available ports in your system.
And then send an AT
command to each port. Which ever port responds with an OK
, it means that your modem is connected to that port.

Shiridish
- 4,942
- 5
- 33
- 64
-
Adding to @Cdeez, in python if you use pyserial you can do something like [this](http://pyserial.sourceforge.net/shortintro.html#listing-ports) – Prasanth Sep 21 '12 at 09:14