dwc2 needs to match
This commit is contained in:
@@ -8,6 +8,37 @@ USB-OTG method (Works on Zero, Zero W, and Compute Module)
|
||||
|
||||
Based upon Adafruit guide: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget:
|
||||
|
||||
# Raspberry Pi Connect
|
||||
1. 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
|
||||
1. Become root (the superuser)
|
||||
`sudo su`
|
||||
1. Enable the DWC USB peripheral device tree overlay by appending it to the end after the `[all]` category
|
||||
`echo "dtoverlay=dwc2" >> /boot/firmware/config.txt`
|
||||
1. We add the required module `dwc2` for loading at startup
|
||||
`echo "dwc2" >> /etc/modules`
|
||||
1. Check that we can load the libcomposite module
|
||||
`modprobe libcomposite`
|
||||
1. Put a copy of this repository in root's home directory using git
|
||||
```
|
||||
apt install -y git
|
||||
git clone https://gitea.cs.ru.is/RU-V207/rover-pi.git
|
||||
```
|
||||
1. Go to Scripts and test if the `gadget.sh` runs without errors and hopefully a Serial port appers in Device Manager or equivalent
|
||||
```
|
||||
cd rover-pi/Scripts/
|
||||
./gadget.sh
|
||||
```
|
||||
1. Install the systemd script
|
||||
`cp serial-ether-gadget.service /lib/systemd/system/.`
|
||||
1. Enable the getty (which connects a login terminal to the serial port)
|
||||
```
|
||||
systemctl enable serial-getty@ttyGS0.service
|
||||
```
|
||||
1. Reboot and see if the serial port appears
|
||||
|
||||
## Additional hints
|
||||
|
||||
Look for the SD card reader on the VM under "Devices > USB" and click on it Iff you get errors, you may have to shut down the VM and set the USB version to 2.0 or 3.0
|
||||
The Boot and Root partition should mount in Linux under /media/$USER/boot and /media/$USER/rootfs
|
||||
Navigate to /media/$USER/boot and edit:
|
||||
|
||||
Reference in New Issue
Block a user