How to create a very basic WiFi access point on CHIP

These notes came from a project that needed a small group (8) of CHIP computers to receive UDP messages via WiFi coming from a single CHIP. This does not describe how to create a WiFi router for internet sharing - it simple creates a convenient, insecure, local network for passing messages among machines.

In this scenario, the single CHIP that acts as a WiFi Access Point can be connected to another network (including the internet). This makes it convenient to ssh to the WAP CHIP from your laptop (from which you can then ssh to the others on the network).

The first step is to configure CHIP to provide IP addresses through DHCP leases on the wlan1 interface. We are also making sure that we don't provide leases on wlan0, since that is usually used by CHIP to connect to outside networks.

Install dnsmasq:

sudo apt-get install dnsmasq

the file /etc/default/dnsmasq has the enable flag for running as daemon, if needed.

Create a configure file to restrict DHCP injections on client network interface. With this wlan0 becomes a way to connect to a network, and wlan1 becomes CHIPs access point.

sudo nano /etc/dnsmasq.d/access_point.conf

add the lines

#If you want dnsmasq to listen for DHCP and DNS requests only on
#specified interfaces (and the loopback) give the name of the
#interface (eg eth0) here.
#Repeat the line for more than one interface.
#Or you can specify which interface not to listen on

we also want to set the range and time of leases:

#Uncomment this to enable the integrated DHCP server, you need
#to supply the range of addresses available for lease and optionally
#a lease time. If you have more than one network, you will need to
#repeat this for each network on which you want to supply DHCP

Create a file to set up a static IP for the access point:

sudo nano /etc/network/interfaces

and have the contents like so:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
  source-directory /etc/network/interfaces.d
  auto wlan1
  iface wlan1 inet static

Confirm that the static IP is assigned:

sudo ifup wlan1

ip addr show wlan1

and you'll see the address listed


now restart the DHCP server that dnsmasq provides

sudo /etc/init.d/dnsmasq restart

We have just tested the IP configuration portion.

Now we can configure the WiFi access point on wlan1.

Create a config file:

sudo nano /etc/hostapd.conf

and add the lines:


then we can start the access point with

sudo hostapd /etc/hostapd.conf

You'll see the network come up on another device, like your laptop or tablet or phone:


Now we would like to configure CHIP to create the access point automatically on boot.

We can setup a systemd service to do our bidding. We give the service a unique name, so it doesn't conflict with the systemV stuff in init.d:

sudo nano /lib/systemd/system/hostapd-systemd.service

Fill the service file with these contents:

Description=hostapd service

ExecStart=/usr/sbin/hostapd /etc/hostapd.conf


Disable the existing systemV script for booting hostapd:

sudo update-rc.d hostapd disable

Now we can setup the systemd service with these commands:

sudo systemctl daemon-reload

sudo systemctl enable hostapd-systemd

Reboot or test with these commands:

sudo systemctl start hostapd-systemd

systemctl status hostapd-systemd

The access point and DHCP server should be accessible from other devices!

If you want to connect another CHIP to this access point, you can do it from a GUI, or with the command:

sudo nmcli d wifi connect test_chip_ap