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
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

General Socket Error/ Bypass "MDS/BES"

Hi,

I am using "wifi" as preferrred mode of transport for sockets.

using connectionstring as follow

 

(StreamConnection) Connector.open("socket://10.105.69.94:1494;interface=wifi",Connector.READ_WRITE);

 it is able to write some data to socket but after few secs this IOException "java.io.IOException: General socket error".

 

If i  use MDS with connection string as follow:

 

(StreamConnection) Connector.open("socket://10.105.69.94:1494;deviceside=false",Connector.READ_WRITE);

it works great.

But I want to use only wifi bypassing "MDS/BES" which exists in between.

Can anybody suggest what could be done?

 

 

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
ShannyMan
Posts: 22
Registered: ‎05-04-2009
My Device: Bold 9930
My Carrier: Verizon

Re: General Socket Error/ Bypass "MDS/BES"

Can you use both interface=wifi;deviceside=true ?

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

Re: General Socket Error/ Bypass "MDS/BES"

deviceside=true is not needed with interface=wifi.

 

Do you have access to that IP address via the WiFi network?  Given the 10.... IP Address, I presume that you are attempting to access on of your company's server.  Going via the BES you will be inside your company's firewall.  The WiFi network you are on might not be.

Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: General Socket Error/ Bypass "MDS/BES"

Yes I am able to reach that local ip address via WiFi as its inside our wireless LAN. I have made successfull HTTP connection

to it using (HttpConnection)Connector.open and it works perfectly fine over WiFi. But this problem comes in raw TCP sockets.

Any Idea what could be the reason ?

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: General Socket Error/ Bypass "MDS/BES"

Sorry no idea, I use socket connections over WiFi no problem at all on all the devices I have tested.  What device are you using?  What size data are you attempting to send at a time?  What OS level are you developing and and what OS Level is on the device.  Can you try using WiFi on the Simulator to see if there is a problem using that.

 

You will information on using WiFi on the Simulator in this post:

 

What can you do in the Simulator

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=29107#M29107

 

Actually one thought, I wonder if this is split pipe exception.  Need to think about that.

 

Can you look at the log at the time you get the exception and tell us what log entries you see immediately preceding it?

Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: General Socket Error/ Bypass "MDS/BES"

Hey peter,

I tried that wifi  on simulator thing its working perfectly fine on simulator.

Its on the device that error is coming. I will post more details on traffic and logs soon.

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.