Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

LabJack dont work under Fedora Core 8 = linux veteran


  • Please log in to reply
19 replies to this topic

#1 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 27 April 2009 - 09:50 AM

Hello, here is what I get with dmesg: Apr 27 20:41:15 pelikan kernel: usbhid: timeout initializing reports Apr 27 20:41:15 pelikan kernel: input: LabJack Labjack U12 as /class/input/input7 Apr 27 20:41:15 pelikan kernel: input,hidraw1: USB HID v1.10 Device [LabJack Labjack U12] on usb-0000:00:1d.3-2 Apr 27 20:41:15 pelikan kernel: usb 5-2: New USB device found, idVendor=0cd5, idProduct=0001 Apr 27 20:41:15 pelikan kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Apr 27 20:41:15 pelikan kernel: usb 5-2: Product: Labjack U12 Apr 27 20:41:15 pelikan kernel: usb 5-2: Manufacturer: LabJack And there is no way in this world or the next to get the usbhid or hidusb module to not register labjack. This is a major problem, How can such a major flavor of Linux not be supported? I ordered this specific device because of Linux support and had it travel the way to Russia, I stood in below 20 degrees cold waitng for customs to clear the thing. I am a linux veteran and I think that asking us to recompile the Fedora Core kernel for a labjack driver is silly Please fix, help me find a solution. I did everything written in this forum, compiled the driver (deleted the propper lines etc) Nothing works SOS

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 27 April 2009 - 11:37 AM

There are ways around recompiling the kernel, which wasn't true when the driver was first released in 2004. Look at these forum topics and see if they help, https://forums.labja...?showtopic=1370 and https://forums.labja...?showtopic=4369. The first topic basically provides a script for unloading the hid driver, then loading the labjack driver and reloading the hid driver. In the second topic look at the last post where the /etc/modprobe.d/options file is modified (not sure if this file or a similar one is available for Fedora 8).

#3 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 27 April 2009 - 12:17 PM

There are ways around recompiling the kernel, which wasn't true when the driver was first released in 2004. Look at these forum topics and see if they help, https://forums.labja...?showtopic=1370 and https://forums.labja...?showtopic=4369. The first topic basically provides a script for unloading the hid driver, then loading the labjack driver and reloading the hid driver. In the second topic look at the last post where the /etc/modprobe.d/options file is modified (not sure if this file or a similar one is available for Fedora 8).


I did all of this and it does not work!

#4 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 27 April 2009 - 12:19 PM

Both links irrelevant to Fedora Core 8, there is no hid-core.c file, the hid module is in the kernel. Please help, I need to use the device. Real BS usb driver story, why not use standard linusb and forget building modules and such...

#5 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 27 April 2009 - 01:00 PM

I re-did the adding to /etc/modprobe.d/options and so on... no results, does not work!!!! my kernel insists: Apr 27 23:53:13 pelikan kernel: usbhid: timeout initializing reports Apr 27 23:53:13 pelikan kernel: input: LabJack Labjack U12 as /class/input/input6 Apr 27 23:53:13 pelikan kernel: input,hidraw1: USB HID v1.10 Device [LabJack Labjack U12] on usb-0000:00:1d.3-2 Apr 27 23:53:13 pelikan kernel: usb 5-2: New USB device found, idVendor=0cd5, idProduct=0001 Apr 27 23:53:13 pelikan kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Apr 27 23:53:13 pelikan kernel: usb 5-2: Product: Labjack U12 Apr 27 23:53:13 pelikan kernel: usb 5-2: Manufacturer: LabJack And there is no way you can tell it otherwise... by the way... the module labjack.ko, even though it compiles, does not install, adding all the PWD := stuff dont help... [[email protected] ~]# modprobe labjack FATAL: Module labjack not found. FATAL: Error running install command for labjack [[email protected] ~]# locate labjack.ko /lib/modules/2.6.26.8-57.fc8/labjack.ko /lib/modules/2.6.26.8-57.fc8/kernel/drivers/usb/labjack/labjack.ko /usr/src/kernels/2.6.26.8-57.fc8-i686/labjack.ko

#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 27 April 2009 - 02:10 PM

To load the driver with modprobe, the /lib/modules directory needs a copy of the kernel module and depmod needs to be ran to update the dependency descriptions. These two commands should make the U12 driver loadable from modprobe: cp labjack.ko /lib/modules/`uname -r`/kernel/drivers/misc depmod -a Looking at your locate command, try deleting your /lib/modules/2.6.26.8-57.fc8/kernel/drivers/usb/labjack/labjack.ko file to have only one kernel module to avoid confusions, and then run depmod -a. As for the code that contains the hid blacklist, it was formerly part of the drivers/usb/input/hid-core.c file in the kernel source, now part of the drivers/hid/usbhid/hid-quirks.c file. See if any of this information helps you along. I'll try to find some other alternative solutions if the two links are not helping.

#7 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 27 April 2009 - 05:34 PM

Hopefully my last post has help with your 'modprobe labjack' problem. If not I can help you investigate further.

Since you have a late enough kernel, one of the better ways of bypassing the HID driver is through the /etc/modprobe.d/ or /etc/modprobe.conf files without having to resort to a kernel recompile. I tried the U12 installation instructions in this topic, https://forums.labja...?showtopic=4369, and had to do a little extra work to get it running. I run Ubuntu 8.04, kernel 2.6.24 and at the end before running the test examples I needed to run 'update-initramfs -u' and restart the system to get the device running. I do not think 'update-initramfs' is available to Fedora (you can try), but a system restart might do the trick to reload the hid module with the new options.

#8 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 27 April 2009 - 09:00 PM

Still no good...

thank you for the modprobe quirk... I was using both insmod and modprobe, but this solve initiating the module by typing modprobe labjack.

OK, I did EVERYTHING on the page (link) you sent me, created the extra files in /etc/modprobe.d NO GOOD... nothing

here is what I get still: (after reboot)


Apr 28 07:50:59 pelikan kernel: usbhid: timeout initializing reports
Apr 28 07:50:59 pelikan kernel: input: LabJack Labjack U12 as /class/input/input7
Apr 28 07:50:59 pelikan kernel: input,hidraw1: USB HID v1.10 Device [LabJack Labjack U12] on usb-0000:00:1d.3-2
Apr 28 07:50:59 pelikan kernel: usb 5-2: New USB device found, idVendor=0cd5, idProduct=0001
Apr 28 07:50:59 pelikan kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 28 07:50:59 pelikan kernel: usb 5-2: Product: Labjack U12
Apr 28 07:50:59 pelikan kernel: usb 5-2: Manufacturer: LabJack
Apr 28 07:50:59 pelikan kernel: usbcore: registered new interface driver labjack
Apr 28 07:50:59 pelikan kernel: labjack: Labjack USB Driver <http://www.labjack.com/> v0.35

I also have these entries:

[[email protected] test]# cd /dev/usb
[[email protected] usb]# ls
labjack0
[[email protected] usb]# ls -lah
total 0
drwxr-xr-x 2 root root 60 2009-04-28 07:50 .
drwxr-xr-x 14 root root 4.5K 2009-04-28 07:55 ..
crw-rw-rw- 1 root root 180, 240 2009-04-28 07:50 labjack0

So, now the driver gets loade automatically, but

[[email protected] usb]# cd -
/home/pasha/Download/linux-labjack/test
[[email protected] test]# ls
analog-outs analog-outs.c firmware-revision firmware-revision.c list-all list-all.c Makefile
[[email protected] test]# ./firmware-revision
version: 0.000000
[[email protected] test]# ./analog-outs
./analog-outs: Testing analog outs ...
Setting voltage to 0.000000 ...
./analog-outs: Error setting analog outs!
./analog-outs: Error setting analog outs!
[[email protected] test]# ./list-all

Found 0 LabJacks!

Info:

productID, serialNum, localID, powerList, calMatrix
[[email protected] test]#


Please help!!!




#9 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 28 April 2009 - 10:59 AM

Yes, and similar actions on my notebook, running Fedora core 8 give no results as well. There is probably some way to make modprobe not lode the hid module when labjack is conected but I'm unable to find out how to do this... Please help, I really want to use labjack : (

#10 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 April 2009 - 04:01 PM

Ok here are some more things to try so that the HID does not take over the U12. You can try adding the 'options usbhid quirks=0xcd5:0x0001:0x4' line to the /etc/modprobe.conf file. You can try restarting then.

You can try adding this boot parameter 'usbhid.quirks=0xcd5:0x0001:0x0004' to your boot menu configuration file for the current kernel you are booting into. For example on my computer in my /boot/grub/menu.lst file I would edit this boot entry as so.

title desktop586 2.6.27.10-1mnb
kernel (hd1,4)/boot/vmlinuz-2.6.27.10-desktop586-1mnb BOOT_IMAGE=desktop586_2.6.27.10-1mnb root=UUID=30ec8187-a3a7-4dc3-9303-30631702600d resume=UUID=59b60372-4fe4-4130-ab94-5fd95e9afe03 splash=verbose vga=797 usbhid.quirks=0xcd5:0x0001:0x0004
initrd (hd1,4)/boot/initrd-2.6.27.10-desktop586-1mnb.img

You will need to restart after this for it to take effect.

The last thing I could think for you to try is to update the initrd image for the usbhid quirk optiion to take effect, like I needed to do in Ubuntu with the 'update-initramfs -u'. With Fedora I think mkinitrd can do that, When using mkinitrd on Fedora the 'options usbhid quirks=0xcd5:0x0001:0x4' option looks like it needs to be in the /etc/modprobe.conf file (https://bugzilla.red...g.cgi?id=457870). Also, please be careful if you are going to try the following as you can foul up the current boot image. I would suggest making a backup of the current initrd boot image you are using in the /boot directory, and that you have another image to boot into. The command would look something like this 'mkinitrd -f -v /boot/initrd-2.6.26.8-57.fc8.img 2.6.26.8-57.fc8', where you specify the current boot image you want to replace (/boot/initrd-2.6.26.8-57.fc8.img) and the kernel version you are building for (2.6.26.8-57.fc8).

Other than these ideas I am running out of things for you to try. You can perform an online search on 'options usbhid quirks' and Fedora, methods for preventing the hid driver from claiming a device or ways to unbind a device from the usbhid. The last resort is the kernel recompile method.

#11 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 April 2009 - 10:28 PM

You can unbind the U12 from the usbhid, with the command mentioned here: http://www.mind-down...n-touchpad.html. For the U12 to get the driver loaded something like this should work while your U12 is still connected:

echo -n "5-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind
modprobe -r labjack
modprobe labjack

This should steal the U12 from the hid driver, but the downside is that once you disconnect and you reconnect your U12 the HID driver will claim it and you will need to run the commands again.

#12 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 29 April 2009 - 10:55 AM

OK, for all my fellow Fedora people (kernels 8 and beyond)... Labjack works with Fedora, no need to recompile. 2 days of tinkering with my system and harassing support here, very patient and knowledgeble people, I should state, I got the much awaited for response: ./firmware-revision version: 1.100000 [[email protected] test]# ./list-all Found 1 LabJacks! Info: productID, serialNum, localID, powerList, calMatrix 1, 100056262, 0, 9999, (0 -2 2 -2 0 -4 1 -1 1 -1 2 -2 1 -3 2 -1 0 2 2 1 ) ### THIS IS HOW IT WORKS: 1. compile the labjack driver per linux-labjack tar instructions, remember to remove the config.h line 2. copy the module to where its supposed to live cp labjack.ko /lib/modules/`uname -r`/kernel/drivers/misc depmod -a 3. Plug in LabJack 4. Unbind the U12 from the usbhid by issuing echo -n "5-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind 5. Create the device file (otherwise the system erases this every time you boot) modprobe -r labjack mkdir /dev/usb mknod --mode=a=rw /dev/usb/labjack0 c 180 240 modprobe -r labjack 6. Go test your shiny new labjack!!! this is not complete since I need to write a script to automate this... or maybe labjack guys will but the final deal is there is no need to mess with /etc/modules or such or worse recompiling the kernel ... works this way THANK YOU THANK YOU SUPPORT

#13 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 12 November 2011 - 10:06 AM

Fedora 15, U12 Perl dead? not compiling, not working. I'm able to get this going: [[email protected] examples]# ls analog digitalIO easyFunctions list-all Makefile stream.c analog.c digitalIO.c easyFunctions.c list-all.c stream [[email protected] examples]# ./list-all ListAll found 1 U12s. Device information: Product ID, Serial Number, LocalID, Power Allowance, Calibration Constants 1, 100057782, 0, 0, { 0 -2 1 -2 1 -3 2 -1 1 -1 2 -2 1 -3 2 0 0 2 2 1 } [[email protected] examples]# but no Perl modules working. Python is great, but Perl is the ducktape ))) Please help!

#14 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 14 November 2011 - 12:55 PM

The Perl module is third party, and my knowledge on it isn't that great. I do know it was meant for our old kernel module driver, which has a different installation process, header/source and library names then then new driver we released last week, which you look like you are using. I imagine this is probably the cause of the problem. I would first start by looking at the Makefile.PL and modify this to use the new ljacklm.so library and ljacklm.h/c source code files. I believe this file is the one used to build the module, but I am unsure if other files will need to be modified.

#15 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 24 January 2012 - 01:13 AM

The Perl module is third party, and my knowledge on it isn't that great. I do know it was meant for our old kernel module driver, which has a different installation process, header/source and library names then then new driver we released last week, which you look like you are using. I imagine this is probably the cause of the problem.

I would first start by looking at the Makefile.PL and modify this to use the new ljacklm.so library and ljacklm.h/c source code files. I believe this file is the one used to build the module, but I am unsure if other files will need to be modified.

I'm only able to do this so far on Fedora 16. Should I go ARDUINO? No Perl support!!!
[[email protected] U12]# ./u12AISample
Results of AISample:
AI0 = 1.435547
AI1 = 1.416016
AI2 = 1.440430
AI3 = 1.416016
PGA Overvoltage = 0
IO3 to IO0 States = 0
TimerCounterMask = 0

#16 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 24 January 2012 - 02:28 AM

Why on earth do I need to do all this to get my two U12 going on Fedora 16:??? [root[email protected] labjack]# ls Device-LabJack-0.02 labjack-exodriver-v2.5.0-2-g137b29e.zip labjack-LJFuse-5832683 ljacklm.zip Device-LabJack-0.02.tar.gz labjack-LabJackPython-8-26-2011-15-gb1d93c3.zip labjack-LJFuse-5832683.zip labjack-exodriver-137b29e labjack-LabJackPython-b1d93c3 ljacklm [[email protected] labjack]# cd labjack-exodriver-137b29e/ [[email protected] labjack-exodriver-137b29e]# ls 10-labjack.rules examples INSTALL.Linux INSTALL.MacOSX liblabjackusb README [[email protected] labjack-exodriver-137b29e]# cd examples/ [[email protected] examples]# ls Modbus U12 U3 U6 UE9 [[email protected] examples]# cd U12/ [[email protected] U12]# ls Makefile u12AISample u12AISample.c u12AISample.o [[email protected] U12]# ./u12AISample Results of AISample: AI0 = 1.435547 AI1 = 1.416016 AI2 = 1.445312 AI3 = 1.416016 PGA Overvoltage = 0 IO3 to IO0 States = 0 TimerCounterMask = 0 [[email protected] U12]# Python sucks! make a usable Perl interface, please

#17 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 24 January 2012 - 02:34 PM

We don't have any plans to work on perl support for the current U12 drivers. We are working on a new driver called LJM, and when we release this driver we will work on supporting it in many languages including taking a look at perl. As of now the LJM driver does not support the U12, but we are considering adding at least basic U12 support.

#18 ctodd

ctodd
  • Members
  • 23 posts

Posted 25 January 2012 - 08:03 PM

You can use SWIG to compile a perl module that wraps all the C functions. I've done this for PHP with the old driver, and someone else here posted details for using swig with Java. You'll need to include some data type definitions in the swig config file, so it will take a lot of trial and error.

#19 pashanoid

pashanoid
  • Members
  • 23 posts

Posted 24 September 2012 - 08:15 AM

... ok, that was a bit harsh... I was able to compile the exodriver and ljacklm and then edit the example files to get a binary, which will be read by my scripts...

#20 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 24 September 2012 - 12:40 PM

Sorry we can't help more, but we just don't support Perl for the U12.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users