Smartphone USB tethering

I'm trying to get Smartphone USB tethering working on a TP-LINK N600 Router, which has OpenWrt 18.06.2 installed - I know, it's an old version....

There is guide specifically for doing this:-

but it doesn't work for me.

Using the command line interface:-
uci set network.wan.ifname="usb0"
results in:-
uci: Invalid argument
Trying "usb1" and "usb2" makes no difference.

Using the Web interface, I'm unable to create the USB interface as shown in the diagram.

If anyone has this working, can you say which OpenWrt release you are using.

Is there an easy way to update to the latest release without knowing which is the latest release?

Install USB drivers. Plug in phone and activate tethering. Read the end of the System Log to confirm that an interface was created and the name of the interface.

I don't think the interface was created...

troot@TP LINK:~# dmesg | grep 'usb'
[    3.848103] usbcore: registered new interface driver usbfs
[    3.853816] usbcore: registered new interface driver hub
[    3.859310] usbcore: registered new device driver usb
[    4.556458] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 1192.048838] usb 1-1.1: new high-speed USB device number 3 using ehci-platform
[ 1256.516584] usb 1-1.1: USB disconnect, device number 3
[ 1257.328087] usb 1-1.1: new high-speed USB device number 4 using ehci-platform
[ 1554.847843] usbcore: registered new interface driver cdc_ether
[ 1554.856470] usbcore: registered new interface driver rndis_host
[ 3518.532695] usb 1-1.1: USB disconnect, device number 4
[ 3518.832193] usb 1-1.1: new high-speed USB device number 5 using ehci-platform
[ 3519.372185] usb 1-1.1: device not accepting address 5, error -71
[ 3519.722176] usb 1-1.1: new high-speed USB device number 6 using ehci-platform
[ 3522.884561] usb 1-1.1: USB disconnect, device number 6
[ 3523.182130] usb 1-1.1: new high-speed USB device number 7 using ehci-platform
[ 3523.344200] usb 1-1.1: device descriptor read/all, error -71
[ 3524.162110] usb 1-1.1: new high-speed USB device number 8 using ehci-platform
[ 3525.444562] usb 1-1.1: USB disconnect, device number 8
[ 3525.742089] usb 1-1.1: new high-speed USB device number 9 using ehci-platform
[ 3526.072148] usb 1-1.1: device descriptor read/64, error -71
[ 3529.540562] usb 1-1.1: USB disconnect, device number 9
[ 3529.842036] usb 1-1.1: new high-speed USB device number 10 using ehci-platform
[ 4399.172554] usb 1-1.1: USB disconnect, device number 10
ype or paste code here

After getting my router (TL-WDR3600) updated to OpenWrt 21.02.1 and getting the correct drivers installed, I'm resuming my attempt to get USB tethering working.

The last msg which dmesg shows is:-

usb 1-1.2:1.0 usb:0 register 'rndis_host' at usb-1b000000.usb-1.2, RNDIS device, 42:ca:5e:22:91:37

Should I expect some IP address to be assigned to the USB port and where would I find it?

If I try to ping 8.8.8.8, it shows 'Network unreachable' so clearly something is missing.

This shows, that you get an ethernet device like eth0 or eth1. It is just called usb and has the mac address 42:ca:5e:22:91:37 (just as every ethernet device).

No! If you don't configure an ethernet device, it will never get an IP address. So create a new interface (under Network/Interfaces) or use an existing one and assign usb as device for this interface (either with a static address or via DHCP). That's all.

Good luck.

1 Like

Or use the existing 'wan' interface, change the physical device from the "real" Ethernet port to the virtual usb port. The phone runs a DHCP server, so continue to use the protocol DHCP client.

Creating a new interface of proto DHCP client also works, you will need to add the new interface (typically named 'wwan' for Wireless WAN) to the wan firewall zone.

1 Like

I assigned usb0 to the WAN interface with the proocol DHCP client, clicked Save& Apply and Restart. Got an error 'device not found' initially but that was because I'd forgotten to re-enable USB tethering after disconnecting the phone.

Now something does work - I get an IP address of 192.168.65.182/24 assigned, but this does not look to be assigned by my ISP. Looks like something is still missing.

Correct! The IP 192.168.65.182/24 is assigned by your smartphone, not your ISP. Your smartphone is connected with your ISP and got its IP from your ISP.

You do not miss anything, everything looks okay so far.

Now test, whether you can connect to the internet (e.g. ping 8.8.8.8). If you get an answer, everything is okay.

1 Like

I'm sure I tried that before and it didn't work, but it does now.

Many thanks to all that helped.