Difference between revisions of "USB to Ethernet adapter"
m (→Kernel configuration) |
|||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Network]] | ||
+ | [[Category:USB]] | ||
+ | |||
+ | |||
How-to use USB to Ethernet adapters | How-to use USB to Ethernet adapters | ||
Line 4: | Line 8: | ||
==Tested hardware == | ==Tested hardware == | ||
+ | |||
+ | === LAN JP208 (ASIX AX88772C) === | ||
+ | |||
+ | LAN JP208 is a ''noname'' USB2 to Ethernet controller adapter. | ||
+ | |||
+ | [[File:lan_jp208.jpg]] | ||
+ | |||
+ | On host x86 computer, this converter is identified as an ASIX 8877 chip : | ||
+ | <pre class=host> | ||
+ | [ +0,112941] usb 1-3.1.4: New USB device found, idVendor=0b95, idProduct=772b | ||
+ | [ +0,000003] usb 1-3.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 | ||
+ | [ +0,000002] usb 1-3.1.4: Product: AX88772C | ||
+ | [ +0,000002] usb 1-3.1.4: Manufacturer: ASIX Elec. Corp. | ||
+ | [ +0,000001] usb 1-3.1.4: SerialNumber: 00000A | ||
+ | </pre> | ||
+ | |||
+ | ==== Kernel configuration ==== | ||
+ | The driver is included in linux menuconfig. | ||
+ | |||
+ | <pre class=host> | ||
+ | $ make linux-menuconfig | ||
+ | </pre> | ||
+ | |||
+ | <pre class="config"> | ||
+ | Device Drivers ---> | ||
+ | [*] Network device support ---> | ||
+ | USB Network Adapters ---> | ||
+ | [...] | ||
+ | <*> Multi-purpose USB Networking Framework | ||
+ | <*> ASIX AX88xxx Based USB 2.0 Ethernet Adapters | ||
+ | [...] | ||
+ | |||
+ | </pre> | ||
+ | ==== Usage ==== | ||
+ | |||
+ | Usage are the same as SMSC described below, except that: | ||
+ | * interface is named ethx (If you already mount the base ethernet, this adapter will be named eth1). | ||
+ | * The Linux configuration given here avoid modprobe. | ||
+ | |||
=== SMSC LAN9500 === | === 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. | 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. | ||
Line 27: | Line 70: | ||
==== 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= | + | <pre class=host> |
− | + | $ make menuconfig | |
</pre> | </pre> | ||
<pre class="config"> | <pre class="config"> | ||
− | + | Target packages ---> | |
− | + | Networking applications ---> | |
[*] ethtool | [*] ethtool | ||
+ | [*] enable pretty printing | ||
+ | |||
</pre> | </pre> | ||
Line 53: | Line 98: | ||
<pre class=apf> | <pre class=apf> | ||
− | ethtool -e usb0 | + | ethtool -e usb0 # (eeprom read) |
− | ethtool -E usb0 magic 0x9500 offset xxx value xxx | + | 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. | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 09:49, 30 April 2020
How-to use USB to Ethernet adapters
Contents
Prerequesities
Tested hardware
LAN JP208 (ASIX AX88772C)
LAN JP208 is a noname USB2 to Ethernet controller adapter.
On host x86 computer, this converter is identified as an ASIX 8877 chip :
[ +0,112941] usb 1-3.1.4: New USB device found, idVendor=0b95, idProduct=772b [ +0,000003] usb 1-3.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ +0,000002] usb 1-3.1.4: Product: AX88772C [ +0,000002] usb 1-3.1.4: Manufacturer: ASIX Elec. Corp. [ +0,000001] usb 1-3.1.4: SerialNumber: 00000A
Kernel configuration
The driver is included in linux menuconfig.
$ make linux-menuconfig
Device Drivers ---> [*] Network device support ---> USB Network Adapters ---> [...] <*> Multi-purpose USB Networking Framework <*> ASIX AX88xxx Based USB 2.0 Ethernet Adapters [...]
Usage
Usage are the same as SMSC described below, except that:
- interface is named ethx (If you already mount the base ethernet, this adapter will be named eth1).
- The Linux configuration given here avoid modprobe.
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
Target packages ---> Networking applications ---> [*] ethtool [*] enable pretty printing
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.