Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers
Accepted Solution

MDS Simulator and Win7

Hi All,

 

I'm trying to do a push to the BB following the httppushdemo application.  I've followed the instructions by allowing port 100 in the "rimpublic.property" file.  The part where you need the BB simulator to access the web browser first is straight forward, but the problem is that the MDS simulator is doing nothing when accessing a website with the BB browser.  I am getting a web page.  I know the MDS simulator should be doing something because it does so on a WinXP machine.  The Win7 machine seams like it bypasses the MDS simulator to access website with the BB simulator.

 

Has anyone experienced this? According to the instructions the reason for accessing the BB browser with the MDS simulator running is:

 

 

"Note: Steps 5 through 7 (retrieving a web page via the MDS Simulator) are required to

ensure application-level reliability of push data delivery.  Before the MDS Simulator

can properly deliver push data with application acknowledgement, it must determine

whether application-level reliability is supported by the BlackBerry Simulator.  This

is accomplished by using the BlackBerry Simulator to retrieve a web page via the MDS

Simulator."

 

I have also tried making an http connection in code, but it does not seem to help.

 

Does anyone know how to get the BB browser to access the MDS simulator when browsing to a website using Win7?  Is there a setting I need to change in the "rimpublic.property" file?  Is this a RIM issue? WinXP works fine, Win7 does not.

 

Any help would be appreciated.

Note: Steps 5 through 7 (retrieving a web page via the MDS Simulator) are required to
re application-level reliability of push data delivery.  Before the MDS Simulat
can properly deliver push data with application acknowledgement, it must determine
whether application-level reliability is supported by the BlackBerry Simulator.  This
is accomplished by using the BlackBerry Simulator to retrieve a web page via the MDS
Simulator.Note: Steps 5 through 7 (retrieving a web page via the MDS Simulator) are required toensure application-level reliability of push data delivery.  Before the MDS Simulatorcan properly deliver push data with application acknowledgement, it must determinewhether application-level reliability is supported by the BlackBerry Simulator.  Thisis accomplished by using the BlackBerry Simulator to retrieve a web page via the MDSSimulator.
Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers

Re: MDS Simulator and Win7

Update

 

According to this RIM article if the MDS Simulator is not running I should not get a website to load via the BB Simulator.  In my Win7 environment without the MDS Simulator running, I can get a website to load in the BB Simulator.  This confirms that the BB Simulator is not using the MDS Simulator to get it's internet connection.

 

So how do I get the BB Simulator to use the MDS Simulator, so I can get my push to work properly?

Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers

Re: MDS Simulator and Win7

Another Update

 

I might have jumped the gun on the last post.  The MDS simulator was not running and I could access a web page, so I made the previous post.  Well after rebooting and trying it again I could not get a web page to load until I ran the MDS simulator.  I'm not sure why it worked without the MDS simulator running.

 

On Sunday I did get the push service to work after removing code from the httppushdemo to get a return response from the push side.  So I did have success BUT the push service was inconsistent.  What I mean is that when I pushed a message I could receive it on the BB anywhere from a couple of seconds to 8 minutes later and sometimes not at all. Very Very inconsistent and not an environment I want to work in. So...

 

So I decided to try another route.  I installed Windows XP Mode on my Win 7 machine.  This is WinXP virtualized in Win7.  I am please to say that this works although a little sluggish at times.  If anyone tries this and wants to keep their code on the Win7 documents area make sure to map your own network drive.  So share your Win7 documents area.  Load up the WinXP Mode (virtualized WinXP) and then map a drive to the documents in Win7.  Win7 does mapping on it's own, but it does not work well with Eclipse for sure.  It locked Eclipse in the WinXP side and I lost some of my code.  Good thing I had a backup.  When I created my own mapped drive thing have been working very well.  Also a couple other things to note.  Increase the amount of memory WinXP uses for virtualization.  It starts with 512mb.  I bumped mine up to 1500mb.  Also on the network controller for WinXP make sure to change it from NAT to your actual Network card.  This will allow it to function as an independent machine on your network.  If you don't change the network card setting you won't be able to access the WinXP virtual OS from any other computer.

 

Well a little off topic, but I hope this helps anyone else who goes down the Win7 path.

 

If anyone figures out how to get the Win7 and MDS Simulator to work together properly, please let me know.

Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
New Developer
Posts: 14
Registered: ‎07-30-2009
My Device: BB 8820 - BB Bold 9700

Re: MDS Simulator and Win7

1. Win 7 is not supported officially by RIM so far, thus the simulator may not work properly on Win7. You can try to use Virtual Box (http://www.virtualbox.org/) to setup a virtual Win XP to develop BB application.

2. BB Push working on real device only thus you could not try it on your simulator. Please try to install the sample into device, and push sample into your server in other to test.

--
pKt
Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers

Re: MDS Simulator and Win7

Hi tisum,

 

Thanks for your response.

 

I thought of using Virtual Box to setup a virtual WinXP environment and decided to first try using Win7 built in Windows XP Mode (WinXP virtualizaiton).  This is working good so far.  When I'm in WinXP I have had success with pushing to BB from .Net (C#) with my app.

 

Again thanks for you input.

Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
Highlighted
Developer
Posts: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Re: MDS Simulator and Win7

In order to run the MDS simulator on Windows 7, please open the start menu, type cmd (do NOT press enter), right click cmd.exe in the list and select to run as administrator.

 

Allow the following UAC window, you will then get the cmd window.

 

Then navigate to the MDS Path (for example with):

 

cd "C:\Program Files (x86)\Research in Motion\BlackBerry Email and MDS Services Simulators 4.1.4\MDS"

 

or on non x64 operating systems by:

 

cd "C:\Program Files\Research in Motion\BlackBerry Email and MDS Services Simulators 4.1.4\MDS"

 

 

Then type run.bat

 

A new cmd window will open and output some messages.

 

If everything runs correct, you should see some messages like "Web Server Started" and "The push service is ready to receive requests"

 

 

Please notice that it works not if you right click run.bat in the explorer and run it with administrative rights.

It must be done like this via cmd.

 

 

Best regards,

 

Bullety

Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers

Re: MDS Simulator and Win7

Hi Bullety,

 

I gave your suggestion a try and came to the same results.  Yes I can get the push service to work, but it takes several minutes for the push to get to the BlackBerry simulator.  After the MDS service is started and the BlackBerry Simulator is started, I go to the BlackBerry browser and open a web page.  During the opening of the web page the MDS simulator on WinXP is busy scrolling messages in the cmd window.  In Win7 there is no activity in the MDS simulator cmd window.  I think this is why the push to the BlackBerry simulator is so slow.  I think the BlackBerry is not making it self known to the MDS simulator properly.

 

I appreciate your assistance.  BTW are you running Win7?

Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
Developer
Posts: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Re: MDS Simulator and Win7

Dear Brian,

 

Yes, I am running Windows 7 x64.

 

If I open a browser page, there are many many lines which scroll through the cmd window - so everything is working fine here with the steps I wrote you.

 

 

Best regards,

 

Bullety

Developer
Posts: 67
Registered: ‎09-01-2009
My Device: Blackberry 9000 Bold
My Carrier: Rogers

Re: MDS Simulator and Win7

Hi Bullety,

 

I'm running Win7, but it's the 32bit operating system.  I wonder if that is the problem?  Not sure.

Thanks, Brian
--------------------------------------------------------------------------------------
To error is human, but to really mess things up requires admin rights.

If this post has helped, don't be shy and click the kudo's star !!!
Developer
Posts: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Re: MDS Simulator and Win7

I don't think so, all RIM software has more problems with 64 bit software than the 32 bit software.

 

Did you exactly follow my steps?

 

And it works but is only slow?