chora said:
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
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>