English is not my native language so please be patient.
I'm using a Rasp and the Ethernet port is already taken, so we bought a USB2.0 to Fast Ethernet Adapter, like this one: https://www.jacobsparts.com/items/USB-LAN-04
The RasPi detect the QingHeng Electronics device as is show in the following screenshot. The Chipset is suposed to be the CH9200.
Installing the drivers in a laptop with Ubuntu 14.04 was easy, but same steps for the Rasp didn't work. Aparently the issue is the Kernel, the CD with the drivers bring a "readme", which claims:
sudo Note:
Please run as root
Supported linux kernel range from 2.6.x to 3.8.x
- CH9x00 module depends on mii and usbnet modules
If you want complied this module in kernel, refer to followed
a. # cp ch9x00.c ~/2.6.25/driver/net/usb/
b. # cd> ~/2.6.25/driver/net/usb/
c. modified Makefile and Kconfig for ch9x00.c
Install: # make # make load
Uninstall: # make unload
So i verify the kernel version of the rasp using uname -a
, gives the following:
Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
I copy the files from the CD driver to home/pi/linux
, the command sudo make
returns the following:
make -C /lib/modules/4.1.7-v7+/build M=/home/pi/linux
make[1]: *** /lib/modules/4.1.7-v7+/build: No existe el fichero o el directorio. Alto.
Makefile:13: recipe for target 'modules' failed
make: *** [modules] Error 2
the output of ls -l
acording to Diederik comment. This is before I used the linux-headers method.
In the Raspberry forums there is a posible solution in the seventh post that lead to install the "linux-headers-3.10-3-rpi" and then link the modules:
sudo ln -s /lib/modules/3.10-3-rpi/build /lib/modules/ 4.1.7-v7+/build
This let me compile the files, once there I tried to run sudo make load
, but this time the answer was:
modprobe mii
modprobe usbnet
insmod ch9x00.ko
Error: could not insert module ch9x00.ko: Invalid module format
Makefile:16: recipe for target 'load' failed
make: *** [load] Error 1
Also tried with "linux-headers-3.18.0-trunk-rpi2" because those are made for the RasPi2, but that didn't work either.
Thanks to Diederik de Haas for his response and the updates, i just followed his detailed steps, in the Step 1 choosed the "Commit" published on Nov 18th with the "2a329e0", using the Module7.symvers
and the git_hash
from that date.
Step 2 and 3 went just ok, compilation too, but when the time for waking up the module come, got the following result:
Also tried with --force
, finally post the dmesg | tail
for clues.
Update Dic 16
When I start this question already have a working web server in the RasPi (raspbian wheezy) using tomcat7, which was quite difficult to setup, so i made an RasPi_14_12_16.img for safety, in this image i have the following setup that can differs from a standard ".img"
1 - Got network with static ip runing on a wifi usb module.
2 - Change some rules (rules.d - udev) to auto-mount usb with full permissions.
3 - Internationalisation Options was changed to es_CO. UTF-8 UTF-8 and SPI Interface was disabled.
Just uploaded the ".img" once again and the detailed info for the procedure acording to my kernel,is the next:
1 - uname -a
got the following Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
2 - Installed gcc (i have previously removed) sudo apt-get install gcc
(works fine install other packages along)
3 - sudo apt-get update && sudo apt-get upgrade
, Then uname -r
---> still 4.1.7-v7+
4 - Then I get the git_hash
from my Pi : zgrep '* firmware as of' /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1
* firmware as of 960832a6c2590635216c296b6ee0bebf67b2****
5 - Like the Step 1 on Diederik's answer: download (raw --> right click --> save link as...) the Module7.symvers from https://github.com/raspberrypi/firmware/tree/2a329e0c7d8ea19c085bac5633aa4fccee0f21be/extra
6 - Like the Step 2 on Diederik's answer: Got the kernel sources and put them into the rpf-linux-kernel folder:
~ $ git clone https://github.com/raspberrypi/linux rpf-linux-kernel
also:
git checkout -b rpi-bootloader-4.1.7 960832a6c2590635216c296b6ee0bebf67b2****
make mrproper
make bcm2709_defconfig
make modules_prepare
7 - Like the Step 3 on Diederik's answer: I made the virtual links using: sudo ln -s /home/pi/rpf-linux-kernel/ /lib/modules/$(uname -r)/build
@DiederikdeHaas Upload the ch9200.ko (https://drive.google.com/file/d/0BxmrihUj-8tSa2YxUDAzY1NyNkU/view?usp=sharing) and detailed the following steps to install the module:
1 - To install it, do: sudo install -p -m 644 ch9200.ko /lib/modules/4.1.7-v7+/kernel/drivers/net/usb
2 - Then: sudo /sbin/depmod -a 4.1.7-v7+
3 - After that you can load the module with: sudo modprobe ch9200