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

Java Development

Reply
New Contributor
will777
Posts: 6
Registered: ‎12-14-2011
My Device: Non-BB user
My Carrier: N/A
Accepted Solution

Issues with SmsDemo

Hi,

 

I am trying to get SmsDemo working.

 

I imported the SmsDemo sample and I have the server component, SmsServer. I run the server component but the messages I send from the SmsDemo application have no effect - I see nothing arriving at the SmsServer application. I have disabled the Windows firewall with no effect.

 

I've also tried running two emulator instances, from different working directories, with the source and destination ports cross mapped as suggested. I can see UDP listening ports when I netstat but no messages ever arrive at the other emulator when I try and send from the SMSDemo application.

 

There is no documentation actually describing what you need to do to get this sample running - I'm at a loss trying to figure out how to remedy this situation.

 

1. Do I need to set the arguments for sms source and destination port on the emulator?

2. Must I set anything in the SmsServer application to match port information in the client application?

3. Must the MDS simulator be running for this to work?

4. Can I simulate a device sending SMS's to the emulator by running a normal J2SE application and using datagrams as the SmsServer application does?

 

Any help would be greatly appreciated.

 

Will

Please use plain text.
New Contributor
will777
Posts: 6
Registered: ‎12-14-2011
My Device: Non-BB user
My Carrier: N/A

Re: Issues with SmsDemo

I used Wireshark to sniff the UDP traffic. I see that the destination address of the UDP packet is addressed to 1.0.0.127 - could this be the reason why the SMS never arrives at the other emulator?
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Issues with SmsDemo

Did you search the forum for SMSDemo?

 

Seems to me that this has been discussed multiple times.

 

Please use plain text.
New Contributor
will777
Posts: 6
Registered: ‎12-14-2011
My Device: Non-BB user
My Carrier: N/A

Re: Issues with SmsDemo

Yes, obviously.

 

I have searched this forum, and Stackoverflow, and read every single post I could find on the subject.

 

Also, many people have experienced issues with this specific demo app.

 

I find it shocking that Blackberry would not have an easier way of sending SMS messages to the emulator - Andoid has a emulator control built into Eclipse.

 

 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Issues with SmsDemo

Seems like everyone has an issue with this thing - too many moving parts.

 

How did you set up the ports?

 

See this thread:

 

http://supportforums.blackberry.com/t5/Java-Development/Receiving-SMS-messages-on-simulator/td-p/525...

Please use plain text.
New Contributor
will777
Posts: 6
Registered: ‎12-14-2011
My Device: Non-BB user
My Carrier: N/A

Re: Issues with SmsDemo

I have finally found a solution for the problem. Here it is:

 

Using Wireshark to sniff the UDP broadcast from the emulator I noticed that the destination address is incorrect - its "1.0.0.127". This address is not routable so the datagram sent from the one emulator will never reach the other emulator.

 

I might have missed it but I cannot see any command line argument to set when launching the emulator to specify the destination address.

 

I changed my development laptop to use a  hard-coded IP address instead of DHCP. I then added 1.0.0.127 as another IP address to my TCP/IP settings. The address is now routable.

 

Restarted both emulators with no changes to the port settings (/sms-source-port and /sms-destination-port still cross-mapped appropriately) and it worked fine. I did not need to use the SMSDemo application. I used the normal Blackberry messaging application.

 

I hope this helps others experiencing this same problem.

Please use plain text.
New Contributor
will777
Posts: 6
Registered: ‎12-14-2011
My Device: Non-BB user
My Carrier: N/A

Re: Issues with SmsDemo

RexDoug:

Thanks for the thread but I have found the issue. I set the ports from the command line and launch the emulators using batch files.
Please use plain text.