This project is read-only.

Send AT commands to modem while connected

Jan 31, 2015 at 5:50 PM
Thank you for this amazing tool, it is becoming very helpful in all my projects.

I successfully use it to connect to the Internet with an AT modem in Windows 7 and 8. However there is a thing I need to figure out how to do.

After a connection, I need to open the serial port again and be able to communicate with modem. For example, to get the signal strength or send and receive SMS, basic AT commands sent over the Serial Port class in C#.

While there's an active connection, each time I try to open the modem port I get IO Exception, "Serial Port COMx is alredy in use by another process". Obviously, DotRas library (or Windows RAS layer) is probably using that port (I get access to the port again after disconnection).

My question is... is there any way to release that serial port and be able to use it to send and receive commands through it?
Is there any other way to send and receive commands with DotRas on and connected?

Thank you again.
Feb 3, 2015 at 9:57 PM
Is this a cellular modem? Many of those have both a data port and a management port. You may be able to talk to the latter while the former is in use.
Feb 4, 2015 at 10:19 AM
It is a Sierra Wireless GL6110 USB GSM/GPRS modem (
I connect it through USB port and it creates a virtual serial port in Windows. In Device Manager it is shown under modems. Apparantly, there is no other port related to the modem.

Is there any way to obtain access to the com port internally opened by DotRas? Can the internal serial connection be used for sending and receiving at commands?
Feb 4, 2015 at 10:23 PM
As far as I know once you've done something like Dial, the port will be in use and you can't use it then; releasing it will presumably disconnect the network connection. Sierra Wireless has an API for some of its devices - or did several years ago when I looked into it briefly - you might want to investigate that.