Testing code formatting
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
# Gadget Mode to setup a serial connection over USB
|
||||
Prepare Raspberry Pi OS connection over a microUSB serial cable
|
||||
|
||||
Important: You will want to disable the serial console on RX/TX if you are trying to use that serial port for communicating with other devices.
|
||||
|
||||
Based upon Adafruit guide: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget:
|
||||
The author discovered the guide was out of date, consulted the [2025 Raspberry Pi whitepaper on OTG](https://pip-assets.raspberrypi.com/categories/685-app-notes-guides-whitepapers/documents/RP-009276-WP/Using-OTG-mode-on-Raspberry-Pi-SBCs), found additional errors, and was finally able to correct them thanks to this blog https://www.isticktoit.net/?p=1383
|
||||
|
||||
## Important :
|
||||
- **Using the Gadget Mode will make the usb port unable to connect to a mouse or keyboard!!!** You will need to disable it make them work again.
|
||||
- You will want to disable the serial console on RX/TX in `raspi-config` if you are trying to use that serial port for communicating with other devices.
|
||||
|
||||
|
||||
## Procedure
|
||||
|
||||
Make sure you have your USB cable plugged into the left port **USB** and not the right port marked **PWR**.
|
||||
1. Open a connection to the device via ssh or Raspberry Pi Connect
|
||||
1. Become root (the superuser)
|
||||
@@ -13,9 +18,9 @@ Make sure you have your USB cable plugged into the left port **USB** and not the
|
||||
sudo su
|
||||
```
|
||||
1. Enable the DWC version 2 USB peripheral device tree overlay by appending it to the end after the `[all]` category (which is at the end)
|
||||
```
|
||||
echo "dtoverlay=dwc2" >> /boot/firmware/config.txt
|
||||
```
|
||||
```
|
||||
echo "dtoverlay=dwc2" >> /boot/firmware/config.txt
|
||||
```
|
||||
1. We add the required module `dwc2` for loading at startup
|
||||
```
|
||||
echo "dwc2" >> /etc/modules
|
||||
|
||||
Reference in New Issue
Block a user