Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a static IP in Android Things running on Raspberry Pi 3

I wish to change the Ethernet IP Address of the Raspberry Pi3 board that is running Android Things OS. Currently it automatically fetches an IP Address available in the connected network. But I wish to assign a fixed/static IP to the device. Is it possible to set a static IP using ADB?

like image 285
Kishan Avatar asked Feb 06 '17 06:02

Kishan


Video Answer


2 Answers

I don't know the solution based on Android-things.

But I usually try to prevent the use of fixed IP (unless the device runs forever) set in the device itself.

I prefer to use the DHCP of the modem to set the IP based on the MAC adress. This prevent some conflict.

You can see more information on this post

like image 68
AxelH Avatar answered Oct 09 '22 19:10

AxelH


You can set a static IP usually through your router settings. Try accessing your router settings usually through the web browser at:

http://192.168.0.1/

Assuming you have never accessed this the username is usually admin, and the password is password. You can check the router name online to find the default username and password.

Navigate the menus to find a page which shows you he connected devices. See pic for an example.

Picture.

Every routers interface is different.

If you have a setting that says DHCP see if you can change it to a reserved IP so that the IP address assigned doesn't change.

Remember different routers have different interfaces so you must do some searching about yours to find the setting.

You can do this from any computer connected to your internet, doesn't have to be on the raspberry to make the changes.

like image 45
KalVentures Avatar answered Oct 09 '22 18:10

KalVentures