Sending AT command to a USB-connected GPRS modem in C #

Can someone give me a good guide or guide on how I can access the GPRS modem that is connected to the USB port. Should I make a USB driver for my program to send the AT command to the modem? or Like a router, where can I access it using an IP address? thank

+3
source share
3 answers

If it is recognized by Windows as a modem, then the necessary drivers should automatically represent it as a serial port, like any other modem, and you can communicate with it using its port name and System.IO.Ports.SerialPort. If you want to access the AT / GSM instruction set, there are libraries like GSMComm .

+3
source

Typically, these devices are mounted with a virtual serial port, which you can open and send your commands.

+1
source

Probably not useful anymore, but when I plug in my USB-GPRS modem and install the software / drivers that came with it, he created a virtual COM port.

Although it continues to change after each reboot. The following code works for me.

var port = new System.IO.Ports.SerialPort();
.
.
port.WriteLine("AT+CREG=2");
0
source

All Articles