Page 1 of 1

need help with USB and interrupts

Posted: Thu Oct 17, 2002 8:03 pm
by Paul
Hey everyone. I am getting so frustrated. First of all, I can't seem to find any resources out there that demonstrate how to access USB ports. Let's say I want to read input from a USB mouse. (Actually, I need to
do that.) How can I detect if a USB mouse is attached, and if it is, how to get read it? Do you get 3-byte
packets of data just like with a PS/2 mouse? Hopefully it is that easy.

Also, I am yet to be successful in re-enabling interrupts and calling my own interrupts. I have set up an IDT table and I get a GFP (int 13) whenever I try to issue my own interrupt call. I was trying int 40h and I set up the 64th entry (40h) in my IDT to point to my ISR. Any ideas? Hopefully a VERY SIMPLE code snippit?

While I'm already racking your brains, does anyone know if there is one big set of raw packet driver code out there? I want to be able detect the NIC card
on just about ANY computer by having all of the common packet drivers and automatically hook it onto an interrupt and have my TCPIP stack set up so that I can access the Internet.

Thank you very much for your help!
Paul

Re:need help with USB and interrupts

Posted: Thu Oct 17, 2002 8:41 pm
by .bdjames

Re:need help with USB and interrupts

Posted: Thu Oct 17, 2002 10:05 pm
by Paul
Thanks for the USB info.

My biggest problem is with interrupts though. I have
remapped the PIC and loaded my IDT but if I re-enable
IRQ's, the system crashes. AND even if i don't re-enable
IRQ's, i still cannot call one of my own ISR's -- that will
also make the computer crash. It's really frustrating.
I've been at it for days. Any ideas?

Re:need help with USB and interrupts

Posted: Fri Oct 18, 2002 6:05 am
by Tim
Paul wrote:How can I detect if a USB mouse is attached, and if it is, how to get read it?
Short answer: you don't.
Long answer: set aside a few months to write USB and HID protocol stacks. Good luck.
Do you get 3-byte packets of data just like with a PS/2 mouse?
No.
Hopefully it is that easy.
It's not.

Re:need help with USB and interrupts

Posted: Fri Oct 18, 2002 6:18 am
by Whatever5k
Hehe, I like those kind of answers, Tim ;)
Short and precisely ;)