Here is a dmesg from the macmini, if it helps much. I dont deny that the devices could have a badly implemented HID spec, but then why do they work flawlessly on other systems? and why does it work perfectly if i first plug in a normal USB keyboard, and then the reader? Anyhow, i think if i could figure out what exactly happens when a Normal USB keyboard is plugged in, and then load the same things as soon as i plug in my Reader, i think i will be fine. I assume i can somehow control this behavior via hotplugd, but can anyone tell me how exactly i would pretend to the system that i plugged in a certain usb keyboard?
Thanks, David Travers Buda wrote: > * David Schulz <[EMAIL PROTECTED]> [2008-11-21 17:17:57]: > > >> Hi all, >> >> i have a RFID Proximity Card Reader connected to a Computer via USB. >> Basically how they work is that as soon a RFID Card comes near it, the >> Reader reads the Number on the Card, and sends it to STDIN followed by a >> newline Character. It really works the same as a Magnetic Card Reader, >> Barcode Scanner, standard USB keyboard. >> >> The problem i am having is that the Reader misreads the Number on the >> Card more than often. >> >> For example a swipe should look like: >> 0011920435 >> 0011920435 >> >> but often it does look like: >> 001cr20435 >> 001192\s30435 >> 920435 >> >> I have tried under : >> i386 OpenBSD 4.3 PC >> i386 OpenBSD 4.4 ThinkPad X61 Laptop >> macppc OpenBSD 4.4 Macmini >> macppc OpenBSD 4.4 iMac >> >> All of this with 2 different USB Readers. >> >> Mostly the same results, too many misreads. no matter how slow or fast i >> swipe the Card. Now, one thing that i have noticed is that when i first >> plugin a normal USB Keyboard, AND THEN plug in the USB Reader next to >> it, everything works great. I have tested and repeated this behavior on >> the macppc MacMini. >> >> Trying with a PS/2 Version of the Reader, it works all great, no >> Problems (but there is no ps/2 on the macppc's nor on my Laptop anymore. >> grr.) >> >> I have tried the USB Reader on a Windows XP Machine, and it works like >> it should. First detects it as a USB Keyboard, and then nicely reads any >> card i swipe at it. I also tried it on a Ubuntu Linux Asus Laptop, and >> it works as well. >> >> Now what i want to ask is obviously, does anyone have any idea what i >> could try to do to make my USB Reader work nicely and don't misread all >> the time? Will anyone work with me to make it work, or at least figure >> out why it doesn't? Maybe there is some way i can tune the behaviour of >> attached USB Keyboards, so that they (?) somehow give the Reader more >> time before attempting to read the Card. >> >> Thanks and best regards, >> David >> >> >> > > A dmesg would help. > > In all likelyhood, your hardware is not following the HID spec. [ using 408000 bytes of bsd ELF symbol table ] console out [ATY,RockHopper2_A]console in [keyboard] , using USB using parent ATY,RockHopper2Paren:: memaddr 98000000 size 8000000, : consaddr 9c008000, : ioaddr 90020000, size 20000: memtag 8000, iotag 8000: width 640 linebytes 768 height 480 depth 8 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2008 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 4.4 (GENERIC) #1854: Mon Aug 11 13:32:35 MDT 2008 [EMAIL PROTECTED]:/usr/src/sys/arch/macppc/compile/GENERIC real mem = 536870912 (512MB) avail mem = 509779968 (486MB) mainbus0 at root: model PowerMac10,1 cpu0 at mainbus0: 7447A (Revision 0x102): 1249 MHz: 512KB L2 cache mem0 at mainbus0 spdmem0 at mem0: 512MB DDR SDRAM non-parity PC3200CL3.0 memc0 at mainbus0: uni-n "hw-clock" at memc0 not configured kiic0 at memc0 offset 0xf8001000 iic0 at kiic0 mpcpcibr0 at mainbus0 pci: uni-north, Revision 0xff pci0 at mpcpcibr0 bus 0 pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00 vgafb0 at pci0 dev 16 function 0 "ATI Radeon 9200" rev 0x01, mmio wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation) mpcpcibr1 at mainbus0 pci: uni-north, Revision 0x5 pci1 at mpcpcibr1 bus 0 pchb1 at pci1 dev 11 function 0 "Apple UniNorth PCI" rev 0x00 macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00 openpic0 at macobio0 offset 0x40000: version 0x4614 little endian macgpio0 at macobio0 offset 0x50 "modem-reset" at macgpio0 offset 0x1d not configured "modem-power" at macgpio0 offset 0x1c not configured macgpio1 at macgpio0 offset 0x9 irq 47 "programmer-switch" at macgpio0 offset 0x11 not configured "gpio5" at macgpio0 offset 0x6f not configured "gpio6" at macgpio0 offset 0x70 not configured "extint-gpio15" at macgpio0 offset 0x67 not configured "escc-legacy" at macobio0 offset 0x12000 not configured zsc0 at macobio0 offset 0x13000: irq 22,23 zstty0 at zsc0 channel 0 zstty1 at zsc0 channel 1 aoa0 at macobio0 offset 0x10000: irq 30,1,2 audio0 at aoa0 "timer" at macobio0 offset 0x15000 not configured adb0 at macobio0 offset 0x16000 irq 25: via-pmu, 0 targets apm0 at adb0: battery flags 0x0, 0% charged piic0 at adb0 iic1 at piic0 maxtmp0 at iic1 addr 0xc8: max6642 kiic1 at macobio0 offset 0x18000 iic2 at kiic1 wdc0 at macobio0 offset 0x20000 irq 24: DMA ohci0 at pci1 dev 24 function 0 "Apple Intrepid USB" rev 0x00: irq 0, version 1.0, legacy support ohci1 at pci1 dev 25 function 0 "Apple Intrepid USB" rev 0x00: irq 0, version 1.0, legacy support ohci2 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq 29, version 1.0, legacy support ohci3 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0 ohci4 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0 ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "NEC EHCI root hub" rev 2.00/1.00 addr 1 usb1 at ohci0: USB revision 1.0 uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1 usb2 at ohci1: USB revision 1.0 uhub2 at usb2 "Apple OHCI root hub" rev 1.00/1.00 addr 1 usb3 at ohci2: USB revision 1.0 uhub3 at usb3 "Apple OHCI root hub" rev 1.00/1.00 addr 1 usb4 at ohci3: USB revision 1.0 uhub4 at usb4 "NEC OHCI root hub" rev 1.00/1.00 addr 1 usb5 at ohci4: USB revision 1.0 uhub5 at usb5 "NEC OHCI root hub" rev 1.00/1.00 addr 1 mpcpcibr2 at mainbus0 pci: uni-north, Revision 0x6 pci2 at mpcpcibr2 bus 0 pchb2 at pci2 dev 11 function 0 "Apple UniNorth PCI" rev 0x00 kauaiata0 at pci2 dev 13 function 0 "Apple Intrepid ATA" rev 0x00 wdc1 at kauaiata0 irq 39: DMA wd0 at wdc1 channel 0 drive 0: <ST940110A> wd0: 16-sector PIO, LBA48, 38154MB, 78140160 sectors atapiscsi0 at wdc1 channel 0 drive 1 scsibus0 at atapiscsi0: 2 targets, initiator 7 cd0 at scsibus0 targ 0 lun 0: <MATSHITA, CD-RW CW-8123, CAD4> ATAPI 5/cdrom removable wd0(wdc1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 cd0(wdc1:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 "Apple UniNorth Firewire" rev 0x81 at pci2 dev 14 function 0 not configured gem0 at pci2 dev 15 function 0 "Apple Uni-N2 GMAC" rev 0x80: irq 41, address 00:0d:93:4d:52:5e bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4 uhidev0 at uhub4 port 1 configuration 1 interface 0 "vendor 0x04d9 product 0x1400" rev 1.10/1.43 addr 2 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 modifier keys, 6 key codes wskbd0 at ukbd0: console keyboard, using wsdisplay0 uhidev1 at uhub4 port 1 configuration 1 interface 1 "vendor 0x04d9 product 0x1400" rev 1.10/1.43 addr 2 uhidev1: iclass 3/1, 3 report ids ums0 at uhidev1 reportid 1: 5 buttons, Z dir wsmouse0 at ums0 mux 0 uhid0 at uhidev1 reportid 2: input=3, output=0, feature=0 uhid1 at uhidev1 reportid 3: input=1, output=0, feature=0 uhidev2 at uhub5 port 1 configuration 1 interface 0 "vendor 0x0e6a HID Keyboard Device" rev 1.10/0.07 addr 2 uhidev2: iclass 3/1 ukbd1 at uhidev2: 8 modifier keys, 6 key codes wskbd1 at ukbd1 mux 1 wskbd1: connecting to wsdisplay0 uhidev3 at uhub5 port 1 configuration 1 interface 1 "vendor 0x0e6a HID Keyboard Device" rev 1.10/0.07 addr 2 uhidev3: iclass 3/0, 2 report ids uhid2 at uhidev3 reportid 1: input=2, output=0, feature=0 uhid3 at uhidev3 reportid 2: input=1, output=0, feature=0 aoa_set_volume() not supported yet softraid0 at root bootpath: /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]:/bsd root on wd0a swap on wd0b dump on wd0b