Bug #455


hostapd doesn't come up after switching from wireless client mode

Added by Hammel almost 9 years ago. Updated almost 9 years ago.

04 - Root File System
Target version:
Start date:
01 Jul 2015
Due date:
% Done:


Estimated time:
03 - Medium


When switching to hostapd mode and restarting the network the system does not start up the network. The hostapd.conf appears correct. I'm using the same network wifi dongle I used in the field trial server. I need to check the configuration of the field trial server vs this version (in "pibox2"). hostapd is running but dhcpd is not. I think this may be because /etc/dhcpd.conf needs to be in /etc/dhcp/dhcpd.conf. Also, the server may need to have its wlan0 interface manually configured.

Actions #1

Updated by Hammel almost 9 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

I think the only difference between the PiBox2 system (the system under test) and the field trial server is this entry in /etc/network/interfaces:

auto wlan0
iface wlan0 inet static

The way to fix this would probably be to strip the iface entry and its associated lines using the S40network script. The harder way (and probably more correct) would be to modify that file in bui-network-config and piboxd.

Actions #2

Updated by Hammel almost 9 years ago

  • % Done changed from 10 to 20
How to fix this in bui-network-config:
  1. Need to add base network address field to Access Point tab.
  2. updateHostAP needs
    1. Add N_HAP_NET to HOSTAP_OPTIONS indexes list (load.h:72)
    2. Validate network address field
    3. Save new network address field as GSList entry N_HAP_NET
  3. set wireless interface to be static in saveHostAP
    1. find INTERFACE_T->name = wlan0
    2. set INTERFACE_T->addressType = static
    3. set INTERFACE_T->address = network address of wlan0 based on N_HAP_NET
    4. set INTERFACE_T->netmask =
    5. Clear INTERFACE_T->gateway
  4. saveHostAP needs to call saveInterfaces

The setting of the wlan0 interface in this manner might be done after saving a copy of its current config, performing these actions, then resetting them so that the previous saved values remain if the user decides to return to them. We only need to change the settings long enough for saveInterfaces to do it's thing.

Note that piboxd's save.c is not the same. It may need to be merged with bui-network-config and then have both use a shared library. The library should go in bui-network-config since that is built into the dev platform.

Actions #3

Updated by Hammel almost 9 years ago

  • % Done changed from 20 to 50

This is implemented and tested, but it's missing a load action for the saved base network address. The way to get this is from the /etc/network/interfaces entry's "address" line.

Once that's implemented this issue can be closed. Current updates are not checked in, however.

Actions #4

Updated by Hammel almost 9 years ago

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

Fixed now. The UI will stick to static when switching back to wifi from hostap, but that can be easily changed to dhcp manually.

So this works correctly now.

All changed committed and pushed.

Closing issue.


Also available in: Atom PDF