Cant get Ras Pi Zero in usb gadget mode on Trixie to show up in Win10 Device Manager as USB Composite or any other device
My goal is to replace a missing usb device that receives data from a PC thru USB and responds back with a heartbeat on a proprietary protocol.
The game will not play without this specific USB named device from a vendor ID, product ID & desc etc of exact message.
I have successfully flashed a 16GB MicroSD with the latest Raspberry Pi Imager & am able to PuTTy in Windows using WiFi and the user/pw i setup to modify the following once its been updated to Trixie:
I followed various blogs and got the usb gadget service running but Windows never detects a new device only powers it -
I am using the non pwr usb c port closest to the middle which is the data cable direclty to the pc.
1. modify the last line of config.txt in boot/firmware/ to have dtoverlay=dwc2
2. modify cmdline.txt in boot/firmware at the end to contain:3. Create the Gadget Script Service:The Service is running fine without errors per AND 4. Setup the Service & Register it to start at bootup - once its booted I login via PuTTy ssh and can see the serivce works as expected but nothing shows up on the windows machine:
My goal is to mimic this usb displays protocol once i get this figured out so im wondering if this device can even be setup to received USB commands from a computer & parse the payload and respond with necessary data as well as send a heartbeat packet message back every minute
My goal is to replace a missing usb device that receives data from a PC thru USB and responds back with a heartbeat on a proprietary protocol.
The game will not play without this specific USB named device from a vendor ID, product ID & desc etc of exact message.
I have successfully flashed a 16GB MicroSD with the latest Raspberry Pi Imager & am able to PuTTy in Windows using WiFi and the user/pw i setup to modify the following once its been updated to Trixie:
I followed various blogs and got the usb gadget service running but Windows never detects a new device only powers it -
I am using the non pwr usb c port closest to the middle which is the data cable direclty to the pc.
1. modify the last line of config.txt in boot/firmware/ to have dtoverlay=dwc2
2. modify cmdline.txt in boot/firmware at the end to contain:
Code:
modules-load=dwc2,g_serialCode:
#!/bin/bashmodprobe libcomposite# Set up the USB Devicecd /sys/kernel/config/usb_gadget/#make working directorymkdir -p ijpicd ijpi# Make the necessary directoriesmkdir functions/rndis.usb0mkdir configs/c.1mkdir strings/0x409mkdir configs/c.1/strings/0x409#setup usb variables to hostecho 64 > bMaxPacketSize0echo 0x200 > bcdUSB # USB2echo 0x0A00 > idVendor # ZZZecho 0x0302 > idProduct # Spececho 0x0103 > bcdDevice # v1.0.3#windows composite usb device discoveryecho 0xef > bDeviceClassecho 0x02 > bDeviceSubClassecho 0x01 > bDeviceProtocolecho "GAME" > strings/0x409/manufacturerecho "USB Display" > strings/0x409/productecho "BF CPLD Rev: A_" > strings/0x409/serialnumber#USB DEVICEecho 250 > configs/c.1/MaxPowerecho 0x80 > configs/c.1/bmAttributesecho "USB Display" > configs/c.1/strings/0x409/configurationmkdir -p functions/acm.usb0 # serialecho 1 > os_desc/useecho 0xcd > os_desc/b_vendor_codeecho MSFT100 > os_desc/qw_sign echo RNDIS > functions/rndis.usb0/os_desc/interface.rndis/compatible_idecho 5162001 > functions/rndis.usb0/os_desc/interface.rndis/sub_compatible_idmkdir functions/rndis.usb0/os_desc/interface.rndis/Iconsecho 2 > functions/rndis.usb0/os_desc/interface.rndis/Icons/typeecho "%SystemRoot%\system32\ddores.dll,-134" > functions/rndis.usb0/os_desc/interface.rndis/Icons/datamkdir functions/rndis.usb0/os_desc/interface.rndis/Labelecho 1 > functions/rndis.usb0/os_desc/interface.rndis/Label/typeecho "USB Display" > functions/rndis.usb0/os_desc/interface.rndis/Label/dataln -s configs/c.1 os_descudevadm settle -t 5 || : ls /sys/class/udc > UDCCode:
systemctl status myusbgadget Code:
sudo journalctl -u myusbgadget.serviceCode:
joe@raspizero:~ $ systemctl status myusbgadget● myusbgadget.service -My USB Gadget Loaded: loaded (/usr/lib/systemd/system/myusbgadget.service; enabled; pres> Active: active (exited) since Sun 2026-01-25 22:56:56 PST; 29s ago Invocation: 2328c19b908f47caba44082c9013194c Process: 1474 ExecStart=/usr/bin/myusbgadget (code=exited, status=0/SUCCESS) Main PID: 1474 (code=exited, status=0/SUCCESS) CPU: 377msStatistics: Posted by mrkell28 — Mon Jan 26, 2026 7:16 am — Replies 2 — Views 72