No route to host running off battery with WIFILock

by Andrew Prunicki » Fri, 02 Jan 2009 05:44:24 GMT


Sponsored Links
 Update.

I have had success maintaining the WIFI connection by using a wakelock
(partial) in combination with a wifilock.  Now my app successfully maintains
the wifi connection even when the screen goes black - albeit at cost to
battery life.

If anyone has any other insights they would like to share, those would be
most welcome.





--~--~---------~--~----~------------~-------~--~----~



No route to host running off battery with WIFILock

by prunicki » Fri, 02 Jan 2009 05:44:25 GMT


 I have written a small app that acquires a WIFILock.  Every 15 seconds
it does a small http request.  If the G1 is running on battery and the
screen saver kicks on it will ultimately result in "No route to host"
- despite the fact that the connection appears to be up when checking
the WifiManager and ConnectivityManager.  If I then pick up the
handset and attempt to access the internet (browser, email, etc.),
nothing is accessible.  The only way to make things accessible is to
release the lock, let the device go to idle (which releases the
radio), and then wake it up, thus reconnecting WIFI, and internet
access is again possible.

Now if I leave it plugged in, then it is able to continuously make the
request.  Interestingly, if I ping the device repeatedly from my
desktop, it seems to be able to continue to make requests (although I
haven't taken the time yet to be certain).

The WIFILock as it is currently working is not of much use.  I have
even tried to re-connect in this case, or toggle the WIFI on and off,
but neither of these work.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. What tools do you use for profiling?

Sounds very useful for performance tuning.

Not sure how I go about doing this.
--~--~---------~--~----~------------~-------~--~----~

2. SystemProperties.get()/set()

Hi all,
In case of reading/setting properties defined in
/default.prop
/system/build.prop
/system/default.prop
/data/local.prop,
i am finding many source code in android release are using
SystemProperties.get()/set() for this purpose. But i am also finding
that SystemProperties is not published any more. I am really confused
about this. Anyone can kindly give me a clue on thisSince SystemProperties is not exposed, could System.getProperty()/
setProperty() take its place?

Thanks,


Lawrrence


--~--~---------~--~----~------------~-------~--~----~

3. How to determine the size of pmem in kernel?

4. Why do we need external/fdlibm other than use libm in Bionic?

5. What "/dev/omap_csmi_tty1" of reference-ril.c is?

6. Error about building adb for windows

7. porting android to omap3 evm