Iam trying to connect to my server and send data, but each time when i connect to server iam getting java.net.SocketTimeoutException: Read timed out exception in servlet.
Iam using GPRS and iam trying to connect to a server running in a public IP address on a port(8899).
Iam using the code to choose the access point programatically, will this always work. coz i have around 5 access points in my device and i will be able to connect through only one out of it.
It should work, as long as you select a valid access point you know works (try using a web browser on the phone to determin if you can get net access with that access point - if that works, so should your app).
Make sure you can also get an incomming connection to your server on port 8899 from another machine on the net - i.e. make sure no firewalls etc are blocking incomming 8899 to your server.
The one thing I often see with this is operators blocking certian ports on their networks. If you still can't get it to work, try changing your server to listen on port 80, and change the handset software to connect on 80. If this works, your operator is blocking outgoing 8899, and your only option is to change port/operator.
Forum posts: 1379
On what port are you trying to connect?
Over what data bearer (GPRS, GSM data etc etc)?
didster
Forum posts: 45
Iam using GPRS and iam trying to connect to a server running in a public IP address on a port(8899).
Iam using the code to choose the access point programatically, will this always work. coz i have around 5 access points in my device and i will be able to connect through only one out of it.
Forum posts: 1379
Make sure you can also get an incomming connection to your server on port 8899 from another machine on the net - i.e. make sure no firewalls etc are blocking incomming 8899 to your server.
The one thing I often see with this is operators blocking certian ports on their networks. If you still can't get it to work, try changing your server to listen on port 80, and change the handset software to connect on 80. If this works, your operator is blocking outgoing 8899, and your only option is to change port/operator.
didster