Using AT type commands on GPRS modem

N

nzpcmad

I have a Win CE 4.1 (Not PPC) handheld with a GPRS card installed.

One of the applications that came with the device is a Terminal
application. Using this, I can configure a new session, select a modem
(obviously the GPRS one) from a drop-down list, select the baud rate
etc. etc.

When I then start the session, I can send AT type commands to the modem
e.g. COPS, CREG ....

Now I want to do this within my own application.

What do I use to get the list of available modems?

I have looked at the OpenNetCF serial code. This supports COM1 through
4. What port does the GPRS card use? Is this some kind of virtual port?
In which case, how do I access it?

Any sample code to send AT type commands to a GPRS modem that anyone
can point me to?

Grateful for any help that can get me over this initial hump!
Many thanks
 
P

Paul G. Tobey [eMVP]

Here's what I'd do to try to figure out what port is being used:

Leave the card unplugged. Export the registry using the Remote Registry
Editor that you can download with eVC 4.0. This is your base registry.
There should be some number of COM ports identified in the
HKLM\Drivers\Active section of the registry.

Plug the card in and verify that it works. Export the registry to a new
file using the same tool as before. This is your card registry. There
should, again, be some number of COM ports in that registry path. My guess
is there's one more than before. If that's the case, the new one is your
card's port. That's what you'd open to send commands yourself.

Note, though, that, if you want to actually call someone and establish a
data connection, you'll have to use the TAPI calls (check OpenNETCF), to do
that. TAPI should let you enumerate the connected modems, also.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top