Ethernet Products
Determine ramifications of Intel® Ethernet products and technologies
4853 Discussions

Help to setup an Ethernet connection

MCara4
New Contributor III
2,695 Views

Hi,

I need help to setup an Ethernet connection with a static or dynamic IP. I read other posts on this topic but I was unable to have a working configuration.

I have an USB Ethernet adapter that is recognized by Edison.

# dmesg | tail

...

[ 738.480773] asix 1-1:1.0 eth0: register 'asix' at usb-dwc3-host.2-1, ASIX AX88772 USB 2.0 Ethernet, 9c:eb:e8:0f:52:b3

[ 738.539534] systemd-udevd[372]: renamed network interface eth0 to enp0s17u1

ip a

...

5: enp0s17u1: mtu 1500 qdisc noop qlen 1000

link/ether 9c:eb:e8:0f:52:b3 brd ff:ff:ff:ff:ff:ff

Now I need to use connman to setup the ethernet interface. I did the following steps:

systemctl start connman

connmanctl disable wifi

connmanctl config ethernet_9cebe80f52b3_cable --ipv4 manual 192.168.0.199 255.255.255.0 192.168.0.1

Error ethernet_9cebe80f52b3_cable: Method "SetProperty" with signature "sv" on interface "net.connman.Service" doesn't exist

It seems clear that I missed something. Probably I give the wrong service name. I found on the web that

general format for a wired connection is: ethernet__cable

Can you please help me?

7 Replies
Carlos_M_Intel
Employee
1,421 Views

Hi massca

What is the output of running:

root@edison:~# ip address

Also run the next line in the board:

root@edison:~# systemctl enable connman && systemctl start connman

If you still having problems try to get down the other interfaces:

root@edison:~# ifconfig wlan0 down

And as you were doing:

root@edison:~# connmanctl disable wifi

Let me know the output of ip address and what happens after enabling the connman service.

Regards;

CMata

0 Kudos
MCara4
New Contributor III
1,421 Views

Hi CMata_Intel,

below what you asked for. I'd like to know what is the standard procedure to setup an Ethernet connection on Edison. It seems me a basic requirements.

ip address

1: lo: mtu 65536 qdisc noqueue

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

valid_lft forever preferred_lft forever

inet6 ::1/128 scope host

valid_lft forever preferred_lft forever

2: sit0: mtu 1480 qdisc noop

link/sit 0.0.0.0 brd 0.0.0.0

3: wlan0: mtu 1500 qdisc pfifo_fast qlen 1000

link/ether fc:c2:de:39:71:fd brd ff:ff:ff:ff:ff:ff

inet 192.168.0.5/24 scope global wlan0

valid_lft forever preferred_lft forever

4: usb0: mtu 1500 qdisc pfifo_fast qlen 1000

link/ether 02:00:86:86:be:e6 brd ff:ff:ff:ff:ff:ff

inet 192.168.2.15/24 brd 192.168.2.255 scope global usb0

valid_lft forever preferred_lft forever

6: enp0s17u1: mtu 1500 qdisc noop qlen 1000

link/ether 9c:eb:e8:0f:52:b3 brd ff:ff:ff:ff:ff:ff

systemctl enable connman && systemctl start connman

ln -s '/lib/systemd/system/connman.service' '/etc/systemd/system/multi-user.target.wants/connman.service'

ifconfig wlan0 down

connmanctl disable wifi

Disabled wifi

ip address

1: lo: mtu 65536 qdisc noqueue

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

valid_lft forever preferred_lft forever

inet6 ::1/128 scope host

valid_lft forever preferred_lft forever

2: sit0: mtu 1480 qdisc noop

link/sit 0.0.0.0 brd 0.0.0.0

3: wlan0: mtu 1500 qdisc pfifo_fast qlen 1000

link/ether fc:c2:de:39:71:fd brd ff:ff:ff:ff:ff:ff

4: usb0: mtu 1500 qdisc pfifo_fast qlen 1000

link/ether 02:00:86:86:be:e6 brd ff:ff:ff:ff:ff:ff

inet 192.168.2.15/24 brd 192.168.2.255 scope global usb0

valid_lft forever preferred_lft forever

6: enp0s17u1: mtu 1500 qdisc noop qlen 1000

link/ether 9c:eb:e8:0f:52:b3 brd ff:ff:ff:ff:ff:ff

As you can see the enp0s17u1 interface (ethernet) doesn't get an IP. It needs additional configuration.

0 Kudos
Brendan_L_Intel
Employee
1,421 Views
0 Kudos
MCara4
New Contributor III
1,421 Views

Hi arfoll,

it works! Thank you very much!

Now I need to find a way to persist this configuration to the Edison reboot. Can you please help me?

0 Kudos
MCara4
New Contributor III
1,421 Views

Hi arfoll, CMata_Intel,

I put a script in /etc/init.d/ to disable wifi and start udhcpc.

This could be a solution, I'd like to use connmanctl at user level, ie not root, to disable wifi and start dhcp on ethernet.

Any suggestion?

Thanks

0 Kudos
Brendan_L_Intel
Employee
1,421 Views

Here's what I did:

systemctl start connman

systemctl enable connman

connmnanctl

connmanctl> enable ethernet

connmanctl> services

*A0 Wired ethernet_00106031716e_cable

connmanctl> config ethernet_00106031716e_cable --ipv4 dhcp

So that makes ethernet dhcp persistent. To let other users change network configs (i.e. none root), you'll need to change connman dbus settings since thats what connmanctl uses which is controled by /etc/dbus-1/system.d/connman.conf. First make a user.

useradd -m arfoll

passwd

vi /etc/dbus-1/system.d/connman.conf

Make it look like this (just switch user="root" to group="network")

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"

"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">

Then set the network group up, rebooting is easier & safer than reloading dbus configs so lets just do that.

groupadd network

gpasswd -a arfoll network

reboot

Login as 'arfoll' and go crazy:

connmanctl

connmanctl> disconnect ethernet_00106031716e_cable

Disconnected ethernet_00106031716e_cable

connmanctl> connect ethernet_00106031716e_cable

Connected ethernet_00106031716e_cable

0 Kudos
MCara4
New Contributor III
1,421 Views

Hi arfoll,

it works perfectly, you made me very happy!

I hope Intel will include your solution in an official Edison networking guide.

Thank you very much!

-max

0 Kudos
Reply