Xml Provisioning PPTP VPN - Windows Mobile Development and Hacking General

Hey,
I'm trying to create a VPN (PPTPP) connection using Xml. How ever whenever i run the CPF file i get a message saying "Change of Device Setting Unsuccessful"
here is my xml
Code:
<wap-provisioningdoc>
<characteristic type="CM_VPNEntries">
<characteristic type="MyVPN">
<parm name="SrcId" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
<parm name="DestId" value="{A1182988-0D73-439E-87AD-2A5B369F808B}"/>
<parm name="Phone" value="vpn.server.co.uk"/>
<parm name="UserName" value="username"/>
<parm name="Password" value="password"/>
<parm name="Domain" value="mydomain"/>
<parm name="Type" value="0"/>
<parm name="Enabled" value="1" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
Command to create CPF
Code:
C:\Program Files\Windows Mobile 6 SDK\Tools>makecab /D COMPRESS=on _setup.xml myOutCpf.cpf
List of Networks and GUID's
Code:
Name: The Internet GUID: 436ef144-b4fb-4863-a041-8f905a62c572
Name: The WAP Network GUID: 7022e968-5a97-4051-bc1c-c578e2fba5d9
Name: Secure WAP Network GUID: f28d1f74-72be-4394-a4a7-4e296219390c
Name: Work GUID: a1182988-0d73-439e-87ad-2a5b369f808b
Name: My ISP GUID: adb0b001-10b5-3f39-27c6-9742e785fcd4
Name: My Work Network GUID: 18ad9fbd-f716-acb6-fd8a-1965db95b814
I am running Windows Mobile 6.1 on a XDA Ignito (HTC Touch Dimond)
If anyone has any clue as to what I'm doing wrong and how to fix it would be greatly appreciated.
Thanks
John

Has any one tried this or had any problems like this?

Related

cab file for gprs connection

Hi All,
I found nice way to automate gprs connection settings creation and I believe that I have to share this with community. Probably for most of you it is not something new- sorry for these that are knowledgable, but for me it was real progress ... so three steps:
1. Create simple txt file like shown bellow and rename it to _setup.xml. Make changes to suit your operator - APN, usename, password and connection name
---------begin of file-------------------------------
<wap-provisioningdoc>
<characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="AppName" value="CAB Provisioning File" />
<parm name="NoUninstall" value="1" />
<parm name="NumDirs" value="1" />
<parm name="NumFiles" value="1" />
<parm name="NumRegKeys" value="0" />
<parm name="NumRegVals" value="0" />
<parm name="NumShortcuts" value="0" />
</characteristic>
<characteristic type="CM_GPRSEntries">
<characteristic type="NAME-OF-CONNECTION">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}" />
<characteristic type="DevSpecificCellular">
<parm name="GPRSInfoAccessPointName" value="PUT.YOUR.APN.NAME.HERE" />
</characteristic>
<parm name="UserName" value="USERNAME" />
<parm name="Password" value="PASSWORD" />
<parm name="Enabled" value="1" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
---------end of file-------------------------------
2. Download the following util from MS Site
http://support.microsoft.com/kb/310618
3. do the following
makecab /D COMPRESS=OFF _setup.xml gprs.cab
4. Move the gprs.cab to your device and execute it ... and the magic works.
What I'm looking for is how to install certificate on device - issued from my internal CA....
Regards,
BB.
I take it that you are looking for a way to install a certificate with a CAB and not just copy the certificate to the device and 'run' it?
If so, have a look here: http://www.microsoft.com/technet/itsolutions/mobile/deploy/msfp_b.mspx

Restoring Wi-Fi settings after hard reset

Hi all,
I would love to restore my WiFi settings from a hard reset.
I can configure the setup manually with no problem.
I am aware that I need to use XML to do this, and have tried it using Cuccureddu's tips from this thread http://forum.xda-developers.com/show....php?p=1227587 (using provxml) and also tried from _setup.xml in a CAB file: I receive an error saying "Installation of wifi.cab was unsuccessful".
I've tried this with Wifi enabled and Wifi disabled, btw...
How I did it:
- Created a file in Notepad with all my settings, as follows - I went to the MSDN pages as mentioned in cuccureddu's post, as my network uses WEP:
<wap-provisioningdoc>
<characteristic type="CM_WiFiEntries">
<characteristic type="My_SSID">
<parm name="DestID" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
</characteristic>
</characteristic>
<characteristic type="Wi-Fi">
<characteristic type="access-point">
<characteristic type="My_SSID">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
<parm name="Encryption" value="4"/>
<parm name="Authentication" value="4"/>
<parm name="NetworkKey" value="My_Network_Key"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Made the cab in the following ways:
1. As stated in the linked post, using .provxml.xml and the MakeCab.exe from Windows XP (with .provxml.xml saved as UTF-8, then Unicode - as another post indicated it should be saved as UTF-8(?!?)).
2. As above, saving .provxml.xml both as UTF-8 and then Unicode, but using the MakeCab.exe from the WM5 SDK.
Makecab.exe /D COMPRESS=OFF .provxml.xml wifi.cab
Note: I transferred the file in all above cases over ActiveSync to my Storage Card, which is where it was run from.
Hmmm...
So, I'm a little stuck... does anybody have any ideas, or want further info?
TIA for any help you can give...
rename your provxml to _setup.xml, then do:
makecab _setup.xml WifiSettings.CAB /v3
Still doesn't work, always give me the following error: "Installation of wifi.cab was unsuccessful". Can someone send me one that is working and let me try it and see if my device is flakey?
Got the same issue, i never get it to work, would be very pleased if this is fixable.
I am using Wifiprofiles app to create diffrent profiles. Once I am in a diffrent wifi network I simply change the profile and my new settings gets applied.
And it supports profile export and import.
<wap-provisioningdoc>
<characteristic type="CM_WiFiEntries">
<characteristic type="YOUR SSID">
<parm name="DestID" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
</characteristic>
</characteristic>
<characteristic type="Wi-Fi">
<characteristic type="access-point">
<characteristic type="YOUR SSID">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
<parm name="Encryption" value="0"/>
<parm name="Authentication" value="0"/>
<parm name="Hidden" value="0"/>
<parm name="KeyProvided" value="0"/>
<parm name="NetworkKey" value="YOUR NETWORK KEY"/>
<parm name="KeyIndex" value="1"/>
<parm name="Use8021x" value="0"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Save as "_setup.xml"
from the dos prompt type...
makecab /D compress=off _setup.xml WiFi.cab
this just worked for me...
Rick
Hello,
Sorry for refreshing an old topic but I would like to refer to the tutorial posted above. I finally managed to build a cab with my WiFi settings which would install on PDA without problems, but only if I install one network at a time.
What if I would like to restore several WiFi networks. Can it be done with one cab = one provisioning xml only?
I tried several ways (the simpliest was to add particular lines of code one network after another - of course I put everything between the <wap-provisioningdoc></wap-provisioningdoc>) but I can't get the networks to work. The cab says that the installation was unsuccessful and after that both networks are present in the network settings, but without the WPA keys. If only one network is in one cab, then whole configuration is restored without any problem.
Did somebody of you guys managed to find a way to add more configuration options to one working provxml? I wish I could make one cab file with one _setup.xml inside consisting of all my settings for registry, WiFi, e-mail accounts and some other? Or it is better (and/or safer) to make separate cabs (or xmls) for each kind of setting (including separate WiFis)?
TIA for a bit of an explanation...
Best Regards
Skrobel
rjh1 said:
<wap-provisioningdoc>
<characteristic type="CM_WiFiEntries">
<characteristic type="YOUR SSID">
<parm name="DestID" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
</characteristic>
</characteristic>
<characteristic type="Wi-Fi">
<characteristic type="access-point">
<characteristic type="YOUR SSID">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
<parm name="Encryption" value="0"/>
<parm name="Authentication" value="0"/>
<parm name="Hidden" value="0"/>
<parm name="KeyProvided" value="0"/>
<parm name="NetworkKey" value="YOUR NETWORK KEY"/>
<parm name="KeyIndex" value="1"/>
<parm name="Use8021x" value="0"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Save as "_setup.xml"
from the dos prompt type...
makecab /D compress=off _setup.xml WiFi.cab
this just worked for me...
Rick
Click to expand...
Click to collapse
Thank you. My headache has subsided.

DMProcessConfigXML

Would anyone have a executable that utilizes DMProcessConfigXML to set Security Policy to 1 or 2
ie
<wap-provisioningdoc>
<characteristic type="SecurityPolicy">
<parm name="4097" value="1"/>
</characteristic>
</wap-provisioningdoc>
Thanks in advance

[Q] Help needed for creating XML file for provisioning settings om PDA's

Hello XDA-developers...
I work for at public administration in Denmark.
We would like to put mobile settings on our devices through a SMS/GPRS gateway.
I have tried to "compose" XML files for setting up the APN-settings on some devices, but this has not been working.
Right now i am testing on at SonyEricsson X10 Mini, but we also have a lot of different Windows Mobile devices.
Could anyone help me with "cracking the code"..?
I have tried to use these XML settings for setting up the phone, but the Phone will not accept the settings.:
-------------------------------
- <wap-provisioningdoc>
- <characteristic type="BOOTSTRAP">
<parm name="NAME" value="SecureMobil" />
</characteristic>
- <characteristic type="NAPDEF">
<parm name="NAME" value="SecureMobil" />
<parm name="NAPID" value="SecureMobil_NAPID" />
<parm name="BEARER" value="GSM-GPRS" />
<parm name="NAP-ADDRESS" value="CITYNAME.DK1.TDC" />
<parm name="NAP-ADDRTYPE" value="APN" />
<parm name="INTERNET" />
</characteristic>
</wap-provisioningdoc>
------------------------
Would like to hear if anyone can help and would also like to hear about where to find information about the "right code settings" for both Android, WM and Iphone family of Phones.
Kind regards.
RAsmus C., Denmark

Troubles with CM_Planner / PreferredConnections (wapprov)

Hello, i cannot figure out why this isn't working :
I've created a wap-prov XML (and it is working... mostly !) to configure connections, it looks like this :
Code:
<wap-provisioningdoc>
<characteristic type="CM_Networks">
<characteristic type="MyCorporateCnx">
<parm name="DestId" value="{D4C3F5C3-D005-B600-FE80-492A450DA5C9}"/>
<parm name="Secure" value="0"/>
<parm name="ReadOnly" value="0"/>
</characteristic>
</characteristic>
<characteristic type="CM_GPRSEntries">
<characteristic type="CnxCorp">
(Skipping all the GPRS parm part, which is working so far!)
</characteristic>
</characteristic>
<characteristic type="CM_ProxyEntries">
<characteristic type="HTTP-{D4C3F5C3-D005-B600-FE80-492A450DA5C9}">
(Skipping all the Proxy parm part, which is working so far!)
</characteristic>
</characteristic>
<characteristic type="CM_Planner">
<parm name="RetryCount" value="3"/>
<parm name="CacheTime" value="600"/>
<parm name="CoeffLatency" value="65536"/>
<parm name="CoeffCost" value="65536"/>
<parm name="CoeffBandwidth" value="65536"/>
<parm name="VPNCacheTime" value="60"/>
<nocharacteristic type="PreferredConnections"/>
<characteristic type="PreferredConnections">
<parm name="{436EF144-B4FB-4863-A041-8F905A62C572}" value="MyCorporateCnx"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
- I tested the XML with RapiConfig.exe, then i've created a .CAB with it.
- In both cases, the connections are properly configured (it's the working part)
- BUT the default Internet connection is still set to its previous value (should be "MyCorporateCnx" instead)
I also tried to replace the name of the cnx with its ID :
Code:
<nocharacteristic type="PreferredConnections"/>
<characteristic type="PreferredConnections">
<parm name="{436EF144-B4FB-4863-A041-8F905A62C572}" value="{D4C3F5C3-D005-B600-FE80-492A450DA5C9}"/>
</characteristic>
</characteristic>
And it dosesn't work either.
Any ideas would be welcome !
(Tested it on my non-modded HTC Touch Pro 2)
Answering to my own question
My XML adds ONE new connection (including GPRS & PROXY related config) to the existing device config.
That means that, unless i deactivate the former default connection, it will remains as default, even with the CM_Planner stuff in my XML.
After a few tests, i've found out a way to deactivate the former default connection : change its proxy "Enable" state from 1 to 0.
So i've added this to my XML :
Code:
<characteristic type="CM_ProxyEntries">
<characteristic type="HTTP-{FF445A54-ADF8-4fab-86B7-E31482BEE8BE}">
<parm name="Enable" value="0"/>
</characteristic>
</characteristic>
(HTTP-{FF445A54-ADF8-4fab-86B7-E31482BEE8BE} is the former default connection proxy)
Now that my XML sets it to 0, i have the good (newly added) connection as default.
I'm a bit disapointed because i wanted to use only one XML for several HTC devices (Pro 2, Touch 2...) Adding a new connection sounded like OK, but modifying an existing one will raise a compatibility issue (i guess), since nothing can garantee that HTTP-{FF445A54-ADF8-4fab-86B7-E31482BEE8BE} will exists on the other devices...
Hello,
I noticed that when you provision the preferred connection, it is not shown in the settings->connection>advanced->select networks screen until you:
1- open that screen, not change a single thing (so the wrong default connection is selected)
2- click on 'ok'
3- reopen the screen, now the correct default connection is showed.
I am going to look further into this...
Regards,
Ernstjan

Categories

Resources