I share an Internet connection to a Raspberry Pi connected via USB.
On my MacBook (12.2.1) this works not-entirely-consistently, and right now, not at all.
I know it's not the Pi that's problem; it works with other machines.
I can reach the Pi via SSH, but it can't see the rest of the world. It has a 169 address on its usb0.
I'm not sure whether to blame the Network configuration or Internet Sharing.
It's quite maddening. Also a fairly niche configuration...
I share an Internet connection to a Raspberry Pi connected via USB.
On my MacBook (12.2.1) this works not-entirely-consistently, and right now, not at all.
I know it's not the Pi that's problem; it works with other machines.
I can reach the Pi via SSH, but it can't see the rest of the world. It has a 169 address on its usb0.
I'm not sure whether to blame the Network configuration or Internet Sharing.
It's quite maddening. Also a fairly niche configuration...
I share an Internet connection to a Raspberry Pi connected via USB.
On my MacBook (12.2.1) this works not-entirely-consistently, and right now, >> not at all.
I know it's not the Pi that's problem; it works with other machines.
I can reach the Pi via SSH, but it can't see the rest of the world. It has a >> 169 address on its usb0.
I'm not sure whether to blame the Network configuration or Internet Sharing.
Can't help directly but only point you to this bloke who has done it and
it all seems to be pretty straightforward.
<https://www.thepolyglotdeveloper.com/2016/06/connect-raspberry-pi-zero-usb-cable-ssh/>
D.M. Procida wrote:
I share an Internet connection to a Raspberry Pi connected via USB.
On my MacBook (12.2.1) this works not-entirely-consistently, and right now, >> not at all.
I know it's not the Pi that's problem; it works with other machines.
I can reach the Pi via SSH, but it can't see the rest of the world. It has a >> 169 address on its usb0.
I'm not sure whether to blame the Network configuration or Internet Sharing. >>
It's quite maddening. Also a fairly niche configuration...
Does the MacBook have a connection to the router?
I imagine your Pi is configued for automatic configuration. This means
that it tried to find a DHCP server on the network to which it is
connected. When this fails it allocates itself a 169.x.y.z IP address.
Your MacBook when configured for Internet Connection Sharing should
behave as a DHCP server for devices connected to its USB port(s). You
might have to nominate the USB port.
Probably the MacBook will relay
the DHCP request to the upstream DCHP server (your router); that way the
Pi should get an IP address on the same subnet as the other devices
conencted to your router. Alternatively the MacBook may create a
different subnet on the USB port(s) and function as a router, carrying traffic between the the two subnets.
Whatever, once configured
correctly, it should continue to work.
However, I think the Pi should have an Ethernet port. It would be
possible to connect it directly to your router, so you don't have to
worry about conenction sharing from your MacBook.
I'm going to be reduced to tailing logs on the MacBook for DHCP requests like some kind of animal.
However, I think the Pi should have an Ethernet port. It would be
possible to connect it directly to your router, so you don't have to
worry about conenction sharing from your MacBook.
You're right about most Pis, but this one's a Pi Zero, so no Ethernet. For a Pi Zero, USB gadget mode - i.e. client mode - is most convenient, allowing the
Pi to use its USB port to obtain its network connection.
D.M. Procida wrote:
[snip]
I'm going to be reduced to tailing logs on the MacBook for DHCP requests like
some kind of animal.
One would hope there is some sort of log showing the activity of the "bridge100" interface.
Probably the MacBook will relay
the DHCP request to the upstream DCHP server (your router); that way the
Pi should get an IP address on the same subnet as the other devices
conencted to your router. Alternatively the MacBook may create a
different subnet on the USB port(s) and function as a router, carrying
traffic between the the two subnets.
Yes, it's the latter, the Macintosh will create a "bridge100" interface, on a 192.x.x.x network (not the same network as its own upstream DCHP server).
Whatever, once configured
correctly, it should continue to work.
It should. But it doesn't. Until now it has worked as expected (on the same MacBook), and as I mentioned, the same Pi is able to pick up its IP address from other Macs also set for Internet sharing.
I'm going to be reduced to tailing logs on the MacBook for DHCP requests like
some kind of animal.
One would hope there is some sort of log showing the activity of the
"bridge100" interface.
A bit of wireshark-type packet capture on that interface is likely to be
the most useful next move, faffy though it is. macOS's logs are
diabolical these days, I can't find anything useful in them at all -
they seem to have been redesigned for only Apple internal engineering
use.
The last time I know that this worked for certain was 11th March (from Git logs). I can't remember applying macOS updates since then, but I am downloading 12.3.1 right now.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 119:49:26 |
Calls: | 6,854 |
Files: | 12,357 |
Messages: | 5,416,930 |