Hi, everyone.
First, a disclaimer:
This is a hardware solution to a software problem about a cheap etheret/usb adapter based on CoreChips SR9700 that I bought and didn't work when plugged on my Linux computer.
I followed instructions of Martijn Braam original post. I'm a technician used to soldering printed circuit boards, so I feel comfortable whit it.
This solution, as modifies the original product, may void warranties of the product and damage the computer.
This post just reflects my own experience implementing it and is not a recommendation. You have been warned.
This is a detailed description of the problem that resumes some of the research I did and may help to find a better software solution. As I'm not an English speaker, I am directly copying parts of them.
When I first plugged the adapter in the usb port, dmesg show:
As you can see:
"The 0fe6:9702 is a multidevice. It has 2 child devices:
- CDROM on Interface 0
and
- USB to Ethernet Adapter on Interface 1
So you can't switch the config. You've to tell the driver to use Interface 1." [1]
This is a so-called Modeswitch device. (Because it needs a driver to switch it from being one type of USB device to another).
Unfortunately, the adapter serves up a virtual CD by default, and usb_modeswitch doesn't appear to work.
The CDROM device
Linux Hardware list 0fe6:9702 device as a CDROM. And since the file manager opened a folder, suggests that the CDROM device is working as expected.
The contents of the Virtual CD are:
.
├── AUTORUN.INF
├── CoreChips.ico
├── RD9700.sfx.exe
├── SR9700 Mac OS 10.10 Driver.pkg
└── SR9700 Mac OS 10.6~10.9 Driver.pkg
└── Contents
├── Archive.bom
├── Archive.pax.gz
├── Info.plist
├── PkgInfo
└── Resources
├── package_version
├── postflight
└── zh-Hans.lproj
└── Description.plist
All drivers are outdated and can't be installed on moderns OS's, so, there is no need to maintain the Virtual CD function. There are no updated versions of them.
The Ethernet Adapter
The Linux Hardware ID 0fe6:9700 identifies an ICS Advent DM9601 Fast Ethernet Adapter, which is a USB 2.0 10/100M Ethernet adapter. This device is supported by the drivers/net/usb/dm9601.c and drivers/net/usb/sr9700.c kernel modules, meaning it should work on Linux distributions with kernel versions 2.6.38 and newer, including modern distributions like Ubuntu and Fedora, without the need for third-party drivers.
Implementing the hardware solution
After I followed the post instructions disabling the SPI Nor flash chip (which emulates the CDROM), the next time I plugged the adapter, dmesg show:
lsusb -t
"Now, this is important, plug the Ethernet in BEFORE plugging in the USB. If you don't, it won't work." [https://askubuntu.com/a/1471848]
The Fast Ethernet Adapter shows as the only device and the correct driver is loaded and the new interface initialized.
So, disabling the SPI Nor Flash Chip is the hardware way to go.
Sources:
Martijn Braam original post with a working solution:
Making an USB Ethernet adapter work [SR9700]
Figuring out hardware solutions to software problems
https://blog.brixit.nl/making-a-usb-ethernet-adapter-work-sr9700/
CoreChips Downloads: http://www.corechip-sz.com/endownload.asp
Hardware for Linux:
- 9702 - CDROM: https://linux-hardware.org/index.php?id=usb:0fe6-9702
- 9700 - Ethernet Fast Adapter: https://linux-hardware.org/index.php?id=usb:0fe6-9700
Linux Drivers sr9700 sources: https://github.com/torvalds/linux/blob/master/drivers/net/usb/sr9700.c
Standard SPI Flash Pinouts:
- https://www.jblopen.com/qspi-nor-flash-part-3-the-quad-spi-protocol/
- https://electronics.stackexchange.com/questions/427583/reading-a-md25q128sig-spi-flash-memory-with-raspberry-pi
Blogs and Forums:
Ask Ubuntu: https://askubuntu.com/questions/1360618/sr9700-core-chips-driver-for-xubuntu
Manjaro Forum: https://forum.manjaro.org/t/ethernet-adapter-chipset-sr9700-not-working/123726
Stack Exchange: https://unix.stackexchange.com/questions/722131/usb-ethernet-adapter-not-working
LinuxMint: https://forums.linuxmint.com/viewtopic.php?t=372436