Sunday, August 24, 2025

[SOLVED] CoreChips SR9700 (0fe6:9702/9700) Micro-usb Ethernet Adapter on Linux

 

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:

and "lsusb -t" outputs:


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:

Linux Drivers sr9700 sources: https://github.com/torvalds/linux/blob/master/drivers/net/usb/sr9700.c 

Standard SPI Flash Pinouts: 

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

Phoronix: https://www.phoronix.com/forums/forum/hardware/general-hardware/44256-usb-ethernet-adaptor-0fe6-9702-kontron-ics-advent

Stack Exchange: https://unix.stackexchange.com/questions/722131/usb-ethernet-adapter-not-working

LinuxMint: https://forums.linuxmint.com/viewtopic.php?t=372436 

Tuesday, May 17, 2016

Ubuntu on VirtualBox - Mount a vdi drive on startup

Hi, I had Ubuntu 14.04 running on VirtualBox and needed more storage. A solution was an old vdi with enough space available, but... only available after login.

The drive was mounted using:

gvfs-mount -d /dev/sdb3

that's the command line equivalent of clicking on drive icon to mount it, after login.
 I needed the drive already mounted at login time.

Fstab didn't work because virtualbox is loaded after it.

Solution:

1 - Discover the device of your drive (sdb3 in my case):
     sudo fdisk -l

2 - Make a folder to mount your drive:
     mkdir /media/adminuser/mydrive

2 - Edit rc.local
     sudo -H gedit /etc/rc.local

3 - Add a line before exit 0
    mount -t ext4 /dev/sdb3 /media/adminuser/mydrive

4 - Save and reboot.

Good luck!
PS: More info here

Wednesday, February 25, 2015

Enabe JMX on Jetty

Quick and dirty:

$ export JMX_OPTS = -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=8090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
$ java $JMX_OPTS -jar start.jar etc/jetty-jmx.xml etc/jetty.xml


Just for testing, for production system ssl and user authentication must be enabled.

Monday, February 16, 2015

Tomcat doesn't starts on boot (Yosemite) or launchctl operation already in progress

After Yosemite, Tomcat installation refused to start on boot. When trying to start it manually, using:

sudo launchctl load /Library/LaunchDaemons/org.apache.tomcat.plist


failed with message:

launchctl operation already in progress


It took me a while to discover that:

  • launchctl has changed a lot after Yosemite (and you need to read the only available documentation, man launchctl)
  • most commands (like load) are in deprecated mode
  • all tomcat files where with "@" extended attribute (ls -l@ gives a list with extended attributes) meaning that are signed with "com.apple.quarantine" (you need to approve execution explicitly on the first run)
  • the command:

    launchctl print-disabled system


    lists org.apache.tomcat as disabled

Solution:
- Remove the quarantine attribute
xattr -r -d com.apple.quarantine /opt/servers/Tomcat/TomcatHome

- Enable service
sudo launchctl enable org.apache.tomcat

- Add service to the system domain
sudo launchctl bootstrap system /Library/LaunchDaemons/org.apache.tomcat.plist

Monday, February 2, 2015

Enable Java Web Start lauching for JNLP files, also Firefox


In a terminal, type the following command, then press Return:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister "/System/Library/CoreServices/Java Web Start.app"


To enable Firefox to launch JNLP files, open Firefox menu:
Preferences -> Applications ->JNLP Files -> Use other...
Search for /System/Library/CoreServices/Java Web Start

Wednesday, January 14, 2015

Compiling mod_jk on Mac OS X 10.10 (Yosemite)

First, check that you have the most recent version of XCode and the command line tools.
Second, solve the "configure: error: C compiler cannot create executables" problem.
As Adrian Rodriguez says here :
"Some packages like mod_jk use /usr/sbin/apxs -q CC in configure to ask for the C compiler. APXS spits it out, but it has the wrong path so that's why you keep getting errors."

Solution, make a symlink:

cd /Applications/Xcode.app/Contents/Developer/Toolchains
sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain


After that, download the last version of connectors Source Release tar.gz from here, expand it and go to the native folder.


cd /tmp

wget http://ftp.unicamp.br/pub/apache/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz
tar xvf tomcat-connectors-1.2.40-src.tar.gz
cd tomcat-connectors-1.2.40-src/native

./configure --with-apxs=/usr/sbin/apxs
make


The BUILDING.txt file, has details and must be read:

"The resulting module file mod_jk.so of mod_jk will be
located in the directory apache-2.0 (for any version
of Apache 2.x) respectively apache-1.3 (for Apache 1.3).

Simply copy the file to your web server modules or libexec
directory.
"

Result of compiling can be found on native/apache-2.0, to install:


sudo cp apache-2.0/mod_jk.so /usr/libexec/apache2/

# Clean the work area
cd /tmp
rm -r rm -r tomcat-connectors-1.2.40-src
rm tomcat-connectors-1.2.40-src.tar.gz



Saturday, August 2, 2014

Install Libreplan on MySql


Install Libreplan on MySql


This instructions assume that you have already installed MySql, Tomcat is installed at <TOMCAT_HOME> and is the first libreplan installation.
Stop Tomcat:

$ sudo launchctl unload /Library/LaunchDaemons/org.apache.tomcat.plist
Download libreplan mysql version from https://sourceforge.net/projects/libreplan/files/LibrePlan/:

install_mysql_1.4.0.sql
libreplan_mysql_1.4.0.war

Download MySql JDBC driver from here - MySQL JDBC Driver Download Here.
Move the mysql-connector-java-5.1.31-bin.jar (or newer version) to <TOMCAT_HOME>/lib folder.

Open a terminal on the folder where you downloaded the install_mysql_1.4.0.sql and libreplan_mysql_1.4.0.war files.

Log on MySql and create a user and a database for libreplan. Then switch to the new database and run the install_mysql_1.4.0 script:

$ mysql mysql -u root
mysql>
mysql> CREATE USER 'libreplan'@'localhost' IDENTIFIED BY 'libreplan';
Query OK, 0 rows affected (0.23 sec)

mysql> CREATE DATABASE libreplan;
Query OK, 1 row affected (0.09 sec)

mysql> GRANT ALL ON libreplan.* TO 'libreplan'@'localhost';
Query OK, 0 rows affected (0.23 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.23 sec)

mysql> connect libreplan;
Connection id:    91
Current database: libreplan

mysql> \. install_mysql_1.4.0.sql
Query OK, 1 row affected (0.00 sec)

Query OK, 0 rows affected (0.12 sec)

...(a lot of this until the end of the script)...

Query OK, 0 rows affected (0.19 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 1 row affected (0.01 sec)

mysql> exit

Edit the context xml file: <TOMCAT_HOME>/conf/context.xml and add the following content after <Context> tag:

<Resource name="jdbc/libreplan-ds" auth="Container"
         type="javax.sql.DataSource"
         driverClassName="com.mysql.jdbc.Driver"
         url="jdbc:mysql://localhost:3306/libreplan"
         username="libreplan"
         password="libreplan"
         maxActive="100"
         maxIdle="30"
         maxWait="10000"
         validationQuery="Select 1" />


Copy the libreplan war file renaming it to libreplan.war. This is important or your url will be: http://localhost:8080/libreplan_mysql_1.4.0/
$ cp libreplan_mysql_1.4.0.war <TOMCAT_HOME>/webapps/libreplan.war

Start Tomcat:

$ sudo launchctl load /Library/LaunchDaemons/org.apache.tomcat.plist

You will find LibrePlan at:

http://localhost:8080/libreplan