ulfmagnetics
Posts: 1
Joined: Fri Apr 29, 2016 6:05 pm

Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Sat Apr 30, 2016 3:37 pm

Hi all, I've followed Adafruit's Ethernet Gadget Tutorial for my new Pi Zero and I have a statically-assigned IP address on the zero (see ipconfig output below.) When I plug the device into my Macbook Pro, however, I don't see a RNDIS/Ethernet Gadget appear in Network Preferences. I've tried all kinds of things, including removing the Android File Transfer agent, installing the HoRNDIS kernel extension, and manually loading the AppleUSBCDCEEM kext, but nothing will get the device to appear.

I've verified with IORegistryExplorer that the device is getting recognized by the USB hub:
Screen Shot 2016-04-30 at 8.33.16 AM.jpg
IORegistryExplorer showing the Pi Zero gadget in the device tree
Screen Shot 2016-04-30 at 8.33.16 AM.jpg (63.68 KiB) Viewed 9934 times

but for some reason the networking code just won't expose it as a network connection. Does anybody have any ideas on how to troubleshoot this? Thanks!

Code: Select all

pi@raspberrypi:~$ sudo ifconfig usb0
usb0      Link encap:Ethernet  HWaddr a2:fb:27:bf:20:19
          inet addr:192.168.7.2  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::b60b:c715:4afa:9509/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

agitprop
Posts: 1
Joined: Sat Jun 15, 2013 12:33 am

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Thu Jun 23, 2016 6:07 am

Someone please answer this one! I am in the exact same shoes :-(

aBUGSworstnightmare
Posts: 7871
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Sun Jun 26, 2016 11:49 am

Hi,

I configured the Zero like below:

1.) prepare a fresh uSD card with latest Raspbian image (at time of writing 2016-05-27)
2.) still on the host computer change two files on the uSD:
2.1) open 'config.txt' and add below code at the end of the file

Code: Select all

# Enable USB ethernet gadget
dtoverlay=dwc2
2.1. open 'cmdline.txt' and insert modules-load=dwc2,g_ether after rootwait
The new file now looks like this

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet init=/usr/lib/raspi-config/init_resize.sh
3.) insert the uSD card into your zero, connect a micro USB cable and connect the zero to your Macbook. The Zero will now boot for the first time.
4.) With the Zero connected check SYSTEM PREFERENCES->NETWORK for RNDIS/Ethernet Gadget
Looks like this for me:
window1.jpg
RDIS/Ethernet Gadget connected
window1.jpg (28.08 KiB) Viewed 9803 times
5.) open TERMINAL and type to connect to your ZERO (will take a little longer on first time. You should see the PI prompt ...
ssh.jpg
SSH into the Pi via USB cable
ssh.jpg (39.26 KiB) Viewed 9803 times
6.) You can share your internet connection with the gadget next. Click SYSTEM PREFERENCES->SHARING and enable internet sharing for the ZERO
sharing.jpg
Internet sharing enabled
sharing.jpg (31.03 KiB) Viewed 9803 times
7.) I like to use VNC connection in favor of SSH, that's why I install x11vnc. Look here for a small how-to viewtopic.php?p=1000517#p1000517

aBUGSworstnightmare
Last edited by aBUGSworstnightmare on Sun Jun 26, 2016 6:26 pm, edited 1 time in total.

aBUGSworstnightmare
Posts: 7871
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Sun Jun 26, 2016 1:02 pm

By the way: you can use SSH and VNC in parallel if you want to/need to (for whatever reason)
screenshot.jpg
SSH and VNC connected at the same time to ZERO USB ethernet gadget
screenshot.jpg (19.41 KiB) Viewed 9764 times

picky-picasso
Posts: 6
Joined: Sat May 24, 2014 11:38 pm

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Wed Jun 13, 2018 12:38 am

Never get past 5. I do EVERYTHING as listed here (it's not very difficult, it's only three steps) and the RNDIS gadget NEVER shows up in

Well - three steps after flashing the OS:

1. Flash
2. Change cmdline.txt
3. Change config.txt
4. create SSH file to enable SSH

Networking, ssh [email protected] always brings the same response (couldn't be resolved.)

this is wether I use Stretch, Jessie, light or full. I've tried Jessie from 2016, 2017 and 2018 (went online to find an old version, and it was newer than the two I had tried before)

PLEASE advise. Has something been changed?? Is there some way I can be sure about RNDIS? Is there someway the driver is not working.

Please do not respond with the four steps above - they are the ONLY information posted about doing this and I know how to do them. They do not work for me.

Please HELP!

Thank you in advance.

pp

brainscan
Posts: 1
Joined: Wed Mar 13, 2019 4:38 am

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Wed Mar 13, 2019 4:43 am

I had the same issue, and solved it by using a different Micro USB cable. I don't know if the first one was somehow for power only, or damaged because I was using it as a charging cable. But, I found another Micro USB cable, and connected it up the same way, and now it works!

oschettler
Posts: 3
Joined: Sat Nov 22, 2014 9:18 pm

Re: Pi Zero Ethernet Gadget doesn't show up on Macbook Pro?

Sun Jan 12, 2020 8:46 pm

picky-picasso wrote:
Wed Jun 13, 2018 12:38 am
Never get past 5. I do EVERYTHING as listed here (it's not very difficult, it's only three steps) and the RNDIS gadget NEVER shows up in
There were two things I had to do:

1. Make sure to use the middle USB socket on the Pi Zero, the one marked with the USB signal on the case.
2. Manually add the RNDIS device in my network configuration:

Image

Then I could ping the Pi Zero.

-- Olav

Return to “Networking and servers”