How setup Cellular Line (GPRS) modem by visual C#

Hi,

May I ask, How can I setup a new connection for GPRS on a windows mobile 5.0 PPC by visual C#.

Actually, Before I start any application in the PPC to communicate the web, I set up a connection manually:

Start_Settings_Connections_Add a new modem connection_My Connection_Cellular Line (GPRS)_....

I want to do it automaticaly on each Hard-reset.

What is your suggestion

Thanks



Answer this question

How setup Cellular Line (GPRS) modem by visual C#

  • Naheem

    I used:
    result = DMProcessConfigXML( xml, (uint)flag, out xmlOutPtr );
    and "result" shows this number:2147500037 as an ERROR.

    The flag was: ConfigFlag.Process


  • Ankini

    The easiest way would be to use configuration xml packaged as CPF file and launch wceload to install it. See here and here

  • jods

    How can I set up a connection and not start it

    Please


  • Blipwort

    I made a cpf file as below XML and run on the device, but nothing happened:

    Do you know what is the problem Please

    <characteristic type="CM_GPRSEntries">
    <characteristic type="My GPRS">
    <parm name="DestId" value="{ADB0B001-10B5-3F39-27C6-9742E785FCD4}" />
    <parm name="UserName" value="***" />
    <parm name="Password" value="***" />
    <parm name="Domain" value="" />

    <characteristic type="DevSpecificCellular">
    <parm name="GPRSInfoValid" value="1" />
    <parm name="GPRSInfoAccessPointName" value="internet.com" />
    </characteristic>
    </characteristic>
    </characteristic>


  • colindyck

    I got it. Thanks.

    I changed the code as bellow with extra <wap-provisioningdoc> tags then have made cpf file and everything works fine:

    <wap-provisioningdoc>
    <characteristic type="CM_GPRSEntries">
    <characteristic type="GPRS1">
    <parm name="DestId" value="{ADB0B001-10B5-3F39-27C6-9742E785FCD4}" />
    <parm name="UserName" value="***" />
    <parm name="Password" value="***" />
    <parm name="Domain" value="" />
    <characteristic type="DevSpecificCellular">
    <parm name="GPRSInfoValid" value="1" />
    <parm name="GPRSInfoAccessPointName" value="internet.com" />
    </characteristic>
    </characteristic>
    </characteristic>
    </wap-provisioningdoc>


  • BuNnY_MoOn

    Here it is:

    string xmlQuery=

    "<characteristic type=\"CM_GPRSEntries\">"+

    "<characteristic type=\"My GPRS\">"+

    "<parm name=\"DestId\" value=\"{ADB0B001-10B5-3F39-27C6-9742E785FCD4}\" />"+

    "<parm name=\"UserName\" value=\"***\" />"+

    "<parm name=\"Password\" value=\"***\" />"+

    "<parm name=\"Domain\" value=\"\" />"+

    "<characteristic type=\"DevSpecificCellular\">"+

    "<parm name=\"GPRSInfoValid\" value=\"1\" />"+

    "<parm name=\"GPRSInfoAccessPointName\" value=\"internet.com\" />"+

    "</characteristic>"+

    "</characteristic>"+

    "</characteristic>";


  • Syed Atheeque Pasha

    I am waiting for anu help....
  • cgraus

    You have to use ConfigurationManager.ProcessConfiguration(regularXMLDoc, false). It is the laternative in C#.

    I managed to use it with the same XML and it works.

    I have one question : after adding more then one connection to GRPS, you can see there also "auto pick". Do you knw what XML tag to use in order to make the new added connection the one that will be used

    thanks


  • faith2006

    This is a generic error code. Can I see the XML you used

  • Steve1999

    Hi I am not sure how to use DMProcessConfigXML in C#. (Ive been using C++) a sample code illustrating the use of DMProcessConfigXML should be useful.

    Thanks much.

    cna you email it to sundmah@gmail.com



  • Maxwellvz

    What was the error

  • QWERTYtech

    Thanks - As you said, I have started with XML. I wrote a C# program and XML query to setup a connection with DMProcessConfigXML , but I got an Error and no any connection established.
  • How setup Cellular Line (GPRS) modem by visual C#