We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [gadget]

Gadget are a series of linux drivers that turn a (master) USB port into a slave device when connected to a host, the USB will be presented as a serial, ethernet, camera, printer, storage etc. https://github.com/torvalds/linux/tree/master/drivers/usb/gadget/function

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

RPi Zero W Ethernet gadget on Windows: headless config & debugging

I want to headless config my RPi Zero W with Raspbian Buster as an ethernet gadget on Windows 7 PC. So I installed RNDIS from Microsoft Corporation, I added modules-load=dwc2,g_ether ip=192.168.2.2::...
0
votes
0answers
29 views

Unable to access laptop's internet on Pi Zero over Usb

I've been going over so many web pages trying out numerous things for the past 6 hours to just get internet on my rpi to no avail hence I have come here to hopefully find a solution. Below are the ...
1
vote
1answer
68 views

Gadgetfs - Filesystem not found

While trying the solutions suggested by a comment on my first question I tried to enable gadgetfs. I tried the following: sudo modprobe dwc2 sudo modprobe gadgetfs sudo mkdir /dev/gadget sudo mount -...
3
votes
1answer
370 views

USB 3.0 OTG on Raspberry Pi 4 (USB gadget)

Raspberry Pi 4 can do USB OTG via the USB-C connector (according to this answer) - but only at USB 2.0 speeds since the USB-C connector only connects to USB 2.0 lanes. My question is - can Pi 4 also ...
2
votes
0answers
56 views

Is it possible to connect a Raspberry Pi 0 to the USB port of a router, to connect to the internet?

Recently I read (in articles such as this one) that it is possible to use the Raspberry Pi Zero in 'USB/Ethernet gadget mode'. Now my modem has two USB ports, which the manual says can be used for ...
4
votes
4answers
2k views

Where is the USB2 OTG port on the RPi 4 Model B located?

According to this answer the Raspberry Pi 4 Model B has a total of five USB ports (two USB3 host, two USB2 host, one USB2 OTG). Where is the fifth USB2 OTG port located and how can I use it? Can I ...
2
votes
0answers
58 views

Waking computer with raspberry pi zero usb keyboard gadget

I've been trying to set up a raspberry pi zero as a keyboard gadget, hoping i could wake a laptop (No ethernet) with it. I would also be able to encrypt it and send the password, which is an added ...
1
vote
0answers
34 views

Cannot SSH from pi zero to pi zero over OTG USB

I am running Raspbian Stretch Lite Linux testpi1 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l GNU/Linux I am able to SSH to my pi zero over the OTG USB cable as many guides online have ...
1
vote
1answer
78 views

RPI is not visible in LAN when using ethernet over usb

I'm following this tutorial for converting RPI to usb gadget. I've modified setup script a little to fit my needs: err_file=$HOME/usb_setup_err echo "Time: $(date -Ins)" >> $err_file echo '...
2
votes
0answers
182 views

Detect if a host is connected (gadget mode)

Device: Raspberry Pi Zero W v1.1 State: Pi Zero is running in gadget mode, acting as a USB Mass Storage device (seen by / mounted on a MacBook Pro). Question: What is the best way to detect whether ...
0
votes
0answers
55 views

Forward internet to usb0

I have Raspberry Pi 3 (running Raspbian) and Raspberry Pi Zero (DietPi). The Raspberry Pi 3 is connected to ethernet. The Raspberry Pi Zero is set as Ethernet gadget (according to this https://dietpi....
1
vote
1answer
763 views

Headless pi zero HID keyboard

I am trying to get my pi zero to act as a HID USB keyboard when plugged in to a computer, following this guide. I finished the configuration, and I get to the "Keyboard / Mouse / Joystick (HID)" ...
1
vote
1answer
472 views

Raspberry Pi Zero as webcam

I read some case, like using dwc2 and g_webcam in /boot/config and cmdline. but hard to understand and doesn't work. and can't find a tutorial, there are some tutorials only about serial and ethernet. ...
0
votes
1answer
278 views

Raspberry Pi Zero W access point sharing LAN thorough ethernet gadget

I've recently wanted to do a project with the Raspberry Pi Zero. Basically, I want to set up the Pi as an ethernet gadget for computers to be able to play games over WLAN. The computers have no wifi ...
3
votes
1answer
5k views

Use Raspberry Pi as keyboard/mouse output to control server

I want to connect to a RPi thought LAN (possibly with VNC) and have it controlling a server that is connected to the RPi by USB. Basically the RPi would have to send every keystroke/mouse movement to ...
0
votes
2answers
2k views

Is it possible to set a static IP for the first boot of headless Pi ethernet gadget?

I'm setting up a Raspberry Pi Zero as an ethernet gadget using the instructions here. That generally works but until I can log in to the Pi and configure it to use a static IP address it uses for its ...
0
votes
0answers
291 views

Pi Zero Connects as USB serial gadget, but does not receive data

I have a few Pi Zeros I'm working on for a project. I have the Pi connected to a PC with Windows 7 with a USB cable, and I need to send packets of text to it with information to control devices on the ...
1
vote
0answers
131 views

On RPi Zero, garbage received using g_printer gadget

I have a RPi Zero W as a printer gadget, and it shows up as a printer on my Macbook (solved here in comments https://unix.stackexchange.com/questions/408293/how-to-make-g-printer-usb-gadget-printer-...
1
vote
0answers
217 views

PI Zero gadget with g_ether on Ubuntu host creates new wired connection every boot

I have a Raspberry PI Zero running Raspbian Stretch 2017-09-07 configured in otg mode with the g_ether module loaded. When I set a static IP in the interfaces files, connecting on Windows is ...
0
votes
0answers
176 views

RPI Zero W gadget after plugging in turns my PC off

Hello I am making a rpi zero USB gadget but something is wrong with it I am sure that pads don't connect to each other
1
vote
1answer
398 views

configure pi as a usb gadget, add vivid driver to the image, build and run code

Need to configure RPi as a USB UVC (video camera gadget). As far as I understand here is how it can be done. Then I need to test this application. Instructions on how to do it located here. ...
8
votes
1answer
8k views

How to use Raspberry Pi 3 as a USB gadget

How can I use Raspberry Pi 3 as a USB gadget. Is there any way? How can I enable the USB gadget mode on Raspberry Pi?
0
votes
1answer
215 views

Powering the Pi zero from a USB port: what if I acidentally unplug it without doing “sudo shutdown”? How to protect it?

I want to create composite gadget device with Raspberry Pi Zero W, and use power and data in the same USB port on another, host, machine. I am worried about it being unplugged while things are written ...
4
votes
0answers
158 views

Check if a host device is connected to Pi Zero gadget

How can the Pi detect if a host device has been connected, and gather information about that device, when being used as a gadget (such as mass storage). It would be useful if I could detect this ...
4
votes
2answers
1k views

Pi Zero g_mass_storage not recognized by some computers until after another computer recognizes it

So the basic issue is this: once the Pi Zero with g_mass_storage is booted up, as long as there is a power source for it (like a battery, so it won't shut off) I can plug it into any windows machine (...
3
votes
2answers
4k views

USB Mass Storage Gadget - how to convincingly emulate a flash drive?

I've got a Pi Zero W that I'm using in OTG/gadget mode. I've activated dwc2 USB, partitioned and formatted the file that is to be used as filesystem and loaded g_mass_storage. It is working fine in ...
1
vote
1answer
730 views

Modifying libcomposite module doesn't work

I'm trying to modify the libcomposite module in a way that it prints the functions of which are loaded to the log file. I'm using an Raspberry Pi Zero W with the 4.9.20+ Kernel. I updated everything ...
2
votes
1answer
2k views

DHCP on USB0 of Pi Zero not working

I have set up my Raspberry Pi Zero with the USB Ethernet gadget as described by Adafruit. This works wonderfully with static IP addresses. Now I want to put a little DHCP server in the Pi, so that I ...