How to configure Wifi to take priority over the Ethernet ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to configure Wifi to take priority over the Ethernet ?

跳至解决方案
1,567 次查看
amit251291
Contributor IV
Dear Team,
    Currently we are  working on IMX8QM-MEK board running with Android 9 auto. We have a scenario where we have to use both WiFi for internet connectivity on MEK and Ethernet cable to connect MEK to another Windows Machine(InterNetworking).
   
    But I have observed WiFi works fine until ethernet cable is plugged in. As soon as Ethernet cable is plugged in WiFi loses priority over the Ethernet and then internet doesn't work at all on MEK. To sum it up, internet from WiFi is not working when Ethernet cable is plugged in to MEK and other end of which is connected to Windows machine.
   
     Our requirement is to have both in working condition. How to make WiFi still be receiving internet, when Ethernet cable is connected between MEK and windows machine.
   
    Do we need to change any configuration file to achieve the requirement or we have to edit ConnectivityService of Android.
Hoping to hear from you,
0 项奖励
1 解答
1,452 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Amit,

      Your question is related to network prioty, which is not related i.MX8 processor. so you should tune the prioty of ethernet or WIFI in android source code.

       Open frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetNetworkFactory.java  with gedit or vim.

find

   private final static int NETWORK_SCORE = 110;

   change 110 to be 50.

try it , please!

Have a nice day!

B.R,

Weidong

在原帖中查看解决方案

0 项奖励
2 回复数
1,453 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Amit,

      Your question is related to network prioty, which is not related i.MX8 processor. so you should tune the prioty of ethernet or WIFI in android source code.

       Open frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetNetworkFactory.java  with gedit or vim.

find

   private final static int NETWORK_SCORE = 110;

   change 110 to be 50.

try it , please!

Have a nice day!

B.R,

Weidong

0 项奖励
1,452 次查看
amit251291
Contributor IV

Thank you Wigros Sun. Solution helped us. 

0 项奖励