At 11:59 PM +0100 10/31/03, Sebestyin Gabor wrote:
Hi!
I'm absolutelly new to write USB drivers, please help me how to start.
I want to write driver a USB to Serial (RS232)
converter. I have the Linux source.
But haven't got the point where to start. I know
it is a USB based driver (IOUSBDevice?) and at
the same time it is a UNIX char device (
/dev/tty.myport ). How can I connect these two
"parts" together? May I separate them into two
ones: a kernel part which handles USB device and
a user part which handles the communication to
the UNIX dev point.
Sebastien,
In response to your question, the first question
to ask is, what happens if you attach the device
to the USB port. Apple provides a USB Serial Comm
Device Class driver which matches to USB CDC
Devices using the Abstract Control Model, Hayes
AT Command set. Once you connect the USB modem,
open the Network Control Panel to see if it
reports the detection of a new network port. If
the port is recognized, then you should be able
to see the device in /dev/.
If the modem is not recognized, then there would
be the requirement to implement a kernel
extension to support the device. Since you
indicate that you are new to driver programming
under OS X, you face an interesting challenge.
Being new, you will need to learn the concepts of
IOKit kernel extension programming. Take a look
at the tutorials provided by Tech Pubs on the
"Device Drivers Documentation" web page
<http://developer.apple.com/documentation/DeviceDrivers/DeviceDrivers.html>
Specifically, I refer you to
IOKit Fundamentals
Writing an IOKit Device Driver
Hello IOKit: Creating a Device Driver with Project Builder.
Something to consider - you want to consider the
target OS X release for your driver. If you want
to develop a driver for Mac OS X 10.1.x, you're
going to need a system with Mac OS X 10.1.5 with
the appropriate Developer Tools. A USB kext
driver developed for 10.1.x should work with
newer releases of OS X. Refer to the USB Tools
page for more information.
<http://developer.apple.com/hardware/usb/usbtools.htm>
In the IOUSBFamily source are the source files
for the Apple USB CDC class driver. The sources
are not for the faint of heart, but they are
complete.
If your device follows the CDC Abstract Control
Model Spec and uses the Hayes Command set, but
the class and subclass values for the device are
vendor specific, it may be that a codeless kext
can be used to match to your device, but point to
the Apple CDC driver. this is speculation as I
don't have any other info about your device.
best wishes.
--
Sincerely,
Rich Kubota
email@hidden
(408) 974-6212
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.