Switching back from gadget mode #1

Closed
opened 2026-07-02 13:33:40 +00:00 by foley · 6 comments
Owner

Marcel doesn't like the fact that Gadget mode will cause the keyboard and mouse to not work on the usb port. I wonder if I can get Script/gadget.sh to detect that it has been enabled to avoid the problem.

Marcel doesn't like the fact that Gadget mode will cause the keyboard and mouse to not work on the usb port. I wonder if I can get Script/gadget.sh to detect that it has been enabled to avoid the problem.
foley added the enhancement label 2026-07-02 13:33:40 +00:00
Author
Owner

It turns out that the only part users should need to change is config.txt by commenting #dtoverlay=dwg2.
The old instructions saying to add it to /etc/modules seem to be now out of date. The overlay automatically loads the dwg2 kernel module which I can then detect.

It turns out that the only part users should need to change is `config.txt` by commenting `#dtoverlay=dwg2`. The old instructions saying to add it to /etc/modules seem to be now out of date. The overlay automatically loads the `dwg2` kernel module which I can then detect.
Author
Owner

I can't quite figure out how to enable/disable the getty most efficiently (see 01b3a189ed) I think they need to be restarted after gadget.sh but this needs more testing.

I can't quite figure out how to enable/disable the getty most efficiently (see 01b3a189ed83facac3fac11be6dd87ffb5eaa6eb) I think they need to be restarted after `gadget.sh` but this needs more testing.
Author
Owner

I want there to be logged information, so it also calls logger to dump it into the journalctl database (see 39c0f158fe). So far it seems to work on linux to comment and uncomment the line in config.txt

I want there to be logged information, so it also calls logger to dump it into the journalctl database (see 39c0f158fefa5d4ec8270eecf2832f9fc61e8d00). So far it seems to work on linux to comment and uncomment the line in `config.txt`
Author
Owner

I finished the script and service in August, but apparently it's unreliable on the Pi Zero W 2. Investigation needed.

I finished the script and service in August, but apparently it's unreliable on the Pi Zero W 2. Investigation needed.
Author
Owner

New procedure is to enable it using the official rpi-usb-gadget but work needs to be done so it can be switched back on when the pi is offline. Somehow (with a special manifest) the pi-imager >=2.0 says it can do it.

New procedure is to enable it using the official `rpi-usb-gadget` but work needs to be done so it can be switched back on when the pi is offline. Somehow (with a special manifest) the pi-imager >=2.0 says it can do it.
Author
Owner

I give up. The provided script is good enough. I don't need to make usb-serial work since ssh is sufficient.

I give up. The provided script is good enough. I don't need to make usb-serial work since ssh is sufficient.
foley closed this issue 2026-09-24 22:40:54 +00:00
Sign in to join this conversation.