Linux: K8055 flooding /var/log/messages

Hi,
I’m running a K8055 board under Linux with http://libk8055.sourceforge.net/
SO far everything is working but my /var/log/messages gets flooded with such entries

[16687.000284] usb 1-1.1: usbfs: interface 0 claimed by usbfs while 'k8055' sets config #1

A batch file is polling the status of the K8055 every 0.2 secs and with every poll a new entry like above appears, unfortunately the CPU usage jumps to > 95%

Any idea how to fix this? (system is Ubuntu Karmic)

THX in advance

Hi,

I think you need to define a rule (for USB). If you have a file called ‘velleman.rules’, under ‘k8055/lib/src/’,
you should copy this file into ‘/etc/udev/rules.d’ directory.

-m-g-

@forensix
Thank you for this tip, I have added the rules file allready to /etc/udev/rules.d

Unfortunately: no luck - problem persists
Do you use a K8055 under Ubuntu karmic?

kind regards

Just for the records:
I have tried and connected a different (second) k8055 card to a different PC, Ubuntu Karmic, kernel 2.6.31-20-generic 386 , installed libusb-dev, compiled, installed,

sudo ldconfig
copied velleman.rules to /etc/udev/rules.d

Problem persists
every time the k8055 command is called, one entry in /var/log/messages shows: usb 2-2: usbfs: interface 0 claimed by usbfs while ‘k8055’ sets config #1

Still no idea how to fix this.

Hello,

The udev rules published with libk8055 doesn’t work under versions greater than Ubuntu 9. I’ve made new rules and a simpler procedure on my blog. You will also find code examples soon.

david.meziere.eu/wiki/systeme/k8055

David.

I have this problem also. I have now moved from Ubuntu 9.04 to 10.04 and now to Debian squeeze 6.0 and see exactly the same in the syslog every time I make a call to k8055 from my C or PHP code. The message is:-

“kernel: usb 1-1: usbfs: interface 0 claimed by usbfs while ‘k8055’ sets config #1

I have followed the instructions in the forum and installed the rules as per the blog but with no effect. What can be the cause of this?

Thanks
kayjay

Hello,

That’s the message we get before implementing the rules.

I assume you restarted udev, or even rebooted, after saving the rules ? It should work by just unpluggin / replugin, but who knows …

The k8055 should be claimed by hid, not usbfs. I could ask you to do an lsusb to see which usb number it got, but it changes at each pluging.

Maybe it is a software version problem. But there is to few information here to debug.

Did you first try the board under windows, with the provided software ?

Can you give more information by running, without unpluging the board an ls -d 10cf: ; then lsusb -t; then looking in the logs ?

David.

Please also run an apt-cache show udev :slight_smile:

The board is working perfectly and running 24x7 the only issue is the flooding of the log.

lspci
Bus 001 Device 002: ID 10cf:5500 Velleman Components, Inc. 8055 Experiment Interface Board (address=0)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub[/color]

lsusb -d 10cf:
Bus 001 Device 002: ID 10cf:5500 Velleman Components, Inc. 8055 Experiment Interface Board (address=0)

lsusb -t
1-1:1.0: No such file or directory
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M
|__ Port 1: Dev 2, If 0, Class=HID, Driver=, 1.5M

no entry appear in sylog

whenever I run k8055 I get
Sep 21 11:07:07 sheeva kernel: usb 1-1: usbfs: interface 0 claimed by usbfs while ‘k8055’ sets config #1

/etc/udev/rules.d/75-velleman-k8055.rules
SUBSYSTEM==“usb*”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“5500”, SYMLINK+=“k8055_0”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“5501”, SYMLINK+=“k8055_1”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“5502”, SYMLINK+=“k8055_2”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“5503”, SYMLINK+=“k8055_3”, MODE=“0660”, GROUP=“k8055”

Is this any help

Okay ! I thought it didn’t worked at all.

I must admit i didn’t had a look at the logs while everything was working fine :stuck_out_tongue:

Now that i do, i see the rule don’t prevent the board from flooding the logs.

I found this thread as I am having an identical problem. However I have successfully changed the permissions which I deduce because I can successfully control the board from a non super user (ie a user belonging to group k8055 as I have configured it). I have also rebooted, probably unnecessarily since the permissions clearly work.

I still get this error whenever I issue commands to the board. Worse, the board has to share a usb connection with two external disk drives via a usb hub. Althouth the commands to the board work, many of them cause the usb drives to be dismounted due to the error.

Dec 21 16:48:06 Gonzalez kernel: [18413.444509] usb 2-4.1.4: usbfs: interface 0 claimed by usbfs while 'k8055' sets config #1 Dec 21 16:48:06 Gonzalez kernel: [18413.459723] usb 2-4: USB disconnect, device number 40 Dec 21 16:48:06 Gonzalez kernel: [18413.459726] usb 2-4.1: USB disconnect, device number 41 Dec 21 16:48:06 Gonzalez kernel: [18413.459729] usb 2-4.1.1: USB disconnect, device number 42 Dec 21 16:48:06 Gonzalez kernel: [18413.465799] usb 2-4.1.2: USB disconnect, device number 43 Dec 21 16:48:06 Gonzalez kernel: [18413.467093] usb 2-4.1.4: USB disconnect, device number 44

I realise this is using the open source driver k8055, and is on Ubuntu 12.04 - but my question really is generic : what is this error. what does it mean and where should I look to fix it, assuming I have successfully followed the above instructions, which I believe I have.

Other potential useful information listed below.

lsusb -t

/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M |__ Port 1: Dev 2, If 1, Class=HID, Driver=usbhid, 1.5M /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 12M |__ Port 1: Dev 2, If 1, Class=HID, Driver=usbhid, 12M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M |__ Port 4: Dev 45, If 0, Class=hub, Driver=hub/4p, 480M |__ Port 1: Dev 46, If 0, Class=hub, Driver=hub/4p, 480M |__ Port 1: Dev 47, If 0, Class=stor., Driver=usb-storage, 480M |__ Port 2: Dev 48, If 0, Class=stor., Driver=usb-storage, 480M |__ Port 4: Dev 49, If 0, Class=HID, Driver=usbhid, 1.5M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M

apt-cache show udev

[code]Package: udev
Priority: required
Section: admin
Installed-Size: 995
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Architecture: amd64
Version: 175-0ubuntu9.2
Depends: libacl1 (>= 2.2.51-5), libc6 (>= 2.10), libglib2.0-0 (>= 2.16.0), libselinux1 (>= 1.32), upstart-job, libudev0 (>= 175), module-init-tools (>= 3.2.1-0ubuntu3), initramfs-tools (>= 0.92bubuntu63), procps, adduser, util-linux (>> 2.15~rc2), upstart (>= 1.4-0ubuntu6)
Suggests: watershed
Filename: pool/main/u/udev/udev_175-0ubuntu9.2_amd64.deb
Size: 322900
MD5sum: 4f0f2518584f54cc5e0a4078b443a388
SHA1: d2de44b83c8468406b4c75ff5cc42018aac4d0c1
SHA256: 4677c56131d3dc79a98a8d9501378e34c80aa813690a6cb24dadd6fcfae0883b
Description-en: rule-based device node and kernel event manager
udev is a collection of tools and a daemon to manage events received from
the kernel and deal with them in user-space. Primarily this involves
creating and removing device nodes in /dev when hardware is discovered or
removed from the system.
.
Events are received via kernel netlink messaged and processed according to
rules in /etc/udev/rules.d and /lib/udev/rules.d, altering the name of the
device node, creating additional symlinks or calling other tools and programs
including those to load kernel modules and initialise the device.
Multi-Arch: foreign
Homepage: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Description-md5: 2a0ce683ea15310e7ba291148124cb1e
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal

Package: udev
Priority: required
Section: admin
Installed-Size: 995
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Architecture: amd64
Version: 175-0ubuntu9
Depends: libacl1 (>= 2.2.51-5), libc6 (>= 2.10), libglib2.0-0 (>= 2.16.0), libselinux1 (>= 1.32), upstart-job, libudev0 (>= 175), module-init-tools (>= 3.2.1-0ubuntu3), initramfs-tools (>= 0.92bubuntu63), procps, adduser, util-linux (>> 2.15~rc2), upstart (>= 1.4-0ubuntu6)
Suggests: watershed
Filename: pool/main/u/udev/udev_175-0ubuntu9_amd64.deb
Size: 324936
MD5sum: 12221359248f7fc4a4cb6b5381506add
SHA1: 94948373d9ca6610c77150049b5e20596c8fa72f
SHA256: 67664c8bac8150e9f43132840bb3af7e365a67d2b9a3de350e1eb12e69dbf5b1
Description-en: rule-based device node and kernel event manager
udev is a collection of tools and a daemon to manage events received from
the kernel and deal with them in user-space. Primarily this involves
creating and removing device nodes in /dev when hardware is discovered or
removed from the system.
.
Events are received via kernel netlink messaged and processed according to
rules in /etc/udev/rules.d and /lib/udev/rules.d, altering the name of the
device node, creating additional symlinks or calling other tools and programs
including those to load kernel modules and initialise the device.
Multi-Arch: foreign
Homepage: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Description-md5: 2a0ce683ea15310e7ba291148124cb1e
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal
[/code]

rules :

SUBSYSTEM=="usb", ATTR{idVendor}=="10cf", ATTR{idProduct}=="5500", MODE="0666", GROUP="k8055" SUBSYSTEM=="usb", ATTR{idVendor}=="10cf", ATTR{idProduct}=="5501", MODE="0666", GROUP="k8055" SUBSYSTEM=="usb", ATTR{idVendor}=="10cf", ATTR{idProduct}=="5502", MODE="0666", GROUP="k8055" SUBSYSTEM=="usb", ATTR{idVendor}=="10cf", ATTR{idProduct}=="5503", MODE="0666", GROUP="k8055"

Hello,

Here is the rules version i use :

# velleman.rules a udev rules file for velleman K8055/VM110.
# Put this file in /etc/udev/rules.d
#
# To access the devices under a regular user account, you must
# be in the k8055 group. 
#
# You can add a RUN="..." attribute to run some arbitrary script
# when the device is plugged in.
 
SUBSYSTEM=="usb*", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5500", SYMLINK+="k8055_0", MODE="0660", GROUP="k8055"
SUBSYSTEM=="usb*", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5501", SYMLINK+="k8055_1", MODE="0660", GROUP="k8055"
SUBSYSTEM=="usb*", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5502", SYMLINK+="k8055_2", MODE="0660", GROUP="k8055"
SUBSYSTEM=="usb*", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5503", SYMLINK+="k8055_3", MODE="0660", GROUP="k8055"

I have made a todo, if you can read french (google translate on the upper right corner, else). It has been tested under Ubuntu 10, 11, 12 and Raspian, a Raspberry Pi Debian :
david.meziere.eu/wiki/systeme/k8055

Time passing, i don’t remember about the logs being flooded. I should check again.

Hoping it helps,

Hello, and thanks for your reply moonchild!

Unfortunatley as you will see from the information in my post above, the configuration you suggest is what I am already using. As mentioned in my post, I think my permissions are working Ok and this is not the problem.

The rules are not the same. (writen from my phone)

Ah, yes OK technically you are correct, but in practical terms they perform the same functions.

But to elimenate any doubt over that statement, Ive updated my config as follows, rebooted and observed that I can still control the board without SU, still get the “interface 0 claimed by usbfs” error and still have other usb disk drives unmounted when it happens. Unfortunately I dont think permissions are the issue here … especially given our rules are now identical in all respects!

[quote]SUBSYSTEM==“usb*”, ATTR{idVendor}==“10cf”, ATTR{idProduct}==“5500”, SYMLINK+=“k8055_0”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTR{idVendor}==“10cf”, ATTR{idProduct}==“5501”, SYMLINK+=“k8055_1”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTR{idVendor}==“10cf”, ATTR{idProduct}==“5502”, SYMLINK+=“k8055_2”, MODE=“0660”, GROUP=“k8055”
SUBSYSTEM==“usb*”, ATTR{idVendor}==“10cf”, ATTR{idProduct}==“5503”, SYMLINK+=“k8055_3”, MODE=“0660”, GROUP=“k8055”[/quote]

bump … is anyone able to help diagnose this problem please?

I have also noticed that the board digital status always returns zero (ie no digital ports set), even when they are correctly set.

Im really at a bit of a loss to know what is going on here…