Difference between revisions of "USB to Ethernet adapter"

From ArmadeusWiki
Jump to: navigation, search
(Usage)
(Usage)
(5 intermediate revisions by 3 users not shown)
Line 9: Line 9:
  
 
==== Kernel configuration ====
 
==== Kernel configuration ====
<pre class=apf>
+
<pre class=host>
# make linux26-menuconfig
+
$ make linux-menuconfig
 
</pre>
 
</pre>
  
Line 17: Line 17:
 
     [*] Network device support  --->
 
     [*] Network device support  --->
 
         USB Network Adapters  --->
 
         USB Network Adapters  --->
 +
            [...]
 
             <M> Multi-purpose USB Networking Framework
 
             <M> Multi-purpose USB Networking Framework
 +
            [...]
 
             <M> CDC Ethernet support
 
             <M> CDC Ethernet support
 +
            [...]
 
             <M> SMSC LAN95XX based USB 2.0 10/100 ethernet devices
 
             <M> SMSC LAN95XX based USB 2.0 10/100 ethernet devices
 
</pre>
 
</pre>
Line 24: Line 27:
 
==== Additional tools ====
 
==== Additional tools ====
 
In order to read/write the configuration eeprom of the LAN9500, Ethtool has to be used.
 
In order to read/write the configuration eeprom of the LAN9500, Ethtool has to be used.
<pre class=apf>
+
<pre class=host>
# make menuconfig
+
$ make menuconfig
 
</pre>
 
</pre>
  
Line 50: Line 53:
  
 
<pre class=apf>
 
<pre class=apf>
  ethtool -e usb0   (eeprom read)
+
  ethtool -e usb0   # (eeprom read)
  ethtool -E usb0 0x9500 offset value   (eeprom write value at offset)
+
  ethtool -E usb0 magic 0x9500 offset xxx value xxx  # (eeprom write value at offset)
 
</pre>
 
</pre>
 
Additional informations concerning the EEPROM containt can be found on the SMSC web site.
 
Additional informations concerning the EEPROM containt can be found on the SMSC web site.
Line 57: Line 60:
  
 
[[Category:Network]]
 
[[Category:Network]]
[[Category:WiFi]]
 
 
[[Category:USB]]
 
[[Category:USB]]

Revision as of 15:35, 1 October 2019

How-to use USB to Ethernet adapters

Prerequesities

Tested hardware

SMSC LAN9500

The SMSC LAN9500 is a Hi-Speed USB 2.0 to 10/100 Ethernet Controller. The datasheet can be found here: http://www.smsc.com/media/Downloads_Public/Data_Sheets/9500.pdf. An external EEPROM is used to store the LAN9500 configuration.


Kernel configuration

$ make linux-menuconfig
 Device Drivers  --->
    [*] Network device support  --->
        USB Network Adapters  --->
            [...]
            <M> Multi-purpose USB Networking Framework
            [...]
            <M> CDC Ethernet support
            [...]
            <M> SMSC LAN95XX based USB 2.0 10/100 ethernet devices

Additional tools

In order to read/write the configuration eeprom of the LAN9500, Ethtool has to be used.

$ make menuconfig
 Package Selection for the target  --->
    [*] Networking  --->
            [*] ethtool

Usage

First mount the module:

# modprobe smsc95xx

then start the new ethernet port

# ifconfig usb0 192.168.10.208 up

If the message "No EEPROM present" is displayed, this indicates that no configuration file has been detected in the EEPROM. The LAN9500 will start in a default mode and the MAC address will be randomly generated by Linux. The EEPROM can be read/write by using ethtool once the module loaded

 ethtool -e usb0   # (eeprom read)
 ethtool -E usb0 magic 0x9500 offset xxx value xxx  # (eeprom write value at offset)

Additional informations concerning the EEPROM containt can be found on the SMSC web site.