0

Is there any way to read GSM modem port number programmatically using Python, when I connect mobile to Windows XP machine?

kaiz.net
  • 1,984
  • 3
  • 23
  • 31
Fresher
  • 269
  • 5
  • 16

1 Answers1

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