Project

General

Profile

Actions

Bug #164

closed

eth0 comes up even if nothing is connected

Added by Hammel almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
16 Feb 2013
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

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.

Actions #1

Updated by Hammel almost 12 years ago

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

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.

Actions #2

Updated by Hammel almost 12 years ago

  • % Done changed from 10 to 20

Based on ArchLinux Wiki, the following updates need to be made.

  1. Add dbus-python under Hardware Handling for Buildroot
  2. 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.

Actions #3

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.

Actions #4

Updated by Hammel almost 12 years ago

  • % Done changed from 50 to 60
Verified build completes correctly with the following updates:
  1. Bump connman to 1.11
  2. Add connman-tests configuration to get test-connman script.
  3. Disabled avahi. Not needed by anything that I know of.
  4. Enabled python-dbus for connman.
  5. 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.

Actions #5

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.

Actions #6

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.

Actions #7

Updated by Hammel almost 12 years ago

Buildroot is rev'd to 2013.02.
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:
  1. ArchLinux wiki
  2. Beaglebone Linux 101: Assigning a Static IP Address with Connman

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.

Actions #8

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).

Actions #9

Updated by Hammel almost 12 years ago

  • Priority changed from Urgent to Immediate
Actions #10

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.

Actions #11

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:
  1. integrate it into the PiBox build
  2. Revert S40network to the Busybox/Buildroot version
  3. Add bui-network-config to default BUI configuration
  4. Test bui-network-config on the target

Getting close to decent network support.....

Actions #12

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.

Actions #13

Updated by Hammel over 11 years ago

  • Severity changed from 03 - Medium to 01 - Critical
Actions #14

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.

Actions #15

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.

Actions #16

Updated by Hammel over 11 years ago

  • Severity changed from 01 - Critical to 03 - Medium
Actions #17

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:
  1. change S40network start to be ifup -a
  2. change S40network stop to be ifdown -a
  3. Run multiple tests, changing the configuration between eth0, wlan0 and both and make sure the script does as expected.
  4. Verify reboots bring the network up as expected.

If this works, save the modified S40network to the skeleton in the pibox source tree.

Actions #18

Updated by Hammel over 11 years ago

  • Severity changed from 03 - Medium to 01 - Critical
Actions #19

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.

Actions

Also available in: Atom PDF