{"repo":"charkster/rpi_gadget_mode","free":true,"listed":false,"github":"https://github.com/charkster/rpi_gadget_mode","clone":"git clone https://github.com/charkster/rpi_gadget_mode.git","description":"Instructions for enabling USB (ethernet) gadget mode on RPi 4 and RPi Zero 2W.","language":null,"stars":63,"topics":["raspberry-pi","usb-ethernet","usb-gadget","rdp"],"license":"MIT","category":"analytics","readme_excerpt":"rpi gadget mode Instructions for enabling USB (ethernet) gadget mode on RPi 4 and RPi Zero 2W . All you need is a USB 2.0 Type C cable for RPi 4, or a USB 2.0 micro usb for RPi Zero 2W. OTG cable NOT needed. These steps allow for both normal operation and USB gadget mode . For home use gadget mode is effectively worthless , as the RPi can operate headless and can be connected to using VNC or XRDP. At work gadget mode is useful as BYOD (Bring Your Own Device) devices are not allowed to connect to the corporate network. My work monitor/keyboard/mouse needs to be disconnected from my company laptop and then connected to the RPi (a pain in the ass). In gadget mode the RPi will still use the BYOD wifi for internet access, but the remote desktop connection is over USB cable . No more switching the monitor/keyboard/mouse connections (hoorah!) Steps: (1) Become superuser (sudo -i) and do all the following steps... (2) Make backup copies of /boot/config.txt and /boot/cmdline.txt (3) Edit /boot/config.txt by appending the following line to the end of the file: (4) Edit /boot/cmdline.txt by inserting the following text between rootwait and quiet (5) Create a new udev rule file. Create /etc/udev/rules.d/90-usb-gadget.rules and insert the following: (6) Make a backup copy of /etc/sysctl.conf (7) Edit /etc/sysctl.conf and append the following line to the end of the file (this allows normal mode , when not a gadget): That's it. Here are the steps I needed to follow on Ubuntu , Windows 10 an","default_branch":null,"files":null,"tree":[],"storefront":"/r/charkster","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/charkster/rpi_gadget_mode/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."}