Thursday, November 5, 2009

Blackberry - How To : Solving the "Unable to Connect to the MDS Simulator Service" problem

I am back, after a loooooong time!! Let me get in to the post directly instead of unnecessary ramblings. I am working a mobile .Net web application and had to test the same in a Blackberry Simulator. The first time I started trying out, it was a breeze, the page opened up and I was able to browse the web site. But the next time I fired up my browser from the simulator, nothing seemed to work. I was getting the following error every time I fired up my brower (obviously my MDS was up and running :D ):

"Unable to connect to the selected mobile data service..."

I tried in vain to solve this problem by various means, but nothing seemed to work (lucky me!!).

Anyways, let me get to the solution part directly ;)

Say, you are running the 9530 simulator (BB JDE version 4.7.0). Open the "9530.bat" file that launches the 9530 version of the simulator. These batch file(s) would be located in application directory's simulator folder or in the directory where you installed the simulator. Open up this file in notepad

e.g.

@echo off
fledge.exe /app=Jvm.dll /handheld=9530 /session=9530 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9530.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A

Add the attribute /clear-flash after /pin=0x2100000A (i.e. towards the end of the file). So the modifed batch file would look like:

@echo off
fledge.exe /app=Jvm.dll /handheld=9530 /session=9530 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9530.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A /clear-flash


Now try launching the simulator and you should not be facing this problem again!!!

Let me tell you that this is just a temporary solution and I would be on the look out to find a concrete solution to this problem!

Happy coding ;)

2 comments:

IconFX said...

thanks, this work great!!!
how did you get to this solution??

Karthik said...

You are welcome! It did take a long time to figure this out! Some user had posted a question and in that question I found this solution...!