Last updated 10-19-2024
Object is to use your phone’s USB tethering to provide internet connection to all the computers in your house. Some phones have Ethernet tethering with a supported external USB C adapter to network adapter. Mine does not. Some modern AP/Routers accept USB tethering on the WAN side. Mine does not.
The OpenWrt install candidate for the Raspberry Pi 4B does not have the drivers for USB tethering. It will be necessary to either download that package separately on a different computer with internet access and transfer it for installation, or to temporarily enable hot spot access for the installed OpenWrt booted on the Raspberry Pi 4B so it can download and install the required extra packages.
Since I want the fastest possible network connection between my computer for accessing them remotely (within my LAN) with x2go, I will connect this raspberry Pi 4B router to a network switch. The OpenWrt router will provide DHCP assignment of network IP. Thus only access to the internet will be going through this router.
https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering
You will want to have your phone default to USB tethering whenever you boot OpenWrt or a single computer connected directly to your phone for USB tethering. The menus may vary for different brands and models of Android phones. You will want to enable debugging mode and default USB tethering in that order. The new configuration does not take effect until you reboot your phone.
For faster internet speeds from my phone, see my https://raspiplayer.com/scrcpy/ sub page for mirroring my phone to my desktop computer so that I can stream movies on the phone at the in app higher data rate, but view them on a full size monitor with audio and my keyboard and mouse controlling the phone and only a USB 3.0 charging/data cable between the phone and the computer.
Having succeeded with a Raspberry Pi 4B OpenWrt router, I then turned to repurposing my x96max Android 9.0 TV Box. Access to Android updates and the Google Play store were no longer available. Similarly, my once Armbian installation was no longer updatable. It was not easy to find an OpenWrt candidate for the x96max, but I found one for the S905x2 SOC in it.
I added the three USBIP OpenWrt packages. Note that although I am only using the server, the executable, usbip, needed to control binding devices to the network, comes in the client package. Now I am able attach the pictured USB DVD player to any one computer on my home network and VLC will pop up to play the movie as if the DVD drive were local. It is more efficient to transmit the compressed DVD content to the networked computer than to play the content on a server and transmit pixels to a client viewing computer.
See my https://raspiplayer.com/usbip/ for documentation on how to use usbip at both the server and client ends.
USBIP does not do a good job of making USB connected SATA HD/SSD storage available for the network. It works but is slow. I expect a NFS server to be better for that use case and OpenWrt has the required packages to implement this. It also has packages for implementing a PXE server.