fangfufu
Posts: 27
Joined: Sun Jul 15, 2012 5:03 pm

Does Ethernet gadget mode still work on Raspberry Pi Zero W?

Fri Mar 10, 2017 1:58 am

I received my Raspberry Pi Zero W. I tried to configure it as a USB Ethernet gadget. It doesn't seem to be working.

I tried following this tutorial:
https://gist.github.com/gbaman/975e2db1 ... e45e8fd40a

This tutorial works fine for Raspberry Pi Zero v1.2

So has anyone else tried what I did? Was it successful?

markatlnk
Posts: 52
Joined: Sun Feb 23, 2014 7:53 pm

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Sat Mar 11, 2017 4:29 pm

Yes it works fine.

I used it with both jessie-lite and the full jessie on a Pi Zero W. I did it from a 2016 MacBook Pro with USB-C to USB-A dongle. Make sure you edit a few files in the boot partition and also create a file named ssh in the boot directory.

Mark

drdoolittle
Posts: 2
Joined: Wed Mar 15, 2017 11:53 am

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Wed Mar 15, 2017 12:35 pm

Yes it works here too (Windows 7) with the current 2017-03-03 image. Initially it's only recognized as unknown RNDIS device, so I had to manually install the Microsoft RNDIS driver.

Unfortunately HID Mode doesn't seem to work. The PI gets recognized as 'unknown device' only? How can it be tweaked so that it is automatically detected as HID input device? Would love to play around using it as a cheap rubber ducky payload 'stick' :)

itakenaps
Posts: 3
Joined: Tue May 02, 2017 7:18 pm

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Tue May 02, 2017 7:23 pm

I am trying to set up my Pi zero w as a Ethernet gadget and its not coming up at all. I'm editing the config.txt file to include the dwc2 driver and setting the 'modules-load=dwc2,g_ether' in the cmdline.txt file. The pi boots as indicated by the LED but then nothing. I've tried my windows, mac and linux systems and they all see the same - nothing.

I was able to access the pi via WiFi interface. Setting up the wpa_supplicant.conf file and the empty 'ssh' file allow me to get the pi to join the network and use SSH.

However, I really need to have the ability to use the USB gadget. Does anyone have any thoughts on why its not coming up?

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4200
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Tue May 02, 2017 7:56 pm

YMMV but i've found the only way I can get gadget mode to work for a freshly made sd card is to either do the 1st boot & let the resize happen, power off and then edit the config.txt & cmdline.txt files or remove the resize part of cmdline.txt and resize using raspi-config.

I've not heard of others having to do this but it is very consistent for me. if i edit the files and let the 1st boot resize happen that sd card will never work for gadget mode but if i do the above it works 1st time all the time

fruitoftheloom
Posts: 21644
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Tue May 02, 2017 7:57 pm

itakenaps wrote:I am trying to set up my Pi zero w as a Ethernet gadget and its not coming up at all. I'm editing the config.txt file to include the dwc2 driver and setting the 'modules-load=dwc2,g_ether' in the cmdline.txt file. The pi boots as indicated by the LED but then nothing. I've tried my windows, mac and linux systems and they all see the same - nothing.

I was able to access the pi via WiFi interface. Setting up the wpa_supplicant.conf file and the empty 'ssh' file allow me to get the pi to join the network and use SSH.

However, I really need to have the ability to use the USB gadget. Does anyone have any thoughts on why its not coming up?
Maybe the USB Cable you are using is not suitable ??
Retired disgracefully.....
......to a more gentile life !

itakenaps
Posts: 3
Joined: Tue May 02, 2017 7:18 pm

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Wed May 03, 2017 2:48 pm

ukscone wrote:YMMV but i've found the only way I can get gadget mode to work for a freshly made sd card is to either do the 1st boot & let the resize happen, power off and then edit the config.txt & cmdline.txt files or remove the resize part of cmdline.txt and resize using raspi-config.

I've not heard of others having to do this but it is very consistent for me. if i edit the files and let the 1st boot resize happen that sd card will never work for gadget mode but if i do the above it works 1st time all the time
This is great advice. I will make sure to resize before doing anything else.

itakenaps
Posts: 3
Joined: Tue May 02, 2017 7:18 pm

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Wed May 03, 2017 2:50 pm

fruitoftheloom wrote:
itakenaps wrote:I am trying to set up my Pi zero w as a Ethernet gadget and its not coming up at all. I'm editing the config.txt file to include the dwc2 driver and setting the 'modules-load=dwc2,g_ether' in the cmdline.txt file. The pi boots as indicated by the LED but then nothing. I've tried my windows, mac and linux systems and they all see the same - nothing.

I was able to access the pi via WiFi interface. Setting up the wpa_supplicant.conf file and the empty 'ssh' file allow me to get the pi to join the network and use SSH.

However, I really need to have the ability to use the USB gadget. Does anyone have any thoughts on why its not coming up?
Maybe the USB Cable you are using is not suitable ??
Honestly, I never considered this but in hindsight probably should have. I implemented the advice given about letting the system expand the file system before modifying the configuration options and replaced the cable and now my system is recognizing the RNDIS device.

Thank you all for your input!

pi_everalm
Posts: 33
Joined: Thu Apr 20, 2017 11:44 am

Re: Does Ethernet gadget mode still work on Raspberry Pi Zer

Wed May 03, 2017 5:55 pm

I've run into this type of problem with USB cables before. A surprising number of the cables that come free with a charger only have two wire strands for charging not 4 for power and data.

Return to “Advanced users”