Bug #261

Settings page of UI does not display initial configuration of wireless lan

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

Status:ClosedStart date:10 Jan 2014
Priority:ImmediateDue date:
Assignee:Hammel% Done:

100%

Category:Settings
Target version:PiBox - 0.7.0
Severity:01 - Critical

Description

The wireless lan is configured (it was configured through bui-network-config) but the configuration doesn't show in the settings page. The wlan0 interface is shown disabled.

Also, the eth0 interface is not displayed at all. This may be because there is no entry in a config file for it, though it does show up under /sys/class/net.

Associated revisions

Revision 6ca8123b
Added by Hammel almost 7 years ago

RM #261: Fixed initial use of temp buffer in buildIFNameString().
Fixed getNetType() to add newlines on outbound string messages.
Fixed getWirless() segv by making sure empty string is used when NULL data is found.

Revision c4404d73
Added by Hammel almost 7 years ago

RM #261: Trim whitespace on returned buffer, in case problems occur when piboxd returns interface list.

History

#1 Updated by Hammel almost 7 years ago

One problem appears to be overwriting the temporary buffers in buildIFNameString() when the initial interface is encountered (and the temp buf is null).

#2 Updated by Hammel almost 7 years ago

  • % Done changed from 0 to 10

#3 Updated by Hammel almost 7 years ago

Another bug is that piboxd:getNetType() writes a string without a newline and settings.php:getMode() fails to see the complete string so the mode doesn't get sent back.

But this still doesn't say why the interface is marked disabled when its not.

#4 Updated by Hammel almost 7 years ago

  • % Done changed from 10 to 30

Found it: The broken interface retrieval (temporary buffer overwrite) causes a space to be placed in front of the second interface found. That space was not stripped so the PHP code used it to do an interface lookup to set the Enabled state. What I'm seeing in the interface is the setting for the "space" interface mixed with the second interface name, wlan0. That makes it look like wlan0 isn't configured when I'm not actually looking at wlan0's configuration.

#5 Updated by Hammel almost 7 years ago

  • % Done changed from 30 to 40

Also found a bug in net.c:getWireless() where strlen() was being called against NULL strings. This could happen if the wpa_supplication.conf file doesn't exist yet.

#6 Updated by Hammel almost 7 years ago

  • Status changed from New to Closed
  • % Done changed from 40 to 100

All of these bugs are fixed in their respective opkgs (piboxd and piboxwww). Its clear now that the RPi is very slow when running surf to connect to the web server. I suspect this may be due to a non-hardware accelerated X.org driver. In any case, that's a separate issue.

This issue can be closed.

Also available in: Atom PDF