Tethering USB android - smartphones that work and the others

Hi, I have successfully flashed a tp link C20i (openwrt 19.07.1) to perform USB tethering (connecting LTE - 4g to my network using a smartphone and a router).

But success was only partial: Sony xperia X compact does connect perfectly unlike Samsung J5 (despite hours of efforts). So this last device seems to be more complicated to connect and I think it could be useful to report in a thread the devices working easily, and the others, to highlight to users that difficulties could come from the phone.

(Excuse my poor english...)

Additonal info : Samsung J5 can tether through USB using with Billion Bipac 7800DXL (stock firmware , no openwrt).

Probably a DNS thing. To confirm, in the phone that's not working set a static IP, default gateway (your router's IP) and DNS, and see if it works.

Edit: unless I miss understood your post. These phones in questions give the router Internet or are wireless counts off the router?

It is usually using RNDIS, which is zero configuration on the router side. See if you can find log files of the router that works with the Samsung, and identify which driver(s) it is using. Connecting to a desktop Linux is also a way to investigate, since desktop Linux typically includes every possible driver out of the box.

1 Like

Hi, thanks for your comments and suggestions. I have digged a little further and actually, the J5 samsung works, but with another sim card related to a different phone networks. Surprisingly, Sony Xperia works with both sim card.
And yes, what I am trying to do is to get internet using my smartphone and to share it with clients of my network (router, powerline, computer and other devices,...). Wire connection (USB) looks like the most reliable way to do it.

yeah, usb is sensible given power drain... the other thing to consider is actual droid versions...

what are the two phones actually running?

Android version for the Xperia X compact (F5321) : 8.0.0
Android version for the Samsung J5 : 6.0.1
One additional thing that may be important : the sim card that does not work on the J5 belongs to a mobile provider that does not allow TETHERING. But it works using the sony Xperia. I do not know exactly what is the impact of this but it may be significant for the settings.

Hi, here are some news from my trials : Samsung J5 is now working with all sim cards and plugged on Openwrt router (tplink C20i ). I do not konw why it is working today but all seems ok and stable.

Here are the logs files :
Log from Tplink C20i (openwrt) with samsung J5

Fri Feb 14 20:06:46 2020 kern.info kernel: [61597.497659] usb 1-1: new high-speed USB device number 21 using ehci-platform
Fri Feb 14 20:06:49 2020 kern.info kernel: [61598.426401] usb 1-1: USB disconnect, device number 21
Fri Feb 14 20:06:49 2020 kern.info kernel: [61598.634890] usb 1-1: new high-speed USB device number 22 using ehci-platform
Fri Feb 14 20:06:50 2020 daemon.notice netifd: Interface 'USBWAN' is enabled
Fri Feb 14 20:06:50 2020 kern.info kernel: [61598.720003] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-101c0000.ehci-1, RNDIS device, ee:69:46:0f:ca:01
Fri Feb 14 20:06:50 2020 daemon.notice netifd: Network device 'usb0' link is up
Fri Feb 14 20:06:50 2020 daemon.notice netifd: Interface 'USBWAN' has link connectivity
Fri Feb 14 20:06:50 2020 daemon.notice netifd: Interface 'USBWAN' is setting up now
Fri Feb 14 20:06:50 2020 daemon.notice netifd: USBWAN (31870): udhcpc: started, v1.30.1
Fri Feb 14 20:06:50 2020 daemon.notice netifd: USBWAN (31870): udhcpc: sending discover
Fri Feb 14 20:06:53 2020 daemon.notice netifd: USBWAN (31870): udhcpc: sending select for 192.168.42.92
Fri Feb 14 20:06:53 2020 daemon.notice netifd: USBWAN (31870): udhcpc: lease of 192.168.42.92 obtained, lease time 3600
Fri Feb 14 20:06:53 2020 daemon.notice netifd: Interface 'USBWAN' is now up
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: reading /tmp/resolv.conf.auto
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain test
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain onion
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain localhost
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain local
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain invalid
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain bind
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using local addresses only for domain lan
Fri Feb 14 20:06:53 2020 daemon.info dnsmasq[1429]: using nameserver 192.168.42.129#53
Fri Feb 14 20:06:53 2020 user.notice firewall: Reloading firewall due to ifup of USBWAN (usb0)
Fri Feb 14 20:06:59 2020 kern.info kernel: [61602.913055] mtk_soc_eth 10100000.ethernet eth0: port 4 link up (100Mbps/Full duplex)
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Network device 'eth0' link is up
Fri Feb 14 20:06:59 2020 daemon.notice netifd: VLAN 'eth0.1' link is up
Fri Feb 14 20:06:59 2020 daemon.notice netifd: VLAN 'eth0.2' link is up
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Interface 'wan' has link connectivity
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Interface 'wan' is setting up now
Fri Feb 14 20:06:59 2020 kern.info kernel: [61602.922475] br-lan: port 1(eth0.1) entered blocking state
Fri Feb 14 20:06:59 2020 kern.info kernel: [61602.928066] br-lan: port 1(eth0.1) entered forwarding state
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Interface 'wan6' has link connectivity
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Interface 'wan6' is setting up now
Fri Feb 14 20:06:59 2020 daemon.notice netifd: bridge 'br-lan' link is up
Fri Feb 14 20:06:59 2020 daemon.notice netifd: Interface 'lan' has link connectivity
Fri Feb 14 20:07:00 2020 daemon.notice netifd: wan (31962): udhcpc: started, v1.30.1
Fri Feb 14 20:07:00 2020 daemon.notice netifd: wan (31962): udhcpc: sending discover
Fri Feb 14 20:07:00 2020 cron.info crond[1012]: USER root pid 31972 cmd sh /etc/lockdown/lockdown.sh cron
Fri Feb 14 20:07:03 2020 daemon.notice netifd: wan (31962): udhcpc: sending discover
Fri Feb 14 20:07:06 2020 daemon.info dnsmasq-dhcp[1429]: DHCPREQUEST(br-lan) 192.168.1.1 74:d0:2b:71:13:40
Fri Feb 14 20:07:06 2020 daemon.info dnsmasq-dhcp[1429]: DHCPNAK(br-lan) 192.168.1.1 74:d0:2b:71:13:40 address not available
Fri Feb 14 20:07:06 2020 daemon.notice netifd: wan (31962): udhcpc: sending discover
Fri Feb 14 20:07:09 2020 daemon.info dnsmasq-dhcp[1429]: DHCPDISCOVER(br-lan) 74:d0:2b:71:13:40
Fri Feb 14 20:07:09 2020 daemon.info dnsmasq-dhcp[1429]: DHCPOFFER(br-lan) 192.168.1.217 74:d0:2b:71:13:40
Fri Feb 14 20:07:09 2020 daemon.info dnsmasq-dhcp[1429]: DHCPDISCOVER(br-lan) 74:d0:2b:71:13:40
Fri Feb 14 20:07:09 2020 daemon.info dnsmasq-dhcp[1429]: DHCPOFFER(br-lan) 192.168.1.217 74:d0:2b:71:13:40
Fri Feb 14 20:07:13 2020 daemon.info dnsmasq-dhcp[1429]: DHCPREQUEST(br-lan) 192.168.1.217 74:d0:2b:71:13:40
Fri Feb 14 20:07:13 2020 daemon.info dnsmasq-dhcp[1429]: DHCPACK(br-lan) 192.168.1.217 74:d0:2b:71:13:40 Admin-X301A
Fri Feb 14 20:07:16 2020 daemon.info dnsmasq-dhcp[1429]: DHCPINFORM(br-lan) 192.168.1.217 74:d0:2b:71:13:40
Fri Feb 14 20:07:16 2020 daemon.info dnsmasq-dhcp[1429]: DHCPACK(br-lan) 192.168.1.217 74:d0:2b:71:13:40 Admin-X301A
Fri Feb 14 20:08:00 2020 cron.info crond[1012]: USER root pid 31991 cmd sh /etc/lockdown/lockdown.sh cron

And as requested, here are also some log files from the Billion 7800DXL router (stock firmware) working quite well with several smartphones. (logs recorded when connecting samsung J5)

Log from billion 7800DXL (stock firmware) with samsung J5

<30>Feb 15 06:56:37 kernel: usb 1-1: new high speed USB device using ehci_hcd and address 8	192.168.1.254	14/02 20:56:39.478	
<30>Feb 15 06:56:38 kernel: usb 1-1: configuration #1 chosen from 2 choices	192.168.1.254	14/02 20:56:39.628	
<30>Feb 15 06:57:03 kernel: usb 1-1: USB disconnect, address 8	192.168.1.254	14/02 20:57:05.388	
<30>Feb 15 06:57:04 kernel: usb 1-1: new high speed USB device using ehci_hcd and address 9	192.168.1.254	14/02 20:57:05.628	
<30>Feb 15 06:57:04 kernel: usb 1-1: configuration #1 chosen from 1 choice	192.168.1.254	14/02 20:57:05.761	
<30>Feb 15 06:57:04 kernel: usbcore: registered new interface driver cdc_ether	192.168.1.254	14/02 20:57:05.885	
<30>Feb 15 06:57:04 kernel: usb0: register 'rndis_host' at usb-0000:00:0a.0-1, RNDIS device, 02:08:56:56:32:36	192.168.1.254	14/02 20:57:05.975	
<30>Feb 15 06:57:04 kernel: usbcore: registered new interface driver rndis_host	192.168.1.254	14/02 20:57:06.005	
<14>Feb 15 06:57:06 syslog: notify ssk insert Bus:1 Dev:9 Vendor:4e8 ProdID:6863 Cls:10	192.168.1.254	14/02 20:57:07.842	
<30>Feb 15 06:57:06 kernel: usbcore: registered new interface driver usbserial	192.168.1.254	14/02 20:57:08.076	
<30>Feb 15 06:57:06 kernel: usbserial: USB Serial Driver core	192.168.1.254	14/02 20:57:08.080	
<30>Feb 15 06:57:06 kernel: USB Serial support registered for GSM modem (1-port)	192.168.1.254	14/02 20:57:08.166	
<30>Feb 15 06:57:06 kernel: usbcore: registered new interface driver option	192.168.1.254	14/02 20:57:08.196	
<30>Feb 15 06:57:06 kernel: option: v0.7.2:USB Driver for GSM modems	192.168.1.254	14/02 20:57:08.199	
<15>Feb 15 06:57:06 syslog: Driver:option WanIntf:ppp	192.168.1.254	14/02 20:57:08.203	
<14>Feb 15 06:57:06 syslog: check available MODEM port ..	192.168.1.254	14/02 20:57:08.206	
<15>Feb 15 06:57:06 syslog: Driver:cdc WanIntf:usb0	192.168.1.254	14/02 20:57:08.209	
<14>Feb 15 06:57:06 syslog: check Net interface ..	192.168.1.254	14/02 20:57:08.213	
<14>Feb 15 06:57:06 syslog: available usbnet interface : usb0..	192.168.1.254	14/02 20:57:08.216	
<14>Feb 15 06:57:06 syslog: SIM ready	192.168.1.254	14/02 20:57:08.256	
<30>Feb 15 06:57:07 syslog: udhcp client (v0.9.6) started	192.168.1.254	14/02 20:57:08.941	
<30>Feb 15 06:57:08 syslog: Lease of 192.168.42.182 obtained, lease time 3600	192.168.1.254	14/02 20:57:10.048	
<27>Feb 15 06:57:08 syslog: dhcpc:sub-option exceeds len, 0 78 15	192.168.1.254	14/02 20:57:10.052	
<28>Feb 15 06:57:11 kernel: e[0;36;44mBroadcom Packet Flow Cache flushing the flowse[0m	192.168.1.254	14/02 20:57:13.247

So, I confirm that all is working now and is stable over the night. Even the sim card not allowing tethering (in build in lte/4g device or usb key) is working on my samsung j5 (It has a connector for an external antenna !).
One last thing I can precise to be more accurate about my openwrt installation is the following : I installed all according to the openwrt page related to usb tethering for android devices :
<opkg update>
<opkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether>
and I also installed the 'lockdown.sh' from this page : https://github.com/LeJeko/OpenWRT-USB-Tethering/blob/master/lockdown.sh
I do not know if the lockdown.sh is really required, but it is not part of my configuration, which is working.
Thanks a lot to all for your help.