Hello:

 I am trying to get a hid measurement device to work on linux and have
encountered some problems which are either bugs or features of hid that I
need
help in debugging.

 First of all I started with Fedora core 3 and Scott Hiles's plusb_xcvr.c
driver which has hid code for writing and reading 8 byte commands. Some
background information.

 kernel = 2.6.9-1.667smp

 /prov/bud/usb/devices =

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=09db ProdID=0076 Rev= 1.00
S:  Manufacturer=MCC
S:  Product=PMD-1024LS
S:  SerialNumber=00004881
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
E:  Ad=01(O) Atr=03(Int.) MxPS=   8 Ivl=10ms

after connecting the device.

The problems:

 when connecting /var/log/messages reports

kernel: usb 1-2: new low speed USB device using address 4
drivers/usb/input/hid-core.c: timeout initializing reports

However the device /dev/hiddev0 is created and using Scotts code I can write
8 byte commands to it and see that they are being executed by the device
with the following exceptions.

  1. writing data = to 0x00 - 0x7f works fine but 0x80 -0xff causes the the
device to think it is receiving 0x7f. I have verified that usage_ref.value
has the correct value just before the ioctl call so this value is somehow
being changed in the driver. I tried turning on debugging but no useful
output messages were generated.

  2. Read event seem to only be generated by the drive if the read data
changes value. Since the device returns data even though the data has not
changed and my usb sniffer on XP verifies this fact this seems to be an
unwarranted feature of the linux hid driver.

  3. the command
  if (ioctl(fd, HIDIOCINITREPORT,0) < 0) {
    goto error;
  }
in Scots init routine causes the following syslog message:

kernel: drivers/usb/input/hid-core.c: timeout initializing reports

This may be related to the message that occurs on plugging the device in
but eliminating the ioctl call does not seem to have any positive or
negative effect on the operation described above.


I next tried to run the device on Fedora core 4

ie 2.6.11-1.1369_FC4smp

when I do that I get the following syslog message on plugin:

kernel: usb 1-2: new low speed USB device using uhci_hcd and address 4
usbhid: probe of 1-2:1.0 failed with error -5
kernel: usbhid: probe of 1-2:1.0 failed with error -5

/dev/hiddev0 does not get generated and thus nothing works. I tried fiddling
with the hotplug tables to no avail and the comments in hotplug in any
case do not give one a warm felling that hid htplug works.

not on FC4 the devices file is:

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  4 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=09db ProdID=0076 Rev= 1.00
S:  Manufacturer=MCC
S:  Product=PMD-1024LS
S:  SerialNumber=00004876
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
E:  Ad=01(O) Atr=03(Int.) MxPS=   8 Ivl=10ms

note: driver has not been assigned.

Any help in resolving these problems will be appreciated like were and in
what code I can place syslog messages etc. I appears that in both these
kernels the hid code is built in when I tried to make it a module I got
lots of undefined symbol messages.

   Bob.







-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to