0 Replies Latest reply on Jun 28, 2015 4:06 PM by Ferda

    How to connect Edison by Ethernet - instructions

    Ferda

      That's how I put into operation Ethernet connection on Intel Edison with Arduino board.

       

      At first I tried module with ENC28J60 and SPI connectivity, but without success.

      Another attempt with USB adapter to Ethernet has been successful.

      I used USB to RJ45 Lan Card Ethernet Network Adapter Cable+3 Port Hub for Win 8 7 XP from AliExpress (4.20$)

      USB-LAN-HUB.jpg

      This adapter contains chip Davicom DM9601. Driver is not in the standard kernel, so you must compile their own image.

       

      A. Building own image

      1. Follow the document edisonbsp_ug_331188007.pdf downloadable at http://www.intel.com/support/edison/sb/CS-035278.htm

      2. Use file edison-src-ww18-15.tgz and expand it to <some-dir>

      3. It is useful add Midnight Commander to image.

          Into file <some-dir>/edison-src/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb

         append row:

         IMAGE_INSTALL += "mc"

      4. Run kernel config in dir <some-dir>/edison-src by commands:

         source poky/oe-init-build-env

         bitbake virtual/kernel -c menuconfig

      5. Used .config file is in dir:

         <some-dir>/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux-edison-standard-build

      6. In kernel config enable driver dm9601 here:

         Device Drivers  --->

           Network device support  --->

             USB Network Adapters  --->

               Davicom DM9601 based USB 1.1 10/100 ethernet devices

          and save config to own file my.config

      7. Make symlink (or copy) of

          <some-dir>/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux-edison-standard-build/my.config

          to

          <some-dir>/edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files/defconfig

          and to

          <some-dir>/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux/arch/x86/configs/i386_edison_defconfig

      8. Make image by commands:

         bitbake virtual/kernel -c configure -f -v

         bitbake edison-image

         ../meta-intel-edison/utils/flash/postBuild.sh

      9. Make SDK installer script by:

         bitbake edison-image -c populate_sdk

       

      B. Flash image by Phone Flash Tool Lite

          Note: Current running version on Edison: cat /etc/version

       

      C. Initial connect and setup

      1. Connect by serial - micro USB at the edge of board:

         screen /dev/ttyUSB0 115200

         Login: root (without password)

         (quit screen by Ctrl+a k)

      2. Initial setup by command: (without it can not connect by SSH)

         configure_edison --setup

         Set some password and system name. Wifi setting not needed.

       

      D. Network configuration by connman

          (connman save its configs in directory: /var/lib/connman)

      1. Connect USB to Ethernet adapter (microswitch must be switched to big USB connector - before boot) and check by:

         lsusb

          Bus 001 Device 003: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) DM9601 Fast Ethernet Adapter

         dmesg

          usb 1-1.2: new full-speed USB device number 3 using dwc3-host

          usb 1-1.2: New USB device found, idVendor=0fe6, idProduct=9700

          usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0

          usb 1-1.2: Product: USB 2.0 10/100M Ethernet Adaptor

          dm9601 1-1.2:1.0 eth0: register 'dm9601' at usb-dwc3-host.2-1.2, Davicom DM9601 USB Ethernet, 00:e0:8c:53:44:58

          systemd-udevd[287]: renamed network interface eth0 to enp0s17u1u2

         ip a

          5: enp0s17u1u2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000

              link/ether 00:e0:8c:53:44:58 brd ff:ff:ff:ff:ff:ff

      2. Now it is possible to test the network with dhcp by:

          udhcpc -i enp0s17u1u2

          ifconfig

      3. Enable connman by commands:

         systemctl enable connman

         systemctl start connman

      4. Enable ethernet technology:

         connmanctl enable ethernet

         (list all technologies by connmanctl technologies)

      5. To know the full name of the ethernet service in form ethernet_MACADDR_cable, use command:

         connmanctl services

      6. Config ethernet network for above service with fixed IP address by:

         connmanctl config ethernet_???????_cable --ipv4 manual 192.168.1.2 255.255.255.0 192.168.1.1

         (connmanctl config <service-name> --ipv4 manual <ip-address> <mask> <gateway>)

      7. If you want config wifi for secured net, then run connmanctl and commands:

         scan wifi (wait to text "completed for wifi")

         services

         agent on

         connect wifi_?????????_managed_psk (insert wifi psk on prompt)

         quit

      8. Also its possible copy attached file main.conf with some general settings to created dir /etc/connman

         (modify the content according to their own network)