Setting up Windows Mobile smartphones for network access
The easiest way of doing it is to create a special XML file, containg the needed settings, then put it into a cab file, which can be simply installed on the device.
In this post there will be a short overview of the handling of the different networks in a WM device, then there will be the explanation of the configuration file created for the Pannon nework in Hungary and then some references will be given to further setting possibilities.
As oposed to other mobile phones, where you have to set the gprs connection manually for each application, in windows mobile there is a rather complex system, which tries to figure out automaticaly from the web address used, that which connection to use.
Let's see, how this works:
First the address is compared to the Mappings an this decides which Network to select. The default Mapping in the device is the following:
wsp://*/* - WAP Network
wsps://*/* - Secure WAP Network
*://*.*/* - The Internet
*://*/* - Work
So the WAP addresses are idetified by the protocol identifier, the internet is identified by having a dot in the address and work connections are identified by not having dot in the host address.
If in Settings/Connections/ Advanced/Work URL exceptions you add "*.mycompany.com" then the following entry will be added to this mappings:
*://*.mycompany.com/* - Work
When the destination network is determined, then the next step is to look for the actual connection. There are two possibilities:
- There is a GPRSEntry for that network then that connection can be used to access the destination
- If there is a ProxyEntry where the destination network is the same as the wished destination network and source network is already connected or the destination network has no GPRSEntry but the source network has, then the source network can be used with the proxy to reach the destination.
There are some Planner settings which affect the exact way, how this is working, probably it possible to setup priorities between the possible connections within one network (e.g. WLAN and GPRS), I have not checked what is this exactly doing.
After this theorethical introduction let's see how a mobile phone has to be set up to connect always to the correct network:
1) Internet connection for browsing: this is a simple GRPS APN, this is easy, we simply have to add a GPRSEntry to the "The Internet" network.
2) Corporate network access, this can be either a separate GPRS APN or can be a VPN over the internet connection. I have used a separate GPRS APN, but I had not included it into the setup file, as I wanted to keep the setup generic. What I had to do, that after installing the CAB file, I had to add the corporate GPRS APN to the "Work" network in the setting and add the Work URL exceptions on the user interface. (A separate setup file could have been created for this also)
3) WAP: for most mobile operators you have to use a proxy to access a WAP network, therefore you have to create a new Network called for example "Operator WAP", create a GPRSEntry for this network, with the APN used for WAP and a ProxyEntry which connects this network to the "WAP Network" with the proper proxy settings, given by your operator.
4) Secure WAP: as the APN for secure WAP is the same as for normal WAP, you can reuse the "Operator WAP" created in the previous step, but need to add a new proxy with different settings which connects the "Operator WAP" network to the "Secure WAP Network".
5) MMS: the MMS routing is handled on the application level, so the Mapping table is not used for it, but you need to create a new network and GPRSEntry for it, to be able to set up the MMS application to use it.
After this is done, the last step is to setup the MMS application to the operator provided settings by setting some registry values.
The actual XML and the cab file which installs it can be found here.
Ceating the CAB file is very easy, you have just to rename the xml file to _setup.xml and put it to a CAB file, which you can do for example with ZipGenius.
As a repetition the XML file does the following (you can check the actual implementation in the file):
1) Deletes all Network, GPRSEntry and ProxyEntries
2) Creates the Pannon MMS, Pannon WAP, Work, Secure WAP Network, WAP Network, The Internet networks with the proper IDs
3) Creates the GPRSEntries for the mms, wap and internet connections
4) Creates the WAP and Secure WAP proxies
5) Adds the Pannon WAP site to the favorites (to the first position)
6) It says that the prefered GPRSEntry for "The Internet" should be Pannon Net, this is needed because activesync automatically adds a Proxy entry, that the internet can be accessed trough the work network, which is not the case when connecting to the corporate gprs apn.
7) Sets up the MMS settings in the registry, including the network to access it.
As a bonus for reading so much, on the referenced location, there is another cab file, wich turns of always on GPRS and disconnect the connection when it is not in use.
There is still a problem with this setup, that the recognition of the WAP pages by the wsp:// protocol prefix is not working well, because the internal links in Pannon's WAP pages are not using it :-o. Probably by Mapping *://wap.pannon.hu/* to the "WAP Network" would help.
And finally if you haven't read enough some more references: