I am using RIM6710 device ;T mobile is GPRS carrier provider and having Blackberry unlimited data plan ( $ 39.99).I do not have BES or MDS installed anywhere.I am trying J2ME UDP connectivity on this device.
I wrote J2ME udp client which will send message to UDP server hosted on remote machine 206.XXX.XXX.XX on port 5029 no issue of firewall or DMZ or UDP server because I tested UDP server by sending message from Plain Java Client application using internet connection.
Following is midlets code snippet which create UDP socket to send message.
Code:
String address = "udpxxx58;//206.XXX.XXX.XXxxx58;5029;6343/wap.voicestream.com";
try xxx123;
dc = xxx40;DatagramConnectionxxx41; Connector.openxxx40;addressxxx41;;
sendDatagram = dc.newDatagramxxx40;
dc.getMaximumLengthxxx40;xxx41;, addressxxx41;;
receiveDatagram = dc.newDatagramxxx40;dc.getMaximumLengthxxx40;xxx41;xxx41;;
xxx125; xxxxxxxxxxx
Xxxxxxxxxxxx
Xxxxxxxxxx
I am expecting this code to send message to udp server on remote UDPO server and get response back on RIM device.
Now first question is.
Is it the connection string is correct??
"udp://206.XXX.XXX.XX:5029;6343/wap.voicestream.com";
Also I am not sure about “6343” this I just added as a place holder; as I got this connection format from JDE documents. So I am not sure How I can get response back on the device? On which port? on which IP?
I read somewhere that it not possible to get response back on device because device has no IP so RIM uses device PIN to identify device and communicate.
But in my case I can not send message also.I tried APN as “/blackberry.net “ but same issue.
One more important as in J2ME docs they use
“datagram://206.XXX.XXX.XX:5029” while creating the connection so when I use
“datagram://206.XXX.XXX.XX:5029;6343/wap.voicestream.com"; in my client application my application allows me to type message but it never reaches to server.
But when I use “udp://206.XXX.XXX.XX:5029;6343/wap.voicestream.com" in connection string ;in this case when I try to open the application on my BB it completely freeze the device. Any one know why?????????
Questions in my Mind now is this application possible on 6710
Is there any device constraints?
Is there any Carrier Constraints?
Where is the Problem??
-Dev2100
[Edited by Mark Rejhon: Added CODE tags for formatting source code]