Hi, I was wondering if there is a way to configure a connection for GPRS on a windows mobile 5 device in code. I am having a few problems doing it through setting the registry as I can get the connection to appear under the Connections > Manage existing connections dialog but if I try and connect to the connection I am prompted for the username and password however I do not want this prompt to appear.
I have been able to do configure the connection with great success for a windows ce 4.2 and pocket pc OS however it seems a little different for the mobile 5 device I am working ok.
I do not want to import registry entries, I would like to be able to set the registry values in code, which is working as I get the connection in the required dialog.
If anyone knows of a wrapper that I could use to be able to configure the connection I would be very grateful if you could let me know.
Thank in advance.
Paul Diston

GPRS Connection Setup in Code
Duvalu
Hi Paul,
Im currently on T-Mobile .. after looking on the website you give me i take it GPRS!general is my Phone parameter..
Also do you know where in the registery i can find Destid Its a big place in there hehe.. or a rough idea..
Then i should be done :D
Many Thanks for all your help!
Jennifersmith23
Hi,
Thank you very much for your reply.
The ConnectionManager is not really what I am looking for. As with the XDA 2i that i have developed on I want to be able to let the OS handle the connection instead of me having to call a connect method each time I call a web service method. We do use the ConnectionManager class when we are developing on Windows CE 4.2 as this OS does not handle the connection for use, however the Pocket PC OS handles the connection for us which is an ideal solution.
If anyone has any more ideas why setting the registry is not working for the Mobile 5 device I am developing on then I would be grateful if you could let me know.
Another thing to note is that the XDA 2i has its own simple connection setting application provided by O2 and I have been able to reproduce the same results on this device by setting the registry values in code. However the same method does not work for the Mobile 5 device I am developing on.
Thank you for your time.
Paul Diston
tlbong
Hi,
This bit <characteristic type="DevSpecificCellular"> is standard which ever network you use.
This bit <parm name="Phone" value="~GPRS!internet"/> is specific to the APN you are using, Internet is the Vodafone specific APN address.
Also the
<parm name="DestId" value="{ADB0B001-10B5-3F39-27C6-9742E785FCD4}"/>
is device specific. If you have a registry editory then you can look up the destination Id for the GPRS modem that is installed on the device.
<
parm name="GPRSInfoAccessPointName" value="internet"/> is also APN specific so change Internet to the APN address you are using.Hope this helps, anymore problems give me a shout.
Paul
WinFormsUser13232
No problem,
I am looking at the code and testing very soon..
I will need it working on xda orbit , but they are on there way!
so i will test with other devices while we wait...
Many thanks again!!!
jonesbrasil
Hi,
It turns out that I can use the same settings that I used for the Pocket PC device, even though those settings do not get populated in the registry when you manually created the connection.
Paul Diston
DevanDanger
Hi,
Also when you do get it working for the device you are using, please can you post the device name and the connection settings you used. It would be helpful in the future.
Thanks
Paul
Hawkeye7
Hi,
I have a problem setting the connection settings for GPRS in code...
Any chance you could post the code or sample of the connection bit
Many Thanks in advance!
Jason.
Tryin2Bgood
After looking at the class..
I take it you run the
ConfigWrapper.ProcessXml(xmllocation);
And thats it It proccesses the xml and sets the network on the device
Mikael Pahmp
Hi Paul,
Im trying this on i-mate JAM , with OS 2003..
I was wondering what this bit of xml is for :
<characteristic type="DevSpecificCellular">
also This bit ..
<parm name="Phone" value="~GPRS!internet"/>
What parameter do i add to the one above
Many Thanks
rsd_za
Hi,
Yes that is correct. I just read the XML as a string from the XML file and then pass the XML string to the method as a parameter.
I believe you can also set other settings using the same XML and class combination but we only use it for GPRS settings.
Thanks
Paul
Jamie Thomson
Hi,
Since I replied to this forum post I have found a different and much better way of setting up a connection in code. It uses the following class http://www.smartphonethoughts.com/articles.php action=expand,4397 and also an xml file to set the connection. A sample XML file is below :-
<
wap-provisioningdoc><characteristic type="CM_GPRSEntries">
<characteristic type="My Connection">
<parm name="DestId" value="{ADB0B001-10B5-3F39-27C6-9742E785FCD4}"/>
<parm name="Phone" value="~GPRS!internet"/>
<parm name="UserName" value="web"/>
<parm name="Password" value="web"/>
<parm name="Enabled" value="1"/>
<characteristic type="DevSpecificCellular">
<parm name="GPRSInfoAccessPointName" value="internet"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
You basically set the various parts of the XML file and then read in the XML file using the class above and then that should be that. If you require any more information please let me know.
If you require the GPRS settings for UK networks this is a good place to look:
http://www.filesaveas.com/gprs.html
Thanks
Paul Diston
bolky
Hi,
Yes you can do all that connection stuff just after running the XML through the class. We use a Windows Mobile 5 device using the above technique and it works fine. It is very handy for devices that are not network specific, as I know that with O2 XDA 2i that they provide their own GPRS connection setup app. We did reproduce this on the XDA 2i by setting the registry however the same technique did not work for the Mobile 5 device and this is where the XML file technique comes in.
Thanks
Paul
Gustavo Holloway
Connection Manager is what you’s need to use.
LearningVisualC2005
Thanks Paul!!!
So basically , if i hard reset my device.. Let the OS load up .. run this class (http://www.smartphonethoughts.com/articles.php action=expand,4397) that reads the xml file.
Then that sets my PDA's GPRS's settings up .. so i can run anything like a http request or connection managrer.Connect and it will connect to the set GPRS
Many Thanks for your help .. look forward to your reply!
Jason