4

Issue

MacOS is not finding/discovering my Raspberry Pi Zero as an USB Ethernet Device upon USB connection.

Background

I flashed my Raspberry Pi Zero with the ARMEL firmware, linked on the page re4son-kernel.

After flashing the firmware, I opened the /boot/ partition, I modified cmdline.txt and, because config.txt was not created I created config.txt.

Inside cmdline.txt I added: modules-load=dwc2,g_ether after rootwait. Inside config.txt I added: dtoverlay=dwc2 to the bottom of the file.

I also, added a file w/o an extension called: ssh to enable SSH on the device.

I plugged the Micro-USB male header into the port on the Pi0 that gives DATA + PWR and then connected the male USB 2.0 header into the USB port on my Mac. After waiting a few minutes, I didn't see the Pi come up as a USB Ethernet Device.

Please Note: I followed the tutorial, Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way! by gbaman, however, instead of flashing Raspbian Jessie onto my Micro-SD card I flashed re4son-kali-linux.

Questions

Why doesn't my Mac discover my Pi0?

What am I doing wrong?

Is there specific settings I missed?

4

Background

Okay so after a bit of research, I figured out what the problem was with a little help from Re4son.

See the following forum thread for more information: MacOS not Discovering Raspberry Pi Zero using Re4son Firmware

What OS am I running? I am running MacOS Sierra on my MacBook Pro.


Solution

Steps:

  1. Image a micro SD card using Re4son Kali Kernel
  2. Leave the card in your computer and edit the following two files in the /boot partition:

    – cmdline.txt: Add modules-load=dwc2,g_ether after rootwait

    – config.txt: Add dtoverlay=dwc2

    – Add avahi to /boot/avahi Notice, no extension.

  3. Insert the card into your Raspberry Pi Zero

  4. Install the HoRNDIS driver if not running MacOS Sierra MacOS Sierra already has the RNDIS driver installed. This installs the RNDIS driver for your Mac. If you already have the driver installed, deleted it and reinstall it. For some reason, the interface I had wasn't working for me and the solution was to reinstall the driver; see forum thread for more information.
  5. Configure the RNDIS/Ethernet Gadget exactly as shown:

https://gyazo.com/f75f56e667b25a8708c3d4bbb03ff684

  1. Turn on Internet Connection Sharing (ICS):

https://gyazo.com/697e4cafca6e77c17e6e382aa284f328

  1. Insert the micro USB cable into the USB port of the Pi (not the power port) and your computer
  2. Wait for the Pi to boot up. If you see the Pi0 obtain a Self-Assigned IP with an Amber light, don't fret, according to Re4son: "I don’t know why Apple decided to go with an amber light instead of green but amber seems to mean “All ok, this MacBook assigned an IP address to your pi, you are ready to rock’n’roll””:

https://gyazo.com/b9037ca3330c8ef60e6f406e3a4a33bd

  1. ssh into kali-pi.local if using Re4son's Kali Kernel: ssh root@kali-pi.local

  2. Run ifconfig usb0 to see if the Pi0 has obtained a valid IPv4 address. If the Pi0 did not obtain a valid IPv4 address then run: ifdown usb0 && ifup usb0.

asciicast

  1. Check for an internet connection by running: ping 8.8.8.8.

  2. Done!

  • 1
    Glad it works for you. You might wish to add the Mac OS version you are using, as under Sierra, the HoRNDIS driver isn't needed. At least with Raspbian, it isn't. Also, your gyazo image links don't show up as images, but as offsite links to a very ad-heavy site – scruss Apr 7 '17 at 12:11
1

For users with macOS Sierra (and I think newer):

First, you need to have an RNDIS/Ethernet Gadget interface in the Mac's Network Preferences.

This is available as standard on Sierra. However, it might not appear automatically in the Network Preferences, and you may have to add it, using the + icon. The list of available interfaces to add will not include RNDIS/Ethernet Gadget unless the Pi Zero is actually attached.

Once added, you should see that it's Connected, and that

RNDIS/Ethernet Gadget has a self-assigned IP address and will not be able to connect to the Internet.

You should now be able to reach it at raspberry.local, e.g. with ssh pi@raspberrypi.local.

The next step is to give the Pi Internet access; you can do this in Sharing Preferences, and share the Internet connection to the newly-established interface.

0

Does the re4son kernel include the dwc2 and g_ether modules?

On your Mac, you need to enable network sharing under the System Preferences / Sharing option. You should then be able to see hostname.local (if your distro supports avahi) or a useful IP address for the local/remote side with ifconfig.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.