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

Having issues with MacOS Catalina and gadget mode

Tue Oct 22, 2019 3:29 pm

I have used the pi zero in gadget mode off of a USB port on my mac for years. The only minor issue I had is that every time I plug in and boot the pi, a new driver is installed in the list. Catalina changed that. Now I can't get a reliable connection. Every time I reboot the pi, the address doesn't connect. I even added static settings to the /etc/dhcpcd.conf file on the pi, but can't seem to get things to work as they did before I updated my Mac.

Anyone else having these issues? Did you get them resolved?

Other notes:

Also now you need to manually add the RNDIS driver after the mac sees the pi.

If I plug the pi zero into the USB port of a Pi 3B+, it does work as expected.

All systems running latest Buster 9/26/19.

I have both used DHCP and manually set addresses on the mac.


What I want is:

Settings for both the pi and the mac such that when I plug it in, things work.

I want the pi to know where the gateway is (the mac).

User avatar
DougieLawson
Posts: 38854
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Having issues with MacOS Catalina and gadget mode

Tue Oct 22, 2019 5:43 pm

If you can, back off Catalina. It's the most broken, most poisonous OS that Apple have ever let loose in the wild.

It is untested, it is full of bugs, USB doesn't work, 32-bit applications don't run.

The internet is littered with reports of how exceedingly bad the Catalina experience has been for thousands of unlucky users who've had the misfortune to install it.

It's clearly a product of Apple shifting to agile development, which we all know means the testing gets done in the field.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

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

Re: Having issues with MacOS Catalina and gadget mode

Wed Oct 23, 2019 12:11 am

Don't beat around the bush, just tell me how you feel.

Thanks, maybe one of these days, Apple will fix it.

Mark

User avatar
thagrol
Posts: 2956
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Having issues with MacOS Catalina and gadget mode

Wed Oct 23, 2019 11:31 am

markatlnk wrote:
Tue Oct 22, 2019 3:29 pm
I have used the pi zero in gadget mode off of a USB port on my mac for years. The only minor issue I had is that every time I plug in and boot the pi, a new driver is installed in the list.
I'm guessing you don't specify MAC addresses when loading g_ether on your zero. That means you'll get a different random MAC address each time so the OS on your USB host thinks you've added a new ethernet device.

Try passing host_addr and dev_addr parameters when loading g_ether e.g.:

Code: Select all

modprobe g_ether host_addr=11:22:33:44:55:66 dev_addr=66:55:44:33:22:11
I've code that can do this for you and generate MAC addresses from the Pi's serial number here: https://github.com/thagrol/usb-gadget

I can't comment on the MacOS specific stuff as I don't have access to it.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

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

Re: Having issues with MacOS Catalina and gadget mode

Wed Oct 23, 2019 3:03 pm

Setting the MAC address to a specific value did fix my problem. Thanks for that. I did it in the cmdline.txt file.

I added the following to cmdline.txt:

modules-load=dwc2,g_ether g_ether.host_addr=00:22:82:ff:ff:20 g_ether.dev_addr=00:22:82:ff:ff:22

I put it after the rootwait

I should have thought of that.

Thanks.
Mark

tinker2much
Posts: 174
Joined: Wed Jun 20, 2018 12:38 am

Re: Having issues with MacOS Catalina and gadget mode

Fri Nov 22, 2019 6:26 pm

I have also been having issues with my PiZero USB Ethernet Gadget since I upgraded to Catalina - I could still SSH into it, but it no longer got its internet from my Mac. I can't say I was getting a new driver each time, though I did have TWO of them when I looked just now. I deleted one.

I did what @markatlnk did, and I can SSH to the box (as before, that wasn't the problem), and now I can also get to the internet.

Thanks for the tip.

Return to “Advanced users”