{"repo":"jacklul/asuswrt-usb-raspberry-pi","free":true,"listed":false,"github":"https://github.com/jacklul/asuswrt-usb-raspberry-pi","clone":"git clone https://github.com/jacklul/asuswrt-usb-raspberry-pi.git","description":"Connect Raspberry Pi to Asus router through USB port using Ethernet Gadget functionality","language":"Shell","stars":20,"topics":["asuswrt","asuswrt-merlin","pi-hole","router","shell-script","usb-ethernet","usb-gadget","pihole","raspberry-pi","asus-routers"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"Asus Router USB Raspberry Pi Connecting Raspberry Pi to LAN through USB port on Asus router This makes any Raspberry Pi capable of becoming USB Gadget to connect to LAN network through router's USB port. Great way to run Pi-hole in your network on a budget Raspberry Pi Zero! [!WARNING] This cannot be used together with Optware / Asus Download Master on stock firmware. How it works Asus routers have the capability to run a script when USB storage device is mounted. This is how this magic is happening: - Router is booting, at one point USB port gets powered and Pi starts booting as well - Pi pretends to be USB storage device, router mounts it and triggers the script - The script on the router writes a file to the mass storage device - The script on the Pi detects that and transforms itself into USB Ethernet gadget - The script on the router waits for the new network interface to become available and then enables it and adds it to the LAN bridge interface - The Pi is now a member of your LAN network The script on the router also is monitoring for the interface changes in case the Raspberry Pi reboots. Installation On the Raspberry Pi: [!IMPORTANT] Make sure you have debugfs command available - if not install it with apt-get install e2fsprogs . Add dtoverlay=dwc2 to /boot/config.txt and modules-load=dwc2 to /boot/cmdline.txt after rootwait . Install asuswrt-usb-network script: Then enable it: Modify configuration - sudo nano /etc/asuswrt-usb-network.conf : - If you're running Asu","default_branch":null,"files":null,"tree":[],"storefront":"/r/jacklul","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jacklul/asuswrt-usb-raspberry-pi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}