Project

General

Profile

Actions

Feature #207

closed

Add dhcpd to rootfs

Added by Hammel over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
31 Jul 2013
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

Use of the access point requires providing dhcp services.

  1. Add (if it's not there yet) dhcpd to the rootfs
  2. Provide a default configuration
  3. Make sure it gets started when hostapd gets started.

The default DHCP server is udhcpd in Busybox. Buildroot offers the ISC dhcp server.

References:

Files

dhcpd.conf (557 Bytes) dhcpd.conf Sample dhcpd configuration Hammel, 04 Aug 2013 18:04
hostapd.conf (139 Bytes) hostapd.conf Working hostapd.conf for PiBox Hammel, 12 Aug 2013 20:10
Actions #1

Updated by Hammel over 10 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Busybox's udhcpd is lighter weight but requires rebuilding the entire rootfs to try it (it's not configured currently). I'll try the ISC version first to see how much size that adds to the rootfs and to see if it writes outside of /var/*.

Actions #2

Updated by Hammel over 10 years ago

ISC dhcpd in Buildroot comes with a bad init script and configuration. I've come up with a working configuration for the 192.168.3.x network. See attached file.

The buildroot init script (S80dhcp-server) should be removed as a post-build step.

To use this the S40network script should manually configure wlan0 when the WAP is configured. The address for the board should default to 192.168.3.x to match the config file and bui-network-config should allow manually editing /etc/dhcpd.conf in case the user changes the static IP for wlan0. I can either force the configuration to the .3 subnet in bui-network-config or I can allow the user to shoot themselves in the foot if they want. I prefer the latter. Let's build better dummies.

Also, the default configuration location for dhcpd is /etc/dhcpd.conf. This differs from the location created by buildroot. So the rootfs build should remote /etc/dhcpd/ as a post-build step. dhcpd.conf should be added to src/buildroot/skeleton/etc in the PiBox source tree.

Actions #3

Updated by Hammel over 10 years ago

  • % Done changed from 30 to 60

Added support to rootfs build for dhcp, including default dhcpd.conf. Added support to bui-network-config to edit conf file, if desired. Configuration was manually tested.

Next up:
  1. Edit S40network to manually start/stop dhcpd when access point it configured.
Actions #4

Updated by Hammel over 10 years ago

After running some tests I found that one of the USB wifi adapters I've marked as supported in /etc/usbhandler.conf doesn't work with hostap because the driver doesn't support it, even though the adapter does. I switched to a TP-Link TL-WN727N adapter and it works just fine. However, I found my default hostapd.conf file was not correct. I think the auth_algs was wrong - it was set to 2 when it should have been set to 1 even when using PSK authentication. "1" means open, which implied no PSK, but that's a wrong assumption.

So I got a working hostapd.conf now (see attached). I just have to integrate it into bui-network-config.

I also have a working update to S40network. I need to check that in to.

And then hostapd will be officially supported. Yippeeeeee!

Actions #5

Updated by Hammel over 10 years ago

  • Severity changed from 04 - Low to 01 - Critical
Actions #6

Updated by Hammel over 10 years ago

  • % Done changed from 80 to 90

Fixed bui-network-config so it handles the hostapd.conf correctly.

Actions #7

Updated by Hammel over 10 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

S40network update has been pushed upstream.

This issue can be closed.

Actions

Also available in: Atom PDF