2

I am trying to use the Mobile Network interface rmnet_data0 while Wi-Fi wlan0 is enabled. You can read my progress with the developer JsBergbau of BindToInterface at this link https://github.com/JsBergbau/BindToInterface/issues/3. He referred me here to request help with what is preventing with binding to interface rmnet_data0 while Wi-Fi enabled used with curl. The phone is running ofono with UBports.

With wlan0 disabled:

curl --interface rmnet_data0 ifconfig.me
"MY IP ADDRESS OUTPUT"

With wlan0 enabled:

curl --interface rmnet_data0 ifconfig.me
curl: (7) Failed to connect to ifconfig.me port 80: Connection timed out

Substituted IP address for my real ones:

ip route list table local

broadcast 10.0.0.0       dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
local 10.25.52.96        dev usb0         proto kernel  scope host  src 10.25.52.96
local 10.75.188.126      dev rmnet_data0  proto kernel  scope host  src 10.75.188.126
broadcast 10.75.188.127  dev rmnet_data0  proto kernel  scope link  src 10.75.188.126
broadcast 10.255.255.255 dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
broadcast 127.0.0.0      dev lo           proto kernel  scope link  src 127.0.0.1
local 127.0.0.0/8        dev lo           proto kernel  scope host  src 127.0.0.1
local 127.0.0.1          dev lo           proto kernel  scope host  src 127.0.0.1
broadcast 127.255.255.255 dev lo           proto kernel  scope link  src 127.0.0.1
broadcast 192.266.10.0    dev wlan0        proto kernel  scope link  src 192.266.10.25
local 192.266.10.25       dev wlan0        proto kernel  scope host  src 192.266.10.254
broadcast 192.266.10.255  dev wlan0        proto kernel  scope link  src 192.266.10.25
ip route show table 0

default via 192.266.10.1  dev wlan0                      proto static                                       metric 600
default via 10.75.188.125 dev rmnet_data0                proto static                                       metric 700
10.0.0.0/8                dev usb0                       proto kernel  scope link  src 10.25.52.96 linkdown
10.75.188.125             dev rmnet_data0                proto static  scope link                           metric 700
192.266.10.0/24           dev wlan0                      proto kernel  scope link  src 192.266.10.25        metric 600
broadcast 10.0.0.0        dev usb0         table local   proto kernel  scope link  src 10.25.52.96 linkdown
local 10.25.52.96         dev usb0         table local   proto kernel  scope host  src 10.25.52.96
local 10.75.188.126       dev rmnet_data0  table local   proto kernel  scope host  src 10.75.188.126
broadcast 10.75.188.127   dev rmnet_data0  table local   proto kernel  scope link  src 10.75.188.126
broadcast 10.255.255.255  dev usb0         table local   proto kernel  scope link  src 10.25.52.96 linkdown
broadcast 127.0.0.0       dev lo           table local   proto kernel  scope link  src 127.0.0.1
local 127.0.0.0/8         dev lo           table local   proto kernel  scope host  src 127.0.0.1
local 127.0.0.1           dev lo           table local   proto kernel  scope host  src 127.0.0.1
broadcast 127.255.255.255 dev lo           table local   proto kernel  scope link  src 127.0.0.1
broadcast 192.168.1.0     dev wlan0        table local   proto kernel  scope link  src 192.266.10.25
local 192.266.10.25       dev wlan0        table local   proto kernel  scope host  src 192.266.10.25
broadcast 192.266.10.255  dev wlan0        table local   proto kernel  scope link  src 192.266.10.25
ip route list table main

default via 192.266.10.1  dev wlan0        proto static                 metric 600
default via 10.75.188.126 dev rmnet_data0  proto static                 metric 700
10.0.0.0/8                dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
10.75.188.125             dev rmnet_data0  proto static  scope link     metric 700
192.266.10.0/24           dev wlan0        proto kernel  scope link  src 192.266.10.164  metric 600
ip rule

0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default
9
  • Most probably due to routing policy. When WiFi is enabled, Android sets wlan0 as the default gateway, and blocks traffic to rmnet_data0. Commented Oct 7, 2021 at 21:51
  • Looking at the IP route it shows they are both default: default via AAA.AAA.AAA.AAA dev wlan0 proto static metric 600 default via BBB.BBB.BBB.BBB dev rmnet_data0 proto static metric 700
    – Joe Cowboy
    Commented Oct 8, 2021 at 1:11
  • And ip rule?? Commented Oct 8, 2021 at 5:41
  • @IrfanLatif My post has been updated with the IP rules you asked for.
    – Joe Cowboy
    Commented Oct 8, 2021 at 21:06
  • 1
    @IrfanLatif This is a Sprint OnePlus 7 Pro 5G running ofono with Ubports
    – Joe Cowboy
    Commented Oct 9, 2021 at 9:50

0

You must log in to answer this question.

Browse other questions tagged .