1 2 Previous Next 24 Replies Latest reply on Nov 17, 2014 12:37 AM by shenli

    USB Ethernet works! But no IP address via DHCP

    intel_dan

      I decided to try using a usb ethernet adapter with my Edison board. When I plug it in, the kernel recognizes it and the driver is loaded. 'ip a' show me my newly plugged in eth0 interface. however, no IP address is ever assigned to eth0.

       

      How do I configure eth0 to get an IP address via DHCP?

        • 1. Re: USB Ethernet works! But no IP address via DHCP
          mhahn

          afaik that doesn't work on Edison. In recent meta-eca layers it's supported for connman afaik - but you'd have to build & include it on your own.

          • 2. Re: USB Ethernet works! But no IP address via DHCP
            intel_dan

            What exactly do I have to build/include? I have a build box set up and have successfully added various kernel drivers and yocto recipes to my build.

            • 3. Re: USB Ethernet works! But no IP address via DHCP
              mhahn

              I haven't tested the new meta-eca yet but have seen a note that USB tethering should be supported now. You may have a look at meta-intel-iot-devkit - Intel IoT Developer Kit metadata devkit-daisy-1.6.1 branch where we have integrated parts of the meta-eca layer for the IoT devkit image.

              • 4. Re: USB Ethernet works! But no IP address via DHCP
                intel_dan

                I am not trying to get a virtual ethernet (is that what you meant by tethering?) working. I have an actual USB->Ethernet dongle (with a RJ-45 jack on the end) that I need to figure out how to assign an IP address to via DHCP.

                • 5. Re: USB Ethernet works! But no IP address via DHCP
                  szirin

                  Examine /etc/wpa_supplicant/wpa_cli-actions.sh to see how wpa_supplicant uses udhcpc as the DHCP client for wlan0.

                  1 of 1 people found this helpful
                  • 6. Re: USB Ethernet works! But no IP address via DHCP
                    intel_dan

                    After some digging, I found that running  the command  'udhcpc' will assign eth0 and IP address via dhcp.

                    Is there a way to have an IP address assigned automatically (or auto run udhcpc)?

                    • 7. Re: USB Ethernet works! But no IP address via DHCP
                      mhahn

                      sorry for side tracking, I completely misunderstood - thought you wanted DHCP for the virtual ethernet over USB.

                      DHCP you could also easily switch on by starting connman:

                       

                      systemctl enable connman && systemctl start connman

                       

                      Works fine for me and I get IP over DHCP for my USB dongle.

                      1 of 1 people found this helpful
                      • 8. Re: USB Ethernet works! But no IP address via DHCP
                        mhahn

                        and connman will have the automatic DHCP assignment functionality. Alternatively you could access your device using IPv6 addresses which doesn't require DHCP

                        • 9. Re: USB Ethernet works! But no IP address via DHCP
                          intel_dan

                          strange, I have connman enabled and running, however, I do not get an ipv4 address unless i manually run udhcpc

                          • 10. Re: USB Ethernet works! But no IP address via DHCP
                            mhahn

                            really strange. Works fine for me and I didn't really change anything. Maybe some other services triggered by "configure-edison" settings compete with connman on your board?

                            Anyways, can you check your settings in /etc/connman? Is there a main.conf file?

                            If yes, check the setting for

                            "DefaultAutoConnectTechnologies ="

                             

                            And you could also try to explicitly set "connmanctl config <your ethernet service - get the name via 'connmanctl services'> --ipv4 dhcp --proxy auto"

                            See options below.

                            config          <service>             Set service configuration options

                               --nameservers     <dns1> [<dns2>] [<dns3>]

                               --timeservers     <ntp1> [<ntp2>] [...]

                               --domains         <domain1> [<domain2>] [...]

                               --ipv6            off|auto [enable|disable|preferred]|

                              manual <address> <prefixlength> <gateway>

                               --proxy           direct|auto <URL>|manual <URL1> [<URL2>] [...]

                              [exclude <exclude1> [<exclude2>] [...]]

                               --autoconnect     yes|no

                               --ipv4            off|dhcp|manual <address> <netmask> <gateway>

                               --remove                           Remove service

                            1 of 1 people found this helpful
                            • 11. Re: USB Ethernet works! But no IP address via DHCP
                              retrochip

                              I have a similar issue.  Before my breakout board arrived, I built my own proto board with the hirose connector and wired up power and USB VSYS, D+, D-, GND.  The board boots and with my USB cable connected, I see it as /media/Edison in Ubuntu 12.04, also as /dev/ttyACM0  (not the /dev/ttyUSB0 that the "Getting started" lists for the arduino expansion board).  The instructions on "Getting started" for linux don't work for the ttyACM0.  The 'screen' command followed by any number of returns always shows a blank window. 

                               

                              So, I'd like to ssh, but don't have an IP address for it.  My syslog (below) shows attempts to configure IPv6, but I see:

                              "IP6 addrconf timed out or failed".

                              Maybe I should try only IPv4?  I have almost no linux networking experience, so if you have a step-by-step guide, I'd really appreciate it. 

                              Or maybe I can do something else through the ttyACM0?

                              I've tried to discover some magic behind hints about "ssh to RNDIS", but haven't found anything useful yet in my searching.

                               

                              My breakout board arrived yesterday, so I think I'll configure it through that, get it on the wireless network, then stick it back in my own proto board.  Still, any guidance for the 'raw' USB connection to the onboard TUSB1211 chip would be great. 

                               

                              Great product guys - I can't wait to get this flying, and FWIW, soldering the hirose went very well.  I did the first by hand under a nice microscope =/

                              • 12. Re: USB Ethernet works! But no IP address via DHCP
                                retrochip

                                Any suggestions for args to udhcpc?  It spins not doing much:

                                udhcpc (v1.18.5) started

                                Sending discover...

                                Sending discover...

                                Sending discover...

                                /usr/share/udhcpc/default.script: Lease failed:

                                Sending discover...

                                Sending discover...

                                Sending discover...

                                /usr/share/udhcpc/default.script: Lease failed:

                                 

                                Oct  1 13:50:02 chartres kernel: [3210323.100893] usb 2-1.5.1.4: new high-speed USB device number 61 using ehci_hcd

                                Oct  1 13:50:03 chartres kernel: [3210323.194307] usb 2-1.5.1.4: New USB device found, idVendor=8087, idProduct=0a9e

                                Oct  1 13:50:03 chartres kernel: [3210323.194312] usb 2-1.5.1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4

                                Oct  1 13:50:03 chartres kernel: [3210323.194315] usb 2-1.5.1.4: Product: Multifunction Composite Gadget

                                Oct  1 13:50:03 chartres kernel: [3210323.194318] usb 2-1.5.1.4: Manufacturer: Linux 3.10.17-poky-edison+ with dwc3-gadget

                                Oct  1 13:50:03 chartres kernel: [3210323.194320] usb 2-1.5.1.4: SerialNumber: 7aeb3bea822ba4ab2c4a7d887138b67e

                                Oct  1 13:50:03 chartres kernel: [3210323.196380] rndis_host 2-1.5.1.4:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.0-1.5.1.4, RNDIS device, 86:9b:7f:fb:5c:e2

                                Oct  1 13:50:03 chartres mtp-probe: checking bus 2, device 61: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1.4"

                                Oct  1 13:50:03 chartres mtp-probe: bus: 2, device: 61 was not an MTP device

                                Oct  1 13:50:03 chartres kernel: [3210323.196784] cdc_acm 2-1.5.1.4:1.2: This device cannot do calls on its own. It is not a modem.

                                Oct  1 13:50:03 chartres kernel: [3210323.196835] cdc_acm 2-1.5.1.4:1.2: ttyACM0: USB ACM device

                                Oct  1 13:50:03 chartres kernel: [3210323.197764] scsi134 : usb-storage 2-1.5.1.4:1.4

                                Oct  1 13:50:03 chartres NetworkManager[1133]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1.4/2-1.5.1.4:1.0/net/usb0, iface: usb0)

                                Oct  1 13:50:03 chartres NetworkManager[1133]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1.4/2-1.5.1.4:1.0/net/usb0, iface: usb0): no ifupdown configuration found.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <warn> failed to allocate link cache: (-10) Operation not supported

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): carrier is OFF

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): new Ethernet device (driver: 'rndis_host' ifindex: 105)

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): exported as /org/freedesktop/NetworkManager/Devices/83

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): now managed

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): bringing up device.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): carrier now ON (device state 20)

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): preparing device.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): deactivating device (reason 'managed') [2]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Added default wired connection 'Wired connection 3' for /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1.4/2-1.5.1.4:1.0/net/usb0

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Auto-activating connection 'Wired connection 3'.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) starting connection 'Wired connection 3'

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): device state change: disconnected -> prepare (reason 'none') [30 40 0]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) scheduled...

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) started...

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) scheduled...

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) complete.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) starting...

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): device state change: prepare -> config (reason 'none') [40 50 0]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) successful.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) scheduled.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) complete.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) started...

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): device state change: config -> ip-config (reason 'none') [50 70 0]

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Beginning DHCPv4 transaction (timeout in 45 seconds)

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> dhclient started with pid 29841

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Beginning IP6 addrconf.

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) complete.

                                Oct  1 13:50:03 chartres dhclient: Internet Systems Consortium DHCP Client 4.1-ESV-R4

                                Oct  1 13:50:03 chartres dhclient: Copyright 2004-2011 Internet Systems Consortium.

                                Oct  1 13:50:03 chartres dhclient: All rights reserved.

                                Oct  1 13:50:03 chartres dhclient: For info, please visit https://www.isc.org/software/dhcp/

                                Oct  1 13:50:03 chartres dhclient:

                                Oct  1 13:50:03 chartres NetworkManager[1133]: <info> (usb0): DHCPv4 state changed nbi -> preinit

                                Oct  1 13:50:03 chartres dhclient: Listening on LPF/usb0/86:9b:7f:fb:5c:e2

                                Oct  1 13:50:03 chartres dhclient: Sending on   LPF/usb0/86:9b:7f:fb:5c:e2

                                Oct  1 13:50:03 chartres dhclient: Sending on   Socket/fallback

                                Oct  1 13:50:03 chartres dhclient: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 3

                                Oct  1 13:50:04 chartres kernel: [3210324.197202] scsi 134:0:0:0: Direct-Access     Linux    File-CD Gadget   0310 PQ: 0 ANSI: 2

                                Oct  1 13:50:04 chartres kernel: [3210324.198104] sd 134:0:0:0: Attached scsi generic sg6 type 0

                                Oct  1 13:50:04 chartres kernel: [3210324.199559] sd 134:0:0:0: [sdf] 1572864 512-byte logical blocks: (805 MB/768 MiB)

                                Oct  1 13:50:04 chartres kernel: [3210324.200133] sd 134:0:0:0: [sdf] Write Protect is off

                                Oct  1 13:50:04 chartres kernel: [3210324.200136] sd 134:0:0:0: [sdf] Mode Sense: 0f 00 00 00

                                Oct  1 13:50:04 chartres kernel: [3210324.200683] sd 134:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

                                Oct  1 13:50:04 chartres kernel: [3210324.203047]  sdf: sdf1

                                Oct  1 13:50:04 chartres ata_id[29844]: HDIO_GET_IDENTITY failed for '/dev/sdf': Invalid argument

                                Oct  1 13:50:04 chartres kernel: [3210324.205783] sd 134:0:0:0: [sdf] Attached SCSI disk

                                Oct  1 13:50:06 chartres dhclient: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 8

                                Oct  1 13:50:09 chartres kernel: [3210329.383046] [UFW BLOCK] IN=eth1 OUT= MAC=33:33:00:00:00:01:04:8d:38:12:99:2d:86:dd SRC=fe80:0000:0000:0000:068d:38ff:fe12:992d DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0

                                Oct  1 13:50:09 chartres kernel: [3210329.384215] [UFW BLOCK] IN=eth1 OUT= MAC=33:33:00:00:00:01:04:8d:38:12:99:2d:86:dd SRC=fe80:0000:0000:0000:068d:38ff:fe12:992d DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=76 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=130 CODE=0

                                Oct  1 13:50:09 chartres kernel: [3210329.389741] [UFW BLOCK] IN=eth1 OUT= MAC=33:33:00:00:00:fb:20:c9:d0:0f:b6:3d:86:dd SRC=fe80:0000:0000:0000:22c9:d0ff:fe0f:b63d DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=72 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=ICMPv6 TYPE=131 CODE=0

                                Oct  1 13:50:14 chartres dhclient: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 14

                                Oct  1 13:50:22 chartres kernel: [3210342.890269] [UFW BLOCK] IN=eth1 OUT= MAC=01:00:5e:00:00:01:e4:ce:8f:4c:45:9c:08:00 SRC=10.0.2.41 DST=224.0.0.1 LEN=44 TOS=0x00 PREC=0x00 TTL=1 ID=23193 PROTO=UDP SPT=64370 DPT=8612 LEN=24

                                Oct  1 13:50:23 chartres NetworkManager[1133]: <info> (usb0): IP6 addrconf timed out or failed.

                                Oct  1 13:50:23 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...

                                Oct  1 13:50:23 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 4 of 5 (IPv6 Configure Timeout) started...

                                Oct  1 13:50:23 chartres NetworkManager[1133]: <info> Activation (usb0) Stage 4 of 5 (IPv6 Configure Timeout) complete.

                                Oct  1 13:50:28 chartres dhclient: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 13

                                • 13. Re: USB Ethernet works! But no IP address via DHCP
                                  intel_dan

                                  It appears that connman only likes to assign an ip address using dhcp if my wifi is not connected. I even tried explicitly setting the SingleConnectedTechnology=false option but the behavior did not change.  If I manually run udhcpc then the  eth0 interface is assigned an ip address via dhcp.

                                  1 of 1 people found this helpful
                                  • 14. Re: USB Ethernet works! But no IP address via DHCP
                                    mhahn

                                    a, yes - connman has a policy to use only one network. I.E. if you have ethernet connected (prio 1) WiFi wouldn't connect. If you haven't connected ethernet when starting up WiFi should auto-connect ...

                                    1 2 Previous Next