Bug #164
closedeth0 comes up even if nothing is connected
100%
Description
PiBox needs a /etc/network/interfaces that defines which interfaces to bring up: lo0, eth and wlan0.
This might go away once connman is properly configured.
Updated by Hammel almost 12 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
- web site
- ArchLinux Wiki
- Beaglebone Linux 101: Assigning a Static IP Address with Connman
- BugLabs - which uses Connman under the hood
- Ubuntu Wiki
- The pros and cons of Intel's ConnMan for Linux
- Adafruit tutorial
- Meego discussion
- Mobile network management with ConnMan
- D-Bus/ConnMan
I need to see if connman can be convinced to bring up the network only if the interface is configured. If so, I can drop S50network and let connman handle it instead.
Updated by Hammel almost 12 years ago
- % Done changed from 10 to 20
Based on ArchLinux Wiki, the following updates need to be made.
- Add dbus-python under Hardware Handling for Buildroot
- Add --enable-test in the connman package. This requires a patch for connman in Buildroot. Ideally, it should be a patch that adds the test scripts as a configurable option (and submit to Buildroot if its not there now) or, at a minimum, a patch that copies <src>/test/test-connman to <target>/usr/bin
The former is required before I can even test the ArchLinux instructions. The latter can be copied by hand to perform that test.
It's not clear how this interacts with wpa_supplicant and whether /etc/wpa_supplicant.conf needs to be updated by connman or not. We'll just have to try it and see.
Updated by Hammel almost 12 years ago
- % Done changed from 20 to 50
I've enabled python support for dbus and added a patch for enabling the test option. These build fine in my sandbox. I need to do a full rootfs build while I test the rootfs on the Pi board before checking these changes in.
Updated by Hammel almost 12 years ago
- % Done changed from 50 to 60
- Bump connman to 1.11
- Add connman-tests configuration to get test-connman script.
- Disabled avahi. Not needed by anything that I know of.
- Enabled python-dbus for connman.
- Disable ext2 image creataion.
Initial use of test-connman does not generate a list of services as displayed on the ArchLinux wiki, though the mods to /etc/dbus-1/system.d/connman.conf has not yet been applied. It's unclear if I have additional configuration to do or not.
Updated by Hammel almost 12 years ago
Connman wants wpa_supplication 0.8 or 1.0. Buildroot 201205 provides 0.7.3. The configuration settings specified for wpa_supplication to work with connman can't be set with 0.7.3.
I'll need to rev wpa_supplication before continuing with connman integration.
Updated by Hammel almost 12 years ago
Rev'd Buildroot to 2013.02 to pick up latest wpa_supplicant and everything else I might need. Seems to work so far, but the rootfs needs to be sanitized on a 32bit build system first.
Once that's done, I can return to trying to get connman running.
Updated by Hammel almost 12 years ago
That gives me connman 1.10 and wpa_supplicant 2.0.
The build boots on the Pi board okay (minor tweaks to buildroot build required, but those are checked in now).
Testing using these instructions:
Neither works. I get no output at all.
Trying connmanctl, I can list technologies which only shows the wired port. No wifi port even though the wifi drive is loaded and manually configuring wpa_supplicant will get it to work.
Updated by Hammel almost 12 years ago
Forget connman. Too much trouble to get working. Instead, just config the wifi with wpa_supplication manually.
As for eth0 trying to come up, the S40network script can be modified to look in /etc/network/interfaces for interfaces marked as "auto". These are the ones that should be configured with dhcp. Only two such interfaces will be supported: eth0 (wired) and wlan0 (wifi).
Updated by Hammel over 11 years ago
I've started writing bui-network-config for editign /etc/network/interfaces and /etc/wpa_supplicant.conf. This is extremely simple-minded but it should suffice for a project like PiBox or BeagleBox. This configuration utility is C/GTK+ based and will be available from the BUI panel.
Once configuration of the /etc/network/interfaces file is handled, S40network can be modified to use ifup to bring up only configured interfaces.
Updated by Hammel over 11 years ago
bui-network-config has been written and tested on my desktop.
I now need to do the following:- integrate it into the PiBox build
- Revert S40network to the Busybox/Buildroot version
- Add bui-network-config to default BUI configuration
- Test bui-network-config on the target
Getting close to decent network support.....
Updated by Hammel over 11 years ago
First test of bui-network-config on target failed with a crash. This may be due to a bug fix that's been applied to bui-network-config (see revision #80b7974f). This may not be currently included in the version I tested on the target.
Updated by Hammel over 11 years ago
- Severity changed from 03 - Medium to 01 - Critical
Updated by Hammel over 11 years ago
Rebuild bui-network-config on target and it still crashed. This was even after removing the cached local archive.
I've created a bug against the bui-network-config project (See #189). I'll need to generate the xcc-debug opkg to debug on the target.
Updated by Hammel over 11 years ago
bui-network-config is fixed, though new issues (see #190) are being opened on it to provide new features.
Now S40network needs to be rewritten to parse /etc/network/interfaces.
Updated by Hammel over 11 years ago
- Severity changed from 01 - Critical to 03 - Medium
Updated by Hammel over 11 years ago
- % Done changed from 60 to 70
After fixing bui-network-config to properly update the interfaces file, I tried running ifdown/ifup to bring up the wlan and not the wired port. Works as expected.
This should simplify the structure of S40network dramatically, but I need to actually test that to be certain it works.
What I need to do:- change S40network start to be ifup -a
- change S40network stop to be ifdown -a
- Run multiple tests, changing the configuration between eth0, wlan0 and both and make sure the script does as expected.
- Verify reboots bring the network up as expected.
If this works, save the modified S40network to the skeleton in the pibox source tree.
Updated by Hammel over 11 years ago
- Severity changed from 03 - Medium to 01 - Critical
Updated by Hammel over 11 years ago
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
Done. S40network now uses just ifup/ifdown but must manually start/stop wpa_supplicant. Tried various configs with eth0 and wlan0 enabled or disabled with dhcp. Seems to work well, even on reboots.
Code pushed upstream.
Closing issue.