views:

1248

answers:

1

Hi,

I am testing a simple socket program which connects to a server in local area network. I am using Blackberry Pearl 8100 simulator to test this.Also tested on 8900 simulator. But did not work on either.

The error is displayed as :

java.io.IOException: General socket error

Is it that networking programs cannot be tested on simulators? Also, Any solution for this exception?

Please help.

Thanks.

A: 

There are a number of issues that can crop up with networking programs on the Simulator and the actual units as well. Can you post a code segment? Are you starting the MDS simulator before the Blackberry simulator?

Richard
Whenever I run Blackberry simulator + MDS , there is conflict in ports.MDS simulator's console print error as port already in use.Where to resolve this conflict?Regarding socket connection,do I need to do any specific settings on simulator?On some forums I read about APN needs to be specified.Is it so? What is APN in case of simulator connecting to a network server?Please help.
imMobile
The program I am trying to run is socketdemo from RIM sample examples.
imMobile
To resolve the port conflict you must either change the port the MDS simulator is using (see the documentation) or terminate/change the other program that is using the same port. If I recall correctly the MDS simulator uses 8080. APN shouldn't be needed for the simulator.
Richard
I removed "deviceside=true" property from the url,it worked fine on simulator.Will this also work well on real device? I dont have device to test right now.
imMobile
deviceside=true indicates that you want to use direct tcp access (via the carriers APN. Removing it will cause the device to use the BES/Unite/BIS connections (if available) in that priority order.
Richard