1

I'm trying to store default static ip settings in a custom rom.

I write the SSID and Password to /etc/wifi/wpa_supplicant.conf and that works well for Wi-Fi

But how do I add the static IP settings (gateway, fixed ip) for Wi-Fi (and Ethernet)?

  • Why would you want to do that? If you do, the device may not be able to connect other wifi networks... – t0mm13b Apr 9 '13 at 13:47
  • I want to do that because I want to set up a couple of android devices with the same rom and the same static ip settings. I don't want to reduce the manual configuration as much as possible. One step is setting up the static ip settings. – acy Apr 9 '13 at 21:29
  • manual configuration? IS there no dhcp on it? :o that is an odd one! Like as I have mentioned in my previous comment, what if you went to a public wifi hotspot - it will fail. :) – t0mm13b Apr 9 '13 at 21:53
  • static IP addresses have higher precedence over dynamic...? me fcekn memory is gone now... le sigh – t0mm13b Apr 9 '13 at 22:06
  • I'm using the devices for a signage system and it's okay that they won't connect to public hotspots then. Would be great though if it's still possible to deactivate the static ip settings at some place... – acy Apr 9 '13 at 22:22
1

Save the following in one of the init scripts in the ROM

ifconfig eth0 192.168.1.100 netmask 255.255.255.0
route add default gw 192.168.1.1 dev eth0
setprop net.dns1 192.168.1.1
ip addr show
ip route show

Where eth0 in this case, is an ethernet adapter attached via USB.

0

I had a problem where my Samsung S3 Mini (Jelly Bean 4.1.2) worked 100% on my Wi-Fi router but failed to connect to the Internet with my Wi-Fi repeater - stuck on "obtaining IP address..." message. I have now set a static IP and it works 100% on both the router and the repeater. If you need multiple static IP options then check out "Wi-Fi Static" application. I found the answer courtesy of Motorola, and repeat it below, at https://motorola-global-portal.custhelp.com/app/answers/prod_answer_detail/a_id/68989/p/7901,8013,

To setup a Static IP Address on your Motorola Xoom, follow the steps below:

Touch Apps
Touch Settings
Touch Wi-Fi settings
Touch Add Wi-Fi network
Enter Name under Network SSID, and touch Save
Touch and hold the "network name", and touch Modify network
Select Static under IP settings, and enter the specific network information

Tip: You can also adjsut your security and Proxy settings.
Touch Save
0

You can set ip with ifconfig and gateway with route when you are rooted. I used it to change the tcp buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.