Page 1 of 1

Help w/understanding USB using Atmel controllers

Posted: Wed Apr 04, 2007 11:09 pm
by Gamble13
Plz, dont pun me for misunderstanding, but I am totally new to USB and to driver programming.
Could u please answer a few questions:

1)What kind of software does Automator represent? Does it include a kernel-driver or it barely uses standard HID-driver?

2)Is there a relatively simple way to adapt this driver for Atmel 89C5131A controller I am currently using?

I just need to create a programmable radio-controlled car, which is controlled via PC through USB connection and that also uses a written kernel-mode driver. I thought this work could help me a bit, right???

Posted: Thu Apr 05, 2007 9:03 pm
by christian
It uses the standard HID driver on the host side. No kernel level driver is required.

There is no (easy) way to port it to 89Cxxx controllers since these have a different instruction set.

=) Another question

Posted: Wed Apr 11, 2007 3:28 pm
by Gamble13
Ah, figured it out.

Ok, another question.

I am currently using the standard Atmel HID device firmware. Since their DLL called AtUsbHid.DLL hasn't got any sources available, I'd like to ask you:

Is it actually possible to use LIBUSB sources to write a mini-driver in kernel mode similar to Atmel's DLL one? That would be a perfect solution since the kernel-mode restriction is essential in my work. (I need the sources of a driver of kernel mode, and it is the main restriction)

Thanks in advance, cheers.

Thanks to OBDEV!

Posted: Wed Apr 11, 2007 3:34 pm
by christian
I don't know Atmel's HID example and therefore don't know what the DLL is supposed to do. However, I do know that a kernel DLL is not required to communicated with an HID. The DLL might just be a user space library which builds an abstraction around the operating system's USB calls, similar to the library which ships with our "Automator" project.

LibUSB is built for "custom class" devices, not for HIDs. You CAN use it with HIDs on Unix, though. Why is it essential for your work that you have a kernel module? Most people are happy if they get away without working in the kernel...

Posted: Wed Apr 11, 2007 3:50 pm
by Gamble13
Well, you know, its just that my course in university is entitled "System Programming", and the most major requirement is to produce a kernel-mode driver =)

So I thought I can use LIBUSB-Win32 to create a kernel-mode driver. What's the problem with making it work with a HID device?

Posted: Wed Apr 11, 2007 3:59 pm
by christian
That's a point :-)

Libusb-win32 is a generic, ready-made kernel level driver. It's built to attach to any device and send/receive messages to/from it.

The problem with an HID is that the operating system's driver already matches the device. You can probably override that matching if libusb-win32 matches on a device-ID level instead of the class level. But there would still be no need to modify libusb-win32.