Hi, I am setting up my Bela, everything via the IDE seems to be working fine. I'm now trying to set up a Linux-based audio project and need internet access to grab the Git repository and run apt-get. If I enable OSX (10.10.5) Internet sharing via the BeagleBone Black network interface, the device stops responding. I've attempted to power the device externally (via US😎 and communicate via Ethernet, also without success (I can't seem to connect to the device via Ethernet/DHCP, nor with manual settings a la how the USB network interface is set up). So I'm a little stuck. Any suggestions for getting my Bela on the internets? Thank you, Jeremy

So this may be interesting: I adjusted the settings in /etc/network/interfaces so that I could log in via SSH on ethernet. Enabling Internet Sharing via Ethernet results in the same freeze, so the problem appears to be unrelated to the network interface. I guess I'll try a USB wireless dongle next, or am I overlooking something fundamental about the Beaglebone/Bela vis a vis network communication?

Problem solved (via USB Wifi Dongle). I needed to a) power the Beaglebone via the 5V DC adapter (otherwise there wasn't enough amperage for the USB port) and b) configure 'wlan1' (rather than 'wlan0') in /etc/network/interfaces.

I updated the wifi wiki page at some point yesterday ...
sharing is feasible on Mac OS. These lines should do it on yosemite or earlier, but with el capitan I am still having troubles.

Run these on the Mac:

$ sudo /usr/sbin/sysctl -w net.inet.ip.forwarding=1
$ sudo /usr/sbin/natd -interface en1 -dynamic
$ sudo /sbin/ipfw add divert natd all from any to any via en1

where en1 is your host's wifi interface

additionally, you may have to do this on the bbb:

$ echo "nameserver 8.8.8.8" > /etc/resolv.conf
$ /etc/init.d/networking restart

you may also need

$ route add default gw 192.168.7.1 usb0

where 192.168.7.1 is the address of your host and usb0 is the connection in use 🙂

Also, on Yosemite I remember I had the MAC freeze when I was using the GUI to enable network sharing ... not sure whose fault it was...

a year later
24 days later

Google is really your best friend here, though I could not find a satisfactory solution that would work across all versions of Mac OSX, however on Linux and Windows it should work fine.

I would recommend you google for something like sharing internet connection over ethernet your-operating-system. Note the "ethernet" bit: the USB cable provides a virtual ethernet port, so the rules that apply to sharing over ethernet will apply in this case. It may or may not help to add "Beaglebone black" among the keywords.

8 months later

I had this exact problem (nearly two years later!) using OSX and the Pocket Beagle, which out of the box is limited to just USB for networking. For posterity here's a simple solution.

OSX internet sharing (System Preferences > Sharing) creates a network 192.168.2.0/24 with DHCP server. Using the Pocket Beagle with the Bela or BeagleBone default network configuration will not work since the USB network (usb0) is configured to a static IP of 192.168.7.2. A solution is to configure the PB to use DCHP to obtain an address dynamically from the OSX host.

Plug in the PB and enable Internet Sharing on the OSX computer. Enabling internet sharing will interrupt the existing IPv4 configuration and so you will no longer be able to reach the Bela over 192.168.7.2

Even though there is no IPv4 network connection, bela.local is advertising it's IPv6 address. We can still SSH to the PB using bela.local:

ssh root@bela.local

Now to disable the static IP and enable DHCP. Edit /etc/network/interfaces

pico /etc/network/interfaces

Comment out the usb0 static config IP from /etc/network/interfaces, and add the line iface usb0 inet dhcp saving and exiting Pico once you're done (control -X). It should look like this:

auto usb0
iface usb0 inet dhcp

# iface usb0 inet static
#    address 192.168.7.2
#    netmask 255.255.255.0
#    network 192.168.7.0

Last step, restart the networking service:

systemctl restart networking.service

(If you saw any problems there, see what systemctl status networking.service has to say.)

As the IPv4 address will be dynamic, and depend on the OSX configuration which we shouldn't need to care about, you will not be able to use 192.168.7.2 to access the Bela IDE any longer.

Instead we can use the hostname from now on:

http://bela.local

4 months later

@Mellor Hmm. I followed all the steps here, which seemed to succeed. However, I don't seem to be connected to the internet from Bela. Ifconfig does not seem present on the Bela image, so that doesn't help anything. I can't seem to ping "self" at 192.168.6.1, so I think that is not a good sign. I'm not on pocket Beagle, I'm on BBB. I'm on Mojave as of a few days ago.

Any ideas or things I should look for? Is it easier to get this up on the physical ethernet port instead of the USB? I could do that if that is a path of lesser resistance.

Can you log onto the board? That is, does

ssh root@bela.local 

work?

Yes. But any attempt from within that shell to access the internet (e.g. "ping google.com" or an apt-get to load a package) will fail. And I can't run ifconfig because it doesn't seem to be part of the bela image, which seems strange to me.

the modern replacement for ifconfig is ip a, but that would not tell you much I guess in this case. Can you try
ping 8.8.8.8
instead of ping google.com ?

Hooray. I powered down the Bela, deleted the entries from the Mac, restarted, and restarted sharing. Now I can see 8.8.8.8 and google.com and was able to "apt-get install bluez". Now if I can get it to see my BLE dongle, I may be very close to success with Bela.

Thank you very much for all your help. If I do succeed, I will be able to share some very worthwhile stuff and will write it all up for others to use. Mostly plumbing, but plumbing is very important! If I can show a simple app with wireless remote control from iOS, I hope it will be something others can build off of.

oh that's great! Looking forward to seeing the results!

5 years later

Hi,
I tried the above ssh commands using OXS Ventura but now I can't connect to my Bela Mini through Bela.local.
Do I need to re-flash it or can I find it's IP from within OSX somehow?

you can use the virtual serial connection to log onto the board and check its IP. E.g.:

screen /dev/tty.usbmodem*bela*

then hit enter, type in the username root and hit enter again. Now you should be on the board and should be able to do ip a to see what IP address was assigned to you. However, it is weird that bela.local doesn't work: as soon as the host gives Bela an IP, bela.local should start working.