Tag Archive | "modem"

Tags: , , , , ,

Creating a Cellular Line (GPRS) Modem from code

Posted on 11 March 2010 by Alexander Viken

Here’s a code snippet i just found really usefull. I was getting 20 MC75 pda’s ready for a customer pilot project and we’ve developed a solution but hadn’t design any deployment system for getting the devices ready, so it was all manual work.

The solution uses the network through GPRS/Edge and each of the devices needed to have a cellular (GPRS) Line modem connection defined. Doing this on 20 devices by browsing to Settings -> Connections -> Add new modem connection, then add the same data for APN, username, password was just to much of a pain.

An easier way of doing this is to use the ConfigurationManager, found in the Microsoft.WindowsMobile.Configuration namespace. My purpose was to just make sure there was a cellular modem connection defined  with a working configuration. I wanted this to be the first to be done, and i wanted this to be re-run at application launch each time to reset any “mis”-configuration done by end users thorough the pilot period.

Firstly i defined a method that would give me a string with xml data. – This could also have been done a bit more elegantly or smooth, but it works for me this way. Continue Reading

Comments (0)

About the author, Alexander Viken
Working as Chief Mobility Consultant at Creuna Norway. I received MSFT MVP for Device Application Development in June 2010 and are interested in mobility trends, the market, technology, software development for Windows Phone, iOS and Android mostly, but not exclusively. Scrum master that fights to keep it lean.
Advertise Here

Me on Twitter