06-14-2012 02:17 AM
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.
Solved! Go to Solution.
06-15-2012 03:27 AM
06-15-2012 09:57 AM
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.
06-15-2012 10:11 AM
Seems like everyone has an issue with this thing - too many moving parts.
How did you set up the ports?
See this thread:
06-15-2012 10:15 AM
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 "22.214.171.124". 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 126.96.36.199 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.