Wifi acces point on Beaglebone with DHCP

With the OS of Debian new opportunities have come. The Angstrom distribution did not meet our requirements because conman and ROS was not supported well yet, while Ubuntu didn’t have PWM, so that’s how Debian came into picture. The idea of connecting to the BeagleBone directly is better then connecting through some middle layer (like a router). To be this simple we need to config an acces point on the BeagleBone. Step Zero: ifconfig
You need to config the network interfaces. Here you can see my case:

At this point you may see the Beaglebone along the connectable wifi network. You can connect to it, but you have to set your IP to be in the same network. Or you can use DHCP that will be explained below.

Step Two: DHCP server
This is optional, you can connect to the Beaglebone, but you won’t get an Ip. Either you config staticly your ip to be in same network as your Beaglebone or you can use dhcp. Install it by:

dnsmask will not give you a DHCP server if you are not connected to the network. There are applications for the Beaglebone Black as a router that include controlling remote devices through a tablet while not necessarily connected to the Internet. A standalone DHCP server is not that heavy and will always work.

Hi,
I have been trying to do just that with the Angstrom distro with no success. I have not gotten a single Wifi dongle to work with it (tried 3).
Could you share the Debian version you used (and where I could get it from) and the type of WiFi dongle you used?
Also, did you have to install any drivers for the Wifi dongle that did not come with the distro?
Thanks in advance!

I would like to set up my beaglebone black, so that it starts up as an access point. I would then use my phone, to connect to the access point. I would have a simple web page that allows the user to configure the beaglebone black to connect to home router. After a reboot the BBB is connected the home network.

I guess what I am looking for is two discrete configurations. My current configuration allows me to connect to my home router.

Both isc-dhcp-server and dnsmasq failed to start for me. (dnsmasq worked the first time but didn’t work later). Turns out udhcpd was already bound to port 67 so that it can hand out addresses on interface usb0.

Furthermore, udhcpd has a bug where it ignores the interface option and binds to all addresses. So I don’t think it’s actually possible to have udhcpd serve for both USB and WLAN.

But if I change the /opt/scripts/boot/autoconfigure_usb0.sh to make the /etc/udhcpd.conf file like this, it works on the wifi side:

# Managed by /opt/scripts/boot/autoconfigure_usb0.sh – Do not modify unless you know what you are doing!
start 192.168.4.2
end 192.168.4.10
interface wlan2
max_leases 9
option subnet 255.255.255.0

I think a better answer is to remove udhcpd and use one of the other two dhcp servers for both usb and wifi interfaces.

Thanks for this organized tutorial. I just started and have run into a few issues / questions because I’m admittedly a super rookie. I also know it’s been awhile since someone has posted on here so I’ll keep my fingers crossed:
1) For step zero (ifconfig) … should we make our file match yours? I’m working on a 2014 Mac and it doesn’t have an ethernet port (not sure if that matters or not)
2) I started on step one and I’m getting errors like this:
Configuration file: /etc/hostapd/hostapd.conf
nl80211: ‘nl80211’ generic netlink not found
Failed to initialize driver ‘nl80211’
Segmentation fault
….. has anyone else experienced this? I’ve read in some places that it’s wifi hardware issues and in some places that it’s a debian / linux issue.

This tutorial was for BeagleBone, so you don’t have to copy exactly the file content in step zero. Only part is neccessary is the wlan part and feel free to modify it according to your needs.
For the second question, if I understand you correctly you would like to setup your 2014 Mac as wifi hotspot machine. In that case I would recommend to check your issue on Debian forums. Since I only have done the tutorial for Beaglebone, and so far I haven’t hit those issues. For me your issue sounds like your system have some problems with your wifi drivers. If your wifi works normally it is high chance that is the case. I hope this helps you.