/usr/src/linux/drivers/usb/input
# vi hid-core.c { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, { 1952,4097,HID_QUIRK_IGNORE }, // I/O solution van elomax { 1952,4098,HID_QUIRK_IGNORE }, // AnIn solution van elomax { 1952,4099,HID_QUIRK_IGNORE }, // Fan solution van elomax { 0, 0 } |
/usr/src # tar xvzf
/tmp/iosolutionxx.tar.gz /usr/src # cd iosolution-0.6 /usr/src/iosolution-0.6 # |
#!/bin/bash make -C /usr/src/linux SUBDIRS=$PWD modules |
/usr/src/iosolution-0.6g # ./maak make: Entering directory `/usr/src/linux-2.6.18.2-34' CC [M] /usr/src/iosolution-0.6g/iosolution.o /usr/src/iosolution-0.6g/iosolution.c:35:35: error: linux/devfs_fs_kernel.h: No such file or directory /usr/src/iosolution-0.6g/iosolution.c:443: error: unknown field ‘mode’ specified in initializer /usr/src/iosolution-0.6g/iosolution.c:608: error: unknown field ‘owner’ specified in initializer /usr/src/iosolution-0.6g/iosolution.c:608: warning: initialization from incompatible pointer type make[1]: *** [/usr/src/iosolution-0.6g/iosolution.o] Error 1 make: *** [_module_/usr/src/iosolution-0.6g] Error 2 |
Fout in regel 35: #include <asm/uaccess.h> #include <linux/device.h> //GJ Unmaintained since 2005#include <linux/devfs_fs_kernel.h> Fout in regel 443: .name = "iosolution000", .fops = &iosolution_fops, //GJ.mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, .minor_base = IOSOLUTION_MINOR_BASE, Fout in regel 608: static struct usb_driver usb_iosolution_driver = { //GJ.owner = THIS_MODULE, .name = "iosolution", |
/usr/src/iosolution-0.6g # ./maak make: Entering directory `/usr/src/linux-2.6.18.2-34' CC [M] /usr/src/iosolution-0.6g/iosolution.o Building modules, stage 2. MODPOST CC /usr/src/iosolution-0.6g/iosolution.mod.o LD [M] /usr/src/iosolution-0.6g/iosolution.ko make: Leaving directory `/usr/src/linux-2.6.18.2-34' /usr/src/iosolution-0.6g # cp iosolution.ko /lib/modules/2.6.18.2-34-default/ (dit moet de huidige kernel versie zijn) |
KERNEL=="usb*",
SYSFS{idVendor}=="07a0", SYSFS{idProduct}=="1001", NAME="iosolution%m",
MODE="666" ,SYMLINK+="iosolution" |
/usr/src/iosolution-0.6g # cp
20-iosolution.rules /etc/udev/rules.d/ /usr/src/iosolution-0.6g # cp 20-fansolution.rules /etc/udev/rules.d/ |
Dec 23 19:48:59 mars kernel: usb
1-1: new low speed USB device using uhci_hcd and address 3 Dec 23 19:48:59 mars kernel: usb 1-1: new device found, idVendor=07a0, idProduct=1001 Dec 23 19:48:59 mars kernel: usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0 Dec 23 19:48:59 mars kernel: usb 1-1: Product: I/O Solution Dec 23 19:48:59 mars kernel: usb 1-1: Manufacturer: Leiderdorp Instruments Dec 23 19:48:59 mars kernel: usb 1-1: configuration #1 chosen from 1 choice Dec 23 19:49:00 mars kernel: Leiderdorp Instruments I/O Solution Aangesloten op device :iosolution0 Dec 23 19:49:00 mars kernel: usbcore: registered new driver iosolution Dec 23 19:49:00 mars kernel: /usr/src/iosolution-0.6g/iosolution.c: v0.6:USB I/O solution driver Geladen Dec 23 19:49:00 mars kernel: usbcore: registered new driver hiddev Dec 23 19:49:00 mars kernel: usbcore: registered new driver usbhid Dec 23 19:49:00 mars kernel: drivers/usb/input/hid-core.c: v2.6:USB HID core driver |
/usr/src/iosolution-0.6g # lsmod
| grep iosolution iosolution 11424 0 usbcore 114896 6 usbhid,iosolution,pwc,snd_usb_audio,snd_usb_lib,uhci_hcd /usr/src/iosolution-0.6g # |
/ # ls -l /dev/iosolution lrwxrwxrwx 1 root root 11 Dec 23 20:48 /dev/iosolution -> iosolution0 |
/usr/src/io-0.1 #
./configure .... configure: creating ./config.status fast creating Makefile fast creating io/Makefile fast creating io/docs/Makefile fast creating io/docs/en/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing default-1 commands /usr/src/io-0.1 # make /usr/src/io-0.1 # make install /bin/sh ../admin/mkinstalldirs /usr/local/bin /bin/sh ../libtool --silent --mode=install /usr/bin/install -c -p io /usr/local/bin/io |
/usr/src/io-0.1 # io -d2 byte 0 :stroom P0.2 :15 stroom P0.3 :15 byte 1 :stroom P0.0 :15 stroom P0.1 :15 byte 2 :stroom P1.2 :15 stroom P1.3 :15 byte 3 :stroom P1.0 :15 stroom P1.1 :15 byte 4 :Pullup (+=aan): P1.0:+ P1.1:+ P1.2:+ P1.3:+ P1.4:+ P1.5:+ P1.6:+ P1.7:+ byte 5 :Pullup (+=aan): P0.0:+ P0.1:+ P0.2:+ P0.3:+ P0.4:+ P0.5:+ P0.6:+ P0.7:+ byte 6 :Data Poort 1 : P1.0:1 P1.1:1 P1.2:1 P1.3:1 P1.4:1 P1.5:1 P1.6:1 P1.7:1 byte 7 :Data Poort 0 : P0.0:1 P0.1:1 P0.2:1 P0.3:1 P0.4:1 P0.5:1 P0.6:1 P0.7:1 |
# while sleep 0.5 ; do io -p0.1
h; sleep 0.5; io -p0.1 l; done |
# while sleep 0.5 ; do io -p0.0
h; io -p0.1 l ; sleep 0.5; io -p0.0 l; io -p0.1 h ; done |