h3n
h3n

Reputation: 5248

Sending AT Command to a USB-Connected GPRS Modem in C#

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

Upvotes: 4

Views: 9560

Answers (3)

Upendra
Upendra

Reputation: 726

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");

Upvotes: 0

Alex K.
Alex K.

Reputation: 175936

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.

Upvotes: 4

Rowland Shaw
Rowland Shaw

Reputation: 38128

Typically, these devices mount themselves with a virtual serial port, that you can open, and send your commands to.

Upvotes: 2

Related Questions