How to configure Wifi to take priority over the Ethernet ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure Wifi to take priority over the Ethernet ?

Jump to solution
1,495 Views
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 Kudos
1 Solution
1,380 Views
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

View solution in original post

0 Kudos
2 Replies
1,381 Views
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 Kudos
1,380 Views
amit251291
Contributor IV

Thank you Wigros Sun. Solution helped us. 

0 Kudos