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
Regular Contributor
juszczec2
Posts: 59
Registered: ‎05-10-2012
My Device: 8800
My Carrier: verizon

direct socket connection question

Hi folks

 

This is a bit puzzling.  I am doing development in a Win 7 64 bit virtual machine running in VMware Fusion 4.something on a 64 bit Mac running OS X 10.7 

 

In the Win 7 vm I've installed

 

java 7 (64 bit)

Eclipse (3.7 64 bit)

BlackBerry JDE Eclipse plugins for 4.5 thru 7.1 and the bundled simulators

 

I've got some code I've compiled again BlackBerry OS 4.5 and I'm running it in the simulator started from Eclipse in the Win 7 vm I described.

 

I've got some code that's supposed to make a direct socket and send/receive character strings (not HTTP) to/from a server.

 

I'm able to create the connection successfully and  a server side guy has read the logs and verified that the server recognizes me.  However, the server never receives the message I send.

 

And that's where I'm stuck.  I have verified the code is following the BlackBerry direct socket connection rules.  I've downloaded the Network Diagnostics code and compiled/run it from the simulator and everything works fine.  

 

When I modify the Network Diagnostic's direct socket test to hit my server I get the same results:  successful connection and then no receipt of my send

At the server guy's suggestion, I hooked up WireShark to look at the traffic in/out of my Win 7 vm when I try to hit my server via my code in the simulator.

 

I see the connection get made and then I get about 97 messages that look like:

 

 Header checksum: 0x0000 [incorrect, should be 0xe5c8 (maybe caused by "IP checksum offload"?)]

 

I'm NOT a network guy and this is my first foray into BlackBerry network communication, so I'm a bit unsure as to what could be causing these messages.  

 

Is it something related to the simulator?

I have verified the Win 7 vm itself has network access by pinging the server I'm trying to access. 

 

Any suggestion/advice and I'll gladly email you a beer ;-)

 

Mark

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: direct socket connection question

[ Edited ]

"ll gladly email you a beer ;-)"

 

I was excited for a second, and then I thought about it.  A beer by email.  Don't think it works....  :smileysad:

 

Anyway,first thing I wold do is installt he SocketDemo and test it.  The connection is established between a Java program running on your WIn 7 system, and the SImualtor. So basically this is going from the Simualtor to the Win 7 system running the Simualtor.  That will test that things are getting out of the BlackBerry. 

 

Next stage is to get your Socket app talking to the Java SocketDemo Server.  You will find thhe demo s very easy to change, it is about 20 lines of code.  The idea here is not get a detailed communication, just get the two ends communicating something.  That tests your app.

 

Then I would look to telnet to see if you can do something from your Win 7 system to the Server.  Whether this works or not will depend on a range of things that I for one don't really understand.  But I have had some success in testing connections using it.  So that might test your Win 7 to Server communication. 

 

After that, don't know.....

 

Just one thing though.  I'm not a Win 7 user or Eclipse user but I thought even on 64 bit WIn 7, you needed a 32 bit Java and 32 bit Eclipse installed. 

 

See here:

http://supportforums.blackberry.com/t5/Java-Development/Supported-versions-of-Java-for-different-Bla...

 

So perhaps that is the first place to start.  Swap out the Eclipse and Java and swap in 32 bit versions of same. 

 

Let us know.....

 

Edit:

 

And welcome to the forum!

Please use plain text.
Regular Contributor
juszczec2
Posts: 59
Registered: ‎05-10-2012
My Device: 8800
My Carrier: verizon

Re: direct socket connection question

I have followed your suggestions.

 

I've gotten to the point where my Socket app will communicate with the SocketDemo server.

 

I think its safe to say everything in my Win 7 vm - java & Eclipse versions (I switched to 32 bit for both) + simulators + communication between the Socket app and SocketDemo server running in this env - is ok.

 

I"ll have to wait until the morning to talk to my co-worker about the results of my attempting to telnet to the server.

 

Mark

Please use plain text.