Hey, I have been trying to connect my BrickPi (version B, with pre-programmed SD card from the Dexter Industries starter kit) to my MacBook Pro (El Capitan, OS X 10.11) without success.
I connected it successfully to my MacBook Air (El Capitan as well) by doing the following:
(1) Using a Thunderbolt / Ethernet adaptor
(2) Powering up the BrickPi with the Ethernet cable plugged in (to the Thunderbolt adaptor)
(3) Setting my Thunderbolt Ethernet IP address manually in System Preferences / Network, “Configure IPv4” to “Using DHCP with manual address” and assigning the IP address 192.168.2.100 (the Ethernet Network adaptor turns green) - indeed the “Using DHCP” option doesn’t work (the Ethernet adaptor is yellow and the IP address doesn’t make sense)
(4) Opening a Terminal window, and typing the command “ssh 192.168.2.2 -l pi” and then entering the password “Raspberry” when prompted (step #4 is needed for whatever reason so that VNC Viewer can work)
(5) Opening the program VNC Viewer with the following VNC server: 192.168.2.2:1
This process opens the VNC window and I can use my MacBook Air screen to control the BrickPi connected via Ethernet.
When I try the exact same process but it hates my MacBook Pro and won’t connect:
the ssh command doesn’t work (responds “connect to host 192.168.2.2 port 22: Operation timed out”)
the VNC Viewer doesn’t work either
Yet, the Thunderbolt Ethernet adaptor is green (System Preferences) and the lights on the BrickPi are:
Ah, a victim of the “set up from a MAC” getting started page
I think that if you use that page the connection might work - but it should not work. First of all, as you have seen in your step 3) turning on DHCP doesn’t help in any way. That is because this command tells your MAC to wait on the ethernet port until your network’s DHCP server will send an address to the port. That is not what you want. There is a DHCP server hidden in the MAC but you have to configure this beast and that is a thing noone ever does.
What you should do is you shold set up the ethernet port of your MAC manually. No DHCP. Nothing. As you have made a connection with the other MAC we can assume that the Pi has an adress of 192.168.2.2. Open up network preferences, go to thunderbridge, set IP to 192.168.2.1 and netmask to 255.255.255.0. That should be enough.
Open up a terminal and type “ifconfig bridge0”
That should show you the configuration of the thunderbridge, check if the IP address is ok.
type “ping 192.168.2.2” and you should get an answer from your pi.
If that works you can try to connect via ssh.
Is there a reason why you don’t use Wifi? You could configure the wifi stuff on the pi via your Air, reboot the pi and connect from the Pro via Wifi.
Clearly Michael has more experience with Mac networking. I don’t want to hop in and trample his style, I’m not sure what you do next with his directions so go ahead Michael! Two questions though:
Michael, maybe you can help us improve the Mac directions? Where did we go wrong? Why does it seem to work for so many people? Why do you think it works for migcm’s air and not pro book?
@John: I don’t have a clue what’s going on. When I connect a new rapsberry system to my network I always start with monitor and keyboard connected to the pi and set up the WiFi things on pi side. Then I update/upgrade, reboot and connect from my mac via WiFi. My router gives adresses above 192.168.0.10 for Wifi so I have the range 2-10 for fixed adresses, for example for Raspberrys.
But the first thing I see here is that MIGCM is using an old brickpi system with password raspberry, so the direct connection without prior setup may not work with this system.
@MIGCM: Hm. Ok.I like what I see for the en4 side. I thought you will use the bridge0, but en4 should be fine. It has the right IP adress and it will address everything in the 192.168.2.x range. That is what we need. I assume that the raspberry is not happy on the other side.
I have 2 other ideas. You work with some macs so I assume you have a working WiFi network? There must be a WiFi router somewhere in your home. Does this router support direct connections via cable? That is, can you disconnect the raspberry from you mac, carry it to the router and connect to the router via cable? If you can do that, the raspberry should get a DCHP address from the router. Next step would be to look which address it got, you can do that via the setup page of your router. In the router setup, there should be a page that shows all connected devices. Now you can try to ping the raspberry via WiFi from both of your macs via Wifi. The connection will be Mac <-> WiFi <-> router <-> enthernet <-> raspberry.
Second idea: Keep all as it is, pi connected to mac via direct cable. Power down the rapsberry, grab the SD card and put it into your mac. I hope you have an older Macbook with an SD card slot? Otherwise you should use a card reader. If you look into the directory of your card you should find a file named cmdline.txt. Everything in this file is in one line, so you go to the beginning of cmdline.txt and enter “ip=192.168.2.5” or whatever you like, it should be in the 192.168.2.something range and it should not be 192.168.2.100. Save cmdline.txt, put the card back to the pi and fire it up.
@John: My experience here is that the mac is very picky. I have a Windows 10 netbook that pings dex.local with no problems but it does not work with my mac. Don’t know why. So I don’t use that and use the physical address.
Have either of you used Bonjour Browser to try to find the device? It’s free, it’s here: http://www.tildesoft.com/
I have been chasing this problem for months; it does seem to be worse on Macs. It doesn’t seem to happen to everyone (though everyone it does happen to shows up here!), in fact most people seem to NOT have a problem with this. Iv’e found that with Mac’s you can often find the device with Bonjour Browser, if it’s not showing up on the network, and not pinging.