1 2 Previous Next 29 Replies Latest reply on Feb 4, 2016 5:45 AM by mweal

    How to get the Lan95xx (Lan9512) running with the Intel Edison

    IntelAnonymous

      Good day,

       

      I am trying to build my own hardware while extending the Edison with a Lan9512-chip as discussed here: Connect Ethernet with Edison | Intel Communities. My goal is to have

       

      • 2 USB ports (instead of one)
      • Ethernet

       

      The datasheet for the Lan9512 can be found here: LAN9512 - USB to Ethernet. (E.g. Pins are on pdf-page 9). So actually I have to problems:

       

      1.) Pin-Connections

      I am not 100% sure whether my hardware connections to the Lan9512 are correct. So if anyone has knowledge about layouting I would also provide additional material.

       

      2.) Working driver

      The Lan9512 is supported by the smsc95xx driver. The Raspberry Pi Modell B uses the same driver and chip. Therefore I compiled that driver into my image and flashed my edison. Please have a look what happens when I am booting my edison:

      boot.png

      You can see that the driver smsc95xx is loaded. But how can I figure out whether there was an error during the detection of the Lan95xx? Do I possibly have to remove the other drivers such as usbserial? There is clearly a MAC and host MAC address which do not belong to the LAN9512 and i am not sure if this might cause a problem.


      I would be deeply grateful for any help on these topics and I would like to share my results here.

        • 1. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
          JPMontero_Intel

          Hi IntelAnonymous,

           

          I have a couple of questions. What is the output of the command ip a? Are you using a custom build image? Could you specify the steps you followed to install the drivers?

           

          Regards,
          JPMontero_Intel

          • 2. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
            IntelAnonymous

            Thanks for your response:

             

            Are you using a custom build image?

            Yes, I compiled my own image based on the official intel sources and according to the intel instructions.

             

            Could you specify the steps you followed to install the drivers?

            1. Open device-software/meta-edison/recipes-kernel/linux/files/defconfig
            2. Search for CONFIG_USB_NET_SMSC95XX
            3. Set entry to „=y“
            4. Compiled and flashed the image leading to the output in the screenshot from my first post

             

            What is the output of the command ip a?

            ip a

            ip a.PNG

             

            ifconfig

            ifconfig.PNG


            It seems that the default yocto driver is used because currently I am connected via WLAn to the edison, there is no ethernet connection. Therefore I am not sure whether I have to remove some default-drivers which may occupy the only available usb interface?

            • 3. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
              mweal

              I have used the lan95xx successfully on the previous version of edison linux. I have not tried it on the current version. Here are a few notes:

               

              1. One issue I noticed is that it did not work with a blank eeprom.  let me know if you want a sample configuration.
              2. to see the interface try 'ifconfig -a', the interface showed up as enp0s17u1u1
              3. I installed the drivers using the AlexT_Intel repository with "opkg install kernel-module-smsc95xx"
              4. a quick way (but not the best way) to switch to the lan95xx Ethernet is with "connmand"
              • 4. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                tintar

                if you are seeing MAC like 02:00:86 that is definitely the onboard usb. either it is fighting for usb0 or fighting for eth0. check dmesg/syslog if some IF looks like it wants usb1 or eth1 or something.

                 

                but mweal mentions enp0s17u1 - holy batman, chum, is that a weird IF name. did anyone link here yet:

                IoT - Intel® Edison - adding kernel modules to Yocto* - example "batman" | Intel® Developer Zone

                 

                obvs building B.A.T.M.A.N. is not required, but some enp0s17u1 info in there.

                • 5. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                  mweal

                  the enp0s17u1 name confused me at first, but this is a new(er) "change to the network device naming scheme from ethX to a physical location-based name for easy identification and use."

                  • 6. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                    mweal

                    root@edison:~# ifconfig -a

                    enp0s17u1u1 Link encap:Ethernet  HWaddr xx:xx:xx:00:00:09

                              BROADCAST MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

                     

                    lo        Link encap:Local Loopback

                              inet addr:127.0.0.1  Mask:255.0.0.0

                              inet6 addr: ::1/128 Scope:Host

                              UP LOOPBACK RUNNING  MTU:65536  Metric:1

                              RX packets:37600 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:37600 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:2857600 (2.7 MiB)  TX bytes:2857600 (2.7 MiB)

                     

                    sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-31-00-66-65-00-00-00-00-00-00-00-00

                              NOARP  MTU:1480  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

                     

                    usb0      Link encap:Ethernet  HWaddr 02:00:86:64:a7:af

                              inet addr:192.168.2.15  Bcast:192.168.2.255  Mask:255.255.255.0

                              UP BROADCAST MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

                     

                    wlan0     Link encap:Ethernet  HWaddr 78:4b:87:a3:f4:7c

                              inet addr:192.168.42.1  Bcast:192.168.42.255  Mask:255.255.255.0

                              inet6 addr: fe80::7a4b:87ff:fea3:f47c/64 Scope:Link

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:25 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 B)  TX bytes:5005 (4.8 KiB)

                     

                    root@edison:~# lsusb

                    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub

                    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

                    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

                    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter

                    • 7. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                      IntelAnonymous

                      Thanks for your answer!

                       

                      mweal schrieb:

                      1. One issue I noticed is that it did not work with a blank eeprom.  let me know if you want a sample configuration.

                       

                      From the data sheet:

                       

                      "After a system-level reset occurs, the device will load the default values from a properly configured EEPROM. The device will not accept USB transactions from the Host until this process is completed."


                      Furthermore:


                      "The signature value of 0xA5 is stored at address 0. A different signature value indicates to the EEPROM controller that no EEPROM or an un-programmed EEPROM is attached to the device. In

                      this case, the hardware default values are used, as shown in Table 3.10."


                      Therefore I expected the LAN95xx to handle the EEPROM automatically? Nevertheless I would be glad if you would share the mentioned sample configuration.

                       

                      mweal schrieb:

                      - to see the interface try 'ifconfig -a', the interface showed up as enp0s17u1u1

                      - a quick way (but not the best way) to switch to the lan95xx Ethernet is with "connmand"

                       

                      Unfortunately the interface is not visible yet. I have to cross-check (again) all connections. Two questions:

                       

                      1. Have you added or removed any other (driver) packages? Or have you just added the "SMSC LAN95XX based USB 2.0 10/100 ethernet devices" without further changes to the kernel configuration?
                      2. Would you mind to share an excerpt of your layout for comparing reasons?

                       

                      Best regards

                       

                       

                      //EDIT

                      Wooop new answers when I wrote this. @mweal: Third question How did you get lsusb running? I get the following error:

                       

                      lsusb: Get "unable to initialize libusb: -99"


                      // Edit 2

                      It seems that this error is realted to the fact that my lan95xx is currently not identified as USB controller

                      • 8. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                        mweal

                        IntelAnonymous wrote:

                        Unfortunately the interface is not visible yet. I have to cross-check (again) all connections. Two questions:

                         

                        1. Have you added or removed any other (driver) packages? Or have you just added the "SMSC LAN95XX based USB 2.0 10/100 ethernet devices" without further changes to the kernel configuration?
                        2. Would you mind to share an excerpt of your layout for comparing reasons?

                         

                        Best regards

                         

                        A) have your tried a lsusb  to see if the device is present....

                         

                        B) To use the the LAN9500 family in the kernel you need to add the following entries to the kernel config, then rebuild

                         

                         

                        -> Device Drivers

                            [*] Network device support --->
                            USB Network Adapters --->
                              <*> Multi-purpose USB Networking Framework
                              <*> SMSC LAN95XX based USB 2.0 10/100 ethernet devices

                         

                        Alternativly, I have my own okpk repository where I build the drivers as modules instead and add with "opkg install kernel-module-smsc95xx".  I suppose you could check  for(or request)the LAN95XX module in the Edison opkg package repo created  created by AlexT_Intel and install it as a module yourself.

                         

                        2) sorry can't share anything, but I can check yours

                         

                         

                         

                         

                        From the data sheet:

                         

                        "After a system-level reset occurs, the device will load the default values from a properly configured EEPROM. The device will not accept USB transactions from the Host until this process is completed."


                        Furthermore:


                        "The signature value of 0xA5 is stored at address 0. A different signature value indicates to the EEPROM controller that no EEPROM or an un-programmed EEPROM is attached to the device. In

                        this case, the hardware default values are used, as shown in Table 3.10."


                        Therefore I expected the LAN95xx to handle the EEPROM automatically? Nevertheless I would be glad if you would share the mentioned sample configuration.

                         

                        That's what I thought too, but it didn't work.  I did not spend much time working it out as I had to add a mac address (rather than use the random one generated w/o eeprom) anyhow.  here the config script.  please add your own values where I have it xx out.

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 1 value 0x00 ;# mac

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 2 value 0xxx ;# mac

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 3 value 0xxx ;# mac

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 4 value 0x00 ;# mac (seq)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 5 value 0x00 ;# mac (seq)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 6 value 0x09 ;# mac (seq)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 7 value 0x01 ;# Full-Speed Polling Interval for Interrupt Endpoint

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 8 value 0x04 ;# High-Speed Polling Interval for Interrupt Endpoint

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 9 value 0x05 ;# Configuration Flags

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xa value 0x09 ;# Language ID Descriptor [7:0]

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xb value 0x04 ;# Language ID Descriptor [15:8]

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xc value 0x0a ;# Manufacturer ID String Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xd value 0x1d ;# Manufacturer ID String Descriptor EEPROM Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xe value 0x00 ;# Product Name String Descriptor EEPROM Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0xf value 0x00 ;# High-Speed Polling Interval for Interrupt Endpoint

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x10 value 0x00 ;# Serial Number String Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x11 value 0x00 ;# Serial Number String Descriptor EEPROM Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x12 value 0x00 ;# Configuration String Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x13 value 0x00 ;# Configuration String Descriptor Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x14 value 0x00 ;# Interface String Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x15 value 0x00 ;# Interface String Descriptor Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x16 value 0x12 ;# Hi-Speed Device Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x17 value 0x22 ;# Hi-Speed Device Descriptor Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x18 value 0x12 ;# Hi-Speed Configuration and Interface Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x19 value 0x2b ;# Hi-Speed Configuration and Interface Descriptor Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x1a value 0x12 ;# Full-Speed Device Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x1b value 0x34 ;# Full-Speed Device Descriptor Word Offset

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x1c value 0x12 ;# Full-Speed Configuration and Interface Descriptor Length (bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x1d value 0x3d ;# Full-Speed Configuration and Interface Descriptor Word Offset

                        #reserved

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x20 value 0x24 ;# Vendor ID LSB Register (VIDL)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x21 value 0x04 ;# Vendor ID MSB Register (VIDM)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x22 value 0x12 ;# Product ID LSB Register (PIDL)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x23 value 0x95 ;# Product ID MSB Register (PIDM)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x24 value 0x00 ;# Device ID LSB Register (DIDL)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x25 value 0x01 ;# Device ID MSB Register (DIDM)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x26 value 0x9b ;# Config Data Byte 1 Register (CFG1)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x27 value 0x18 ;# Config Data Byte 2 Register (CFG2)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x28 value 0x00 ;# Config Data Byte 3 Register (CFG3)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x29 value 0x02 ;# Non-Removable Devices Register (NRD)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2a value 0x30 ;# Port Disable (Self) Register (PDS)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2b value 0x30 ;# Port Disable (Bus) Register (PDB)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2c value 0x01 ;# Max Power (Self) Register (MAXPS)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2d value 0x00 ;# Max Power (Bus) Register (MAXPB)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2e value 0x01 ;# Hub Controller Max Current (Self) Register (HCMCS)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x2f value 0x00 ;# Hub Controller Max Current (Bus) Register (HCMCB)

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x30 value 0x32 ;# Power-on Time Register (PWRT)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x31 value 0x00 ;# Boost_Up Register (BOOSTUP)

                        #reserved

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x33 value 0x00 ;# Boost_3:2 Register (BOOST32)

                        #reserved

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x35 value 0x00 ;# Port Swap Register (PRTSP)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x36 value 0x21 ;# Port Remap 12 Register (PRTR12)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x37 value 0x03 ;# Port Remap 3 Register (PRTR3)

                        #reserved

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x39 value 0x01 ;# Status/Command Register (STCD)

                         

                         

                        # descriptors/strings

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3A value 0x0a ;# Size of Manufacturer ID String Descriptor (10 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3B value 0x03 ;# Descriptor Type (String Descriptor - 03h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3c value 0x45 ;# Manufacturer ID String (EEEE in UNICODE) .. fix later

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3d value 0x00 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3e value 0x45 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x3f value 0x00 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x40 value 0x45 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x41 value 0x00 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x42 value 0x45 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x43 value 0x00 ;#

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x44 value 0x12 ;# Size of Hi-Speed Device Descriptor in Bytes (18 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x45 value 0x01 ;# Descriptor Type (Device Descriptor - 01h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x46 value 0x00 ;# USB Specification Number that the device complies with (0200h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x47 value 0x02 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x48 value 0xff ;# Class Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x49 value 0x00 ;# Subclass Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4a value 0xff ;# Protocol Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4b value 0x40 ;# Maximum Packet Size for Endpoint 0

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4c value 0x24 ;# Vendor ID (0424h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4d value 0x04 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4e value 0x00 ;# Product ID (EC00h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x4f value 0xec ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x50 value 0x00 ;# Device Release Number (0100h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x51 value 0x01 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x52 value 0x01 ;# Index of Manufacturer String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x53 value 0x00 ;# Index of Product String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x54 value 0x00 ;# Index of Serial Number String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x55 value 0x01 ;# Number of Possible Configurations

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x56 value 0x09 ;# Size of Hi-Speed Configuration Descriptor in bytes (9 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x57 value 0x02 ;# Descriptor Type (Configuration Descriptor - 02h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x58 value 0x27 ;# Total length in bytes of data returned (0027h = 39 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x59 value 0x00 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5a value 0x01 ;# Number of Interfaces

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5b value 0x01 ;# Value to use as an argument to select this configuration

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5c value 0x00 ;# Index of String Descriptor describing this configuration

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5d value 0xe0 ;# Self powered and remote wakeup enabled

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5e value 0x01 ;# Maximum Power Consumption is 2 mA

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x5f value 0x09 ;# Size of Descriptor in Bytes (9 Bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x60 value 0x04 ;# Descriptor Type (Interface Descriptor - 04h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x61 value 0x00 ;# Number identifying this Interface

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x62 value 0x00 ;# Value used to select alternative setting

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x63 value 0x03 ;# Number of Endpoints used for this interface (Less endpoint 0)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x64 value 0xff ;# Class Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x65 value 0x00 ;# Subclass Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x66 value 0xff ;# Protocol Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x67 value 0x00 ;# Index of String Descriptor Describing this interface

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x68 value 0x12 ;# Size of Full-Speed Device Descriptor in Bytes (18 Bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x69 value 0x01 ;# Descriptor Type (Device Descriptor - 01h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6a value 0x00 ;# USB Specification Number that the device complies with (0200h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6b value 0x02 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6c value 0xff ;# Class Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6d value 0x00 ;# Subclass Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6e value 0xff ;# Protocol Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x6f value 0x40 ;# Maximum Packet Size for Endpoint 0

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x70 value 0x24 ;# Vendor ID (0424h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x71 value 0x04 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x72 value 0x00 ;# Product ID (EC00h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x73 value 0xec ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x74 value 0x00 ;# Device Release Number (0100h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x75 value 0x01 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x76 value 0x01 ;# Index of Manufacturer String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x77 value 0x00 ;# Index of Product String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x78 value 0x00 ;# Index of Serial Number String Descriptor

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x79 value 0x01 ;# Number of Possible Configurations

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7a value 0x09 ;# Size of Full-Speed Configuration Descriptor in bytes (9 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7b value 0x02 ;# Descriptor Type (Configuration Descriptor - 02h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7c value 0x27 ;# Total length in bytes of data returned (0027h = 39 bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7d value 0x00 ;#

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7e value 0x01 ;# Number of Interfaces

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x7f value 0x01 ;# Value to use as an argument to select this configuration

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x80 value 0x00 ;# Index of String Descriptor describing this configuration

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x81 value 0xe0 ;# Bus powered and remote wakeup enabled

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x82 value 0x01 ;# Maximum Power Consumption is 2 mA

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x83 value 0x09 ;# Size of Full-Speed Interface Descriptor in Bytes (9 Bytes)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x84 value 0x04 ;# Descriptor Type (Interface Descriptor - 04h)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x85 value 0x00 ;# Number identifying this Interface

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x86 value 0x00 ;# Value used to select alternative setting

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x87 value 0x03 ;# Number of Endpoints used for this interface (Less endpoint 0)

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x88 value 0xff ;# Class Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x89 value 0x00 ;# Subclass Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x8a value 0xff ;# Protocol Code

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x8b value 0x00 ;# Index of String Descriptor describing this interface

                         

                        ethtool -E enp0s17u1u1 magic 0x9500 offset 0x00 value 0xa5 ;# signature

                         

                        if you mess things up, temporarily short the eeprom data pin while booting (i used a pair of tweezers) then reconfigure (or just zero offset 0x00)

                        • 9. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                          mweal

                           

                          //EDIT

                          Wooop new answers when I wrote this. @mweal: Third question How did you get lsusb running? I get the following error:

                           

                          lsusb: Get "unable to initialize libusb: -99"


                          // Edit 2

                          It seems that this error is realted to the fact that my lan95xx is currently not identified as USB controller

                           

                          Sounds like you probably don't have the USB ID pin shorted to ground  on the edison.  This pin needs to be grounded for the USB OTG port to be a host on the Edison.

                           

                          The other possibility is that you are applying power to the VBUS pin with USB ID = 0 (ground) which triggers a bug in the Edison USB.

                          • 10. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                            IntelAnonymous

                            Thanks for your response! I just checked my layout, indeed, Pin 3 (USB_ID / USB OTG ID pin) is not grounded.

                            I will fix this and let you know if it works or not.

                             

                            And beside that thank you for your config script and the offering of having a look on my layout!!!!

                             

                            Edit:

                            @mweal Is the following correct?

                             

                            USB_ID ground

                            USB_VBUS not connected

                            USB_DP to LAN95xx USBDP0

                            USB_DN to LAN95xx USBDM0

                            Fault not connected

                            PSW not connected

                            • 11. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                              mweal

                              Edit:

                              @mweal Is the following correct?

                               

                              USB_ID ground

                              USB_VBUS not connected

                              USB_DP to LAN95xx USBDP0

                              USB_DN to LAN95xx USBDM0

                              Fault not connected

                              PSW not connected

                              I believe the fault pin should be tied high (1.8v).  I did it via a 10K resistor, but am not sure if this is needed.

                              • 12. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                                IntelAnonymous

                                mweal schrieb:

                                 


                                Edit:

                                @mweal Is the following correct?

                                 

                                USB_ID ground

                                USB_VBUS not connected

                                USB_DP to LAN95xx USBDP0

                                USB_DN to LAN95xx USBDM0

                                Fault not connected

                                PSW not connected

                                I believe the fault pin should be tied high (1.8v).  I did it via a 10K resistor, but am not sure if this is needed.

                                 

                                mweal , after reading the Edison Module Hardware Guide once again I believe that you are right:

                                 

                                The FAULT signal is active low. FAULT should be connected to GND if USB host mode is not used.

                                 

                                Would you have another look on the following table?

                                usb.PNG

                                 

                                I am unsure whether USB_VUS and PSW must actually be connected. Especially USB_VBUS since the edison will be the host and not connected to a "host port". Have you connected those signals?

                                • 13. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                                  mweal

                                  IntelAnonymous wrote:

                                   

                                  The FAULT signal is active low. FAULT should be connected to GND if USB host mode is not used.

                                   

                                  Would you have another look on the following table?

                                  usb.PNG

                                   

                                  I am unsure whether USB_VUS and PSW must actually be connected. Especially USB_VBUS since the edison will be the host and not connected to a "host port". Have you connected those signals?

                                   

                                  1) In your case the Edison is the host, so it is not connected to a host port, so a VBUS connection is not needed. 

                                  2) PSW is an output control signal to enable a power switch like the ST STMPS2151STR.  I assume you do not have a power switch between the edison and the LAN9512, so you do no need to connect this signal. 

                                  • 14. Re: How to get the Lan95xx (Lan9512) running with the Intel Edison
                                    IntelAnonymous

                                    Status update:

                                     

                                    I connected the USB_ID pin to ground (that was easy). However, I did not tie FAULT to high since it would have been dangerous to solder that pin within my current hardware. Now my edison shows the following behavior:

                                     

                                    dmesg | grep usb

                                    dmesg_usb.png

                                    The LAN9512 is detected (idProduct=9512), gets a device number, but then a "can't set config #1" error occurs followed by a disconnect. This continues many many times (device number 100, 101, ...). The error code is always -71 what (I believe) represents "Protocol error". After a while error code -110 "Connection timed out" shows up and no further messages appear. Another excerpt:


                                    dmesg | tail

                                    dmesg_usb_2.png


                                    This behavior seems to be related to a power problem: https://paulphilippov.com/articles/how-to-fix-device-not-accepting-address-error

                                     

                                    "most probably it’s a result of hardware failure rather than a driver or kernel bug. USB has an over-current protection, which gets triggered when power consumption from the port is too high."

                                     

                                    Since it is unclear formweal and me I need a statement from Intel. AlexT_Intel or JPMontero_Intel, or someone else at Intel, do you know whether FAULT has to be connected to 1.8V if the edison is setup as a host (USB_ID low)? Might my problem caused by not connecting the FAULT pin or can I exclude this as an error source? I appreciate any help!

                                    1 2 Previous Next