Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extra dial string commands - not enough space

26 views
Skip to first unread message

chora

unread,
Mar 16, 2004, 5:50:26 AM3/16/04
to

Hi all,

I am trying to setup a GPRS connection, which needs several AT commands
GSM engine specific.

In Pocket PC connection settings ("Extra dial-string modem commands"
)there is not enough space to include all of them.

Is there a workaround?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Trevor

unread,
Mar 16, 2004, 10:33:32 AM3/16/04
to

"chora" <cho...@hotmail.com> wrote in message
news:uwKa%23R0CE...@tk2msftngp13.phx.gbl...

Chora,

Take a look at the registry under HKLM\ExtModems\YourModemDriver\Init.
Add a new entry with a custom dial command. Note you need to use literal
"<cr>" instead of "\r".

e.g.,
wsprintf(gprsInitString, _T("AT+CGDCONT=1,\"%s\",\"%s\"<cr>"),

gprsPdp, gprsApn);


chora

unread,
Mar 16, 2004, 2:55:06 PM3/16/04
to

Thanks,

I checked that already but no "init" section under any installed modem
(GSM and GPRS). Is it ok to just create one?

Now about the string. I am totally lost by your example. What is
wsprintf and several other cryptic characters?

Can't I just write comma separated commands? Like
AT+CGDCONT=1,"IP","MyAPN" , AT+CGATT=1 ... etc

Trevor

unread,
Mar 16, 2004, 3:31:56 PM3/16/04
to

"chora" <cho...@hotmail.com> wrote in message
news:etxaVC5C...@TK2MSFTNGP09.phx.gbl...

chora,

Sorry, I forgot I was pasting C code to a .NET newsgroup. I do not know
if it is OK to just create that key if it does not exist (that key already
existed on my device). The only way to know for sure is to try it out
yourself.

HKLM\ExtModems\YourModemDriver\Init
#0 Type REG_SZ
AT+CGDCONT=1,"IP","your.apn.here"<cr>
#1 Type REG_SZ
AT+CGATT=1<cr>
#2 Type REG_SZ
AT+CSQ?<cr>

etc...

Notice the literal string "<cr>" is at the end of each registry entry
instead of the CR (carriage return) character. This .NET code should do the
trick:

string initString = string.Format("AT+CGDCONT=1,"IP",\"{0}\"<cr>", apnName);

I think that will work, but I am not very experienced in .NET so you may
have to toy with it a little bit. The end result should match:

AT+CGDCONT=1,"IP","your.apn.here"<cr>


chora

unread,
Mar 17, 2004, 7:12:35 AM3/17/04
to

It worked fine. I just added a key "init" under the modem entry and then
added the commands as string values using PHM Regedit.

That was all. Many thanks Trevor!

0 new messages