OSDev.org https://forum.osdev.org/ |
|
USB HID command https://forum.osdev.org/viewtopic.php?f=1&t=26264 |
Page 1 of 1 |
Author: | pikasoo [ Wed Jan 30, 2013 2:29 pm ] |
Post subject: | USB HID command |
Hi, i been messing with the HID on usb and i tryed lot of way to switch the device (mouse or keyboard) to report protocol or to simply set the idle to something else than 0 butit always fail... the device stop responding by alot of way i mean various config of the packet. what i do is to send on the config pipe the fallowing command: Set_Idle: dw 0x0a21,0x0200,0x0001, 0x0000 i tryed to switch the data, changed them to diferent value used 00 instead of 21(the usb hid pdf suggest 0x21 but some source i found use 00) i am wondering if any of you could give me some hint on the way it should be done. currently mouse and kb work in boot protocol but it's not very accurate (click or key doesnt always get reported or are reported only on raise wich make the report containing 0 instead of the key value) note that bochs will always report a result on poll when my test pc awnser with a nack if there is no change thx |
Author: | TomT [ Thu Jan 31, 2013 11:53 am ] |
Post subject: | Re: USB HID command |
Here is part of my usb mouse init sequence. MouseSetProtocol switches from boot to report. ;returns 18 bytes at 0x5500 call MouseGetDeviceDescriptor ;read just the configuration descriptor to get MOUSEWTOTALLENGTH mov edx,9 call MouseGetConfigDescriptor ;now we get the Config+Interface+HID+Endpoint Descriptors all in 1 shot xor edx,edx mov dx,[MOUSEWTOTALLENGTH] call MouseGetConfigDescriptor call MouseGetReportDescriptor call MouseSetAddress call MouseSetProtocol call MouseSetIdle call MouseSetConfiguration ;ready to conduct usb mouse interrupt IN transactions ;see /usb/interrupt.s TomT http://code.google.com/p/tatos/ |
Author: | pikasoo [ Thu Jan 31, 2013 6:16 pm ] |
Post subject: | Re: USB HID command |
thx for the tips, i found part of my problem... i forgot to set the TD procesing order (breadth/depth first) wich was creating bug sometime. now i can switch to Report protocol but still that damn mouse doesnt report everything... the "raise" event doesnt get send. i tryed the way you do it but no change ex: for button1 instead of getting the pushed and raised action i get only the pushed one the raw data i get is this: 01 00 00 00 01 00 00 00 01 00 00 00 this is what i get for 3 click it would be convenient to get a 00 00 00 00 between them to know when the button got raised |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |