USB tether with no previuos internet connection

Hi everyone, I'm new to OpenWrt and I think it's the best solution for my situation.

I'm currently using an old phone on wifi tethering as AP for my "home network" (aka tablet, chromecast and PCs). I was thinking to buy some new gear when I found out about the possibility to use an old router of mine and the smartphone via USB tethering, which is awesome!

I was able to flash OpenWrt on my old D-Link DSL-2750B following this topic so the build is the 19.07.6, and it seems to work fine. My true problem is how to enable the USB tethering; I've read the guide and I've watched some youtube videos, consulted the forum and reddit but I have only the smartphone to access the internet, the router is in fact offline.

So I came to three conclusions:

  1. Build a system from the 19.07.06 with kmod-usb installed by default on a VM and then flash the router
  2. Using the OpenWrt firmware selector to download the 19.07.06 with kmod-usb in it
  3. Somehow connect the router to the internet via the wlan port and then do the installation

Which of these possible solutions would you consider the better way? Will any of my solutions work?
Thanks for any help

  1. reconfigure LAN as DHCP client instead of static, and hook it up to an existing network
  2. if wifi works, connect the router to an exisiting wifi network, as a wireless client
  3. upgrade to 23.05.5 or 24.10
1 Like

You can add usb net drivers to sysupgrade image using firmware-selector? Is it hw rev f1 still supported in24.10?
Absent usb port driver in default set is a bug

2 Likes

@frollic thanks! I ended up connecting the router as a wireless client, I was then able to install via ssh kmod-usb but it doesn't see the usb port. I wll try to upgrade to 24.10, it seems to be supported!!

You need more packages, not only kmod-usb ...?

I'm following this guide

Yes, you've linked to it once already, it doesn't answer the question though.

As mentioned by @frollic you probably need another/different kmod(s).
According to firmware selector, you should have kmod-usb2 kmod-usb-ohci installed (at least).
Run lsmod | grep usb to see what do you have on your router.

thanks @frollic for your patient and thanks @AndrewZ
So, this is the answer to
lsmod | grep usb

ledtrig_usbport        12288  0 
nls_base               12288  1 usbcore
usb_common             12288  4 ohci_platform,ohci_hcd,ehci_platform,usbcore
usbcore               188416  6 ledtrig_usbport,ohci_platform,ohci_hcd,ehci_platform,ehci_fsl,ehci_hcd

After I update to 24.10 I manage to transfer to my D-Link via ssh kmod-usb-net-rndis_6.6.73-r1_mips_mips32.ipk (I used this other guide for your joy) but when I try to install it it gives me this output:

Unknown package 'kmod-usb-net-rndis'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kmod-usb-net for kmod-usb-net-rndis
 * pkg_hash_check_unresolved: cannot find dependency kmod-usb-net-cdc-ether for kmod-usb-net-rndis
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-usb-net-rndis found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-usb-net-rndis.

I plan to implement @frollic 's first suggestion, reconfiguring the LAN as a DHCP client. However, I am determined to make the other solution work. :joy:

Yeah, you'll need all those packages it depends on too.

First you will need to configure the device as a full router, not just as an AP. Reinstall OpenWrt with a custom image containing kmod-usb-net-rndis. All necessary packages will be also installed. Reset the settings, or don't keep settings while flashing in order to restart fresh.Than you need to configure a new interface, and add it to the WAN firewall zone. The tether will be configured as a new eth device, that you must assign to the new interface.

rndis works with most or all Android phones. To use an iPhone there is a different package.
As others said the base usb driver should be included by default on any model that has a USB port. All it does is detect a USB device on the bus and register an attachment point to it. This will generate a single log entry "New USB device found." Then some specific higher level driver (such as rndis) is supposed to take control of it.

1 Like

So, big update, I did it!

For reference, the packages it ended up needing were:

kmod-mii
kmod-usb-net
kmod-usb-net-cdc-ether
kmod-usb-net-rndis

They need to be installed in this order. In the network interfaces devices it is shown as eth1 not as usb0 as it is said in ""the guide"".

Now from LuCi diagnostic table the router can ping any server, but my laptop when connected to the lan has no access to the internet. I just need to study and understand how to share this connection, but I'll consider my problem as solved.

Thanks everyone for the support and time!

I suggest following
https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_rndis

Make sure the interface you created is assigned to the right firewall zone - wan.

2 Likes

Just install kmod-usb-net-rndis. Other packages wil be installed automaticaly as dependencies.

Indeed since 24.10. It may be eth2 or + depending on device. It's still usb0 until 23.05.