2

I found the following post which describes how to assign a static ip to a wifi interface. I am currently developing for a Nexus 7 (4.1.2) and have an OTG cable along with a Linksys 300M usb-to-ethernet adapter. Is there a way I could assign a static ip to the ethernet interface?

Once again, thank you very much.

Community
  • 1
  • 1
DoubleDunk
  • 909
  • 3
  • 11
  • 29

2 Answers2

0

Assuming your ethernet interface on the device is eth0, this should work :

ifup eth0 192.168.1.2 255.255.255.0

in general

ifup<interface name> <ip-address> <netmask>

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
0

You could also do this with ifconfig, but changing the IP address manually still requires root or you'll just get an ioctl error informing you as such.