No Static Settings In ICS

margret

Well-Known Member
Licensed User
Longtime User
I use this code on a half dozen devices to set static IP and settings. It works fine on all devices until the new one with ICS. The other devices are using Android 2.x. No errors are shown it just gets a dynamic IP and not the static information that I set. Is there a manifest entry for it to work with ICS? Any ideas?

This is using the JHWiFi library:
http://www.b4x.com/forum/additional-libraries-classes-official-updates/17150-wifi-manager-library.html

Thanks,

Margret

B4X:
wf.Wifi_Static_IP = "192.168.2.20"
wf.Wifi_Static_Netmask = "255.255.255.0"
wf.Wifi_Static_Gateway  = "192.168.1.1"
wf.Wifi_Static_DNS1 = "63.68.212.33"
wf.Wifi_Static_DNS2 = "63.68.212.34"
wf.Wifi_Use_Static_IP = 1 '1 = static, 0 = dynamic
wf.Enabled = True
 

mc73

Well-Known Member
Licensed User
Longtime User
I think, if I understood correctly the comments of this link, that the way android handles net data changed; In ICS, you have to set staticIP for each individual network, while in the 2.3 for e.g. that I usually deal with, setting staticIP is independent of the chosen network. I know nothing about the JhWiFi library but it can be that it didn't follow ICS new way of handling things? Just a thought.
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Seems a bit confusing, cause things that work with 3.0 fail with 4.0 and so on. But surely it can work with proper handling :)
 
Upvote 0
Top