Can't connect Brick Pi to computer

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:

  • ACT light = off
  • PWR light = solid red
  • FDX light = solid green
  • LNK light = solid green (occasional blinking)
  • 100 light = solid orange

I hope you have advice for me.

Thank you.

Ah, a victim of the “set up from a MAC” getting started page :slight_smile:

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.

Regards,

Michael

Hello Michael,

Thank you so much for your prompt and detailed response: it feels good that there are other “setup from a Mac” victims! :wink:

I switched to a manual setup of the DHCP server and changed the netmask to 255.255.255.0 (instead of 255.255.0.0).

The ifconfig brigde0 returns the following:

bridge0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 7a:31:c1:7c:ac:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
Address cache:
media: <unknown type>
status: inactive

My Thunderbolt Ethernet is on en4 and the response is:

en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
ether 38:c9:86:16:d0:4d
inet6 fe80::3ac9:86ff:fe16:d04d%en4 prefixlen 64 scopeid 0xa
inet 192.168.2.100 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=1<PERFORMNUD>
media: autoselect (100baseTX <full-duplex,flow-control>)
status: active

Now what can I do?

The ping command still returns a timeout.

Can I force the selection of this en4 network interface in the ping command?

Thank you.

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. :slight_smile: 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.

You should be able to ping da pi.

Regards,

Michael

Ah, here is a short tutorial:

They mention notepad++ which is a great programming editor - if you don’t have a mac. You should use TextWrangler.

@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.

I haven’t tried. Will do.