Keeping Wireless Connection alive

Hi all!

We're trying to build an midp on a nokia E65. This application can later be triggered to build up a sip connection to a "normal pc".

Problem is, the E65 disconnects from the access point, as soon as the connection is unused. So we can't build up a socket connection from the pc to the phone, because it's already offline again and doens't have an ip.

Is there anyway to build up a connection and keep it alive?

Another way would be, to send a sms to the cell phone and startup the application via push-registry. Problem here is, that we can't send a sms to specific port from a normal pc with j2se.

Any ideas?

[660 byte] By [sockena] at [2007-11-27 4:04:50]
# 1

Hi there,

> Is there anyway to build up a connection and keep it

> alive?

There are 2 kinds of time-out. The 1st is a socket connection timeout when your read method does not block, and the 2nd is the operator NAT table timeout.

For the 1st, obviously you can use a blocking read method and put a try-catch block in a continuous loop.

while (true) {

...

try {

...

// put a blocking call to read from the socket

....

catch (socket timeout exception) { }

}

}

In the 2nd scenario, the idle connection will be broken when the operator's NAT table is purged. So to avoid this, just send a ping periodically.

arudyantoa at 2007-7-12 9:09:45 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Thanks for you answer! We'll have to see if that works... Maybe we can build in the ping in our application. Hopefully this will keep the connection alive.
sockena at 2007-7-12 9:09:45 > top of Java-index,Java Mobility Forums,Java ME Technologies...