eth0 comes up even if nothing is connected
|Status:||Closed||Start date:||16 Feb 2013|
|Category:||04 - Root File System|
|Target version:||0.5.0 - Beta 1|
|Severity:||01 - Critical|
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.
#1 Updated by Hammel almost 8 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
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.
#2 Updated by Hammel almost 8 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.
#4 Updated by Hammel almost 8 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.
#7 Updated by Hammel over 7 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.
#8 Updated by Hammel over 7 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).
#10 Updated by Hammel over 7 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.
#11 Updated by Hammel over 7 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.....
#17 Updated by Hammel over 7 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.
#19 Updated by Hammel over 7 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.