• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where to start for writing a PC card modem driver?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where to start for writing a PC card modem driver?


  • Subject: Re: Where to start for writing a PC card modem driver?
  • From: Quinn <email@hidden>
  • Date: Wed, 30 Apr 2003 10:33:14 +0100

At 17:02 -0700 29/4/03, Dave Camp wrote:
I'm looking at writing a driver for a new PCCard CDMA modem, but I'm having a hard time figuring out what pieces of code I should be looking at as a starting point.

Apparently there are several PCCard cell modems that work without additional drivers for OS X, but I cannot seem to find the source in Darwin that might implement this. Is that source available and I'm just missing it?

If you go to the Darwin source page

<http://www.opensource.apple.com/darwinsource/10.2.5/index.html>

and download the module "Apple16X50Serial", you'll find the source to our driver.

btw This was pretty easy to find given my setup. When a new release of Darwin becomes available, I download and uncompress all of the source, and then create a compressed disk image of the the entire thing. Then, when I'm looking for a concept, I can search that disk image quickly, either with the Finder's search box (if I'm looking for a file name), or with BBEdit (if I know roughly where to look and I want to search the contents of the files). In this case, a Finder search for "PCCard" quickly revealed the right place to look.

If not, can someone point me in the right direction? At a high level, is this a matter of subclassing the IOPCCard16 stuff and advertising some sort of serial nub?

Ah um, I think you have your terminology backwards. When you write a I/O Kit driver, you match on your provide type (IOPCCard16Device), you inherit from the type of host controller interface your hardware represents (in your case, there's no standard serial host controller interface, so you inherit from IOService), and you publish nubs that inherit from the type of service you want to provide (in this case IORS232SerialStreamSync).

As another example, an ATA PCCard would use IOPCCard16Device as its provider, inherit from IOATAController for common ATA-controller functionality, and publish nubs of type ATADeviceNub. Indeed, this is roughly how how PCCard ATA driver works (although, alas, ApplePCCardATA is not in Darwin).

Our PCCard serial code works along the same lines. The class that matches on the PCCard nub, Apple16X50PCCard, is actually a subclass of Apple16X50BusInterface. Apple16X50BusInterface is an abstract super class that provides inherited functionality common to all the buses supported by our UART code (PCCard and PCI). For example, when Apple16X50PCCard wants to publish nubs for each UART found on the device, it calls its inherited Apple16X50BusInterface::probeUART method. This creates an instances of the Apple16X50UARTSync nub class; this nub is actually a subclass of IORS232SerialStreamSync, which is how serial clients match against it.

Anyway, check out the source and it should all be clear (-:

Is there another list I should be asking these questions on?

Seeing as this is all I/O Kit stuff with only limited connection to networking (sure, you can run PPP over serial, but that's pretty tenuous), your list of choice should be darwin-drivers.

<http://www.lists.apple.com/darwin-drivers>

I'm not on that list but there are lots of other folks over there who are willing to help out (indeed, many who are much more knowledgeable about I/O Kit than I am).

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Where to start for writing a PC card modem driver? (From: Dave Camp <email@hidden>)

  • Prev by Date: Re: URLAccess kURLDisplayProgressFlag issue
  • Next by Date: Re: Forcing PAP on OSX
  • Previous by thread: Where to start for writing a PC card modem driver?
  • Next by thread: SMB share re-naming?
  • Index(es):
    • Date
    • Thread