hostapd doesn't come up after switching from wireless client mode
|Status:||Closed||Start date:||01 Jul 2015|
|Category:||04 - Root File System|
|Severity:||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.
#1 Updated by Hammel about 2 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 address 192.168.3.1 netmask 255.255.255.0
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.
#2 Updated by Hammel about 2 years ago
- % Done changed from 10 to 20
- Need to add base network address field to Access Point tab.
- updateHostAP needs
- Add N_HAP_NET to HOSTAP_OPTIONS indexes list (load.h:72)
- Validate network address field
- Save new network address field as GSList entry N_HAP_NET
- set wireless interface to be static in saveHostAP
- find INTERFACE_T->name = wlan0
- set INTERFACE_T->addressType = static
- set INTERFACE_T->address = network address of wlan0 based on N_HAP_NET
- set INTERFACE_T->netmask = 255.255.255.0
- Clear INTERFACE_T->gateway
- 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.
#3 Updated by Hammel about 2 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.
#4 Updated by Hammel about 2 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.