How to set the Gateway and Netmask of Ethernet in Android 4.4.3

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to set the Gateway and Netmask of Ethernet in Android 4.4.3

3,922件の閲覧回数
erickang
Contributor II

Hi All,

I want to set the Gateway and Netmask of Ethernet in Android 4.4.3.

Could you tell me how to set those?

Our development environment is like below,

- AP/Board : i.MX6DL-SabreSDP

- OS : Android 4.4.3 (Linux 3.10.53)

I could confirm the method how to apply IP and DNS from Ethernet App in packages/apps/fsl_imx_demo,

But I couldn't find how to set the Gateway and Netmask of Ethernet.

Best Regards,

Eric.

ラベル(4)
0 件の賞賛
返信
5 返答(返信)

1,973件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello, Eric !

Android networking is property based and is available through getprop / setprop commands.

Also standard Linux utilities ifconfig and route are still available.

Have You tried it ?

$ ifconfig eth0 192.168.1.151 255.255.255.0

$ route add default gw 192.168.1.1 dev eth0

$ setprop net.eth0.dns1 8.8.8.8

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,973件の閲覧回数
erickang
Contributor II

Hi Yuri,

Thanks for your response.

I used the below command to set the Ethernet Configuration.

  ~$ ipconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.0

  ~$ route add default gw yyy.yyy.yyy.yyy dev eth0

But I couldn't find the ethernet.apk to set those.

Best Regards,

Eric.

0 件の賞賛
返信

1,973件の閲覧回数
johnnyjhao
Contributor I

Hi Yuri,

I found a ethernet.apk in freescale website,  but the app can't set gateway

https://community.freescale.com/servlet/JiveServlet/download/93626-9-264786/ethernet.apk.zip

0 件の賞賛
返信

1,973件の閲覧回数
Yuri
NXP Employee
NXP Employee

What is log ?

0 件の賞賛
返信

1,973件の閲覧回数
Yuri
NXP Employee
NXP Employee

  We do not provide .apk, sorry.

Nevertheless, You may look at How to Add Ethernet UI Support in ICS 

Regards,

Yuri.

0 件の賞賛
返信