Can anyone give me a good direction or guide on how I can access a GPRS modem that is connected to a Usb Port. Should I make a USB driver for my program to send AT command to the modem? or Is like a router where in i can access it using an IP address? thanks
Asked
Active
Viewed 9,224 times
3 Answers
4
If its recognised by windows as a modem then the required drivers should automatically present it as a serial port, just like any other modem & you can communicate with it using its port name & System.IO.Ports.SerialPort
. If you want to access the AT/GSM command set there are libraries like GSMComm.

Alex K.
- 171,639
- 30
- 264
- 288
-
you are right. there is a driver to make the usb recognized as serial port. do you think this url is a good start? http://www.codeproject.com/KB/IP/Send_and_Read_SMS.aspx – h3n May 09 '11 at 13:17
-
It looks ok from the comments @ the bottom of the page, but the best way to tell is to try it – Alex K. May 09 '11 at 13:31
-
If you dont want to use readymade libraries then you can use DataReceived Event Handler of Serial port and develop your own custom driver for the GSM/GPRS. – Nitin Gupta Jun 27 '12 at 07:56
2
Typically, these devices mount themselves with a virtual serial port, that you can open, and send your commands to.

Rowland Shaw
- 37,700
- 14
- 97
- 166
0
Probably not useful to anymore, but when I plug-in my USB GPRS Modem, and install the software/drivers that came along with it, it created a virtual COM port.
Though it keeps changing after every reboot. Following code works for me.
var port = new System.IO.Ports.SerialPort();
.
.
port.WriteLine("AT+CREG=2");

Upendra
- 716
- 9
- 17