Hello All,
My driver creates a node in /dev for a serial port.
My driver derived from “IOSerialStreamSync” class, creates a node in /dev for a serial port.
Is that correct for implementing serial port device driver?
What specific information should I publish in the Info.plist file and IORegistery of my driver?
Important thing to notice is:
I am simulating a serial port driver, hance my provider class is "IOResources".
Below is the snippet of my Info.plist.
Is that correct or I have to do something else?
My driver crashes when I call open on "/dev/tty.mynode".
I could trace that when open is invoked in IOSerialBSDClient, it in turn invokes dequeueData() of my driver.
After disassembling the panic log, I found out that I have not
implemented dequeueData() routine in my driver properly and that is why it was crashing.
Can you tell me what exactly I should handle in dequeueData() ? ( I tried modifying the Apple16X50 sample's code into mine, but it still does crash )
Will be glad if you could also give any pointers or mention any documents to refer to understand each of the serial family routines like acquirePort(), enqueueData(), dequeueData() etc...
and what exactly should be handled there.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>SerialDriver</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.addvalue.driver.SerialDriver</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SerialDriver</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict>
<key>SerialDriver</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.addvalue.driver.SerialDriver</string>
<key>IOClass</key>
<string>com_addvalue_driver_SerialDriver</string>
<key>IOKitDebug</key>
<integer>65535</integer>
<key>IOMatchCategory</key>
<string>SerialDriver</string>
<key>IOProbeScore</key>
<integer>900</integer>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOSerialFamily</key>
<string>1.0.4</string>
<key>com.apple.kernel.iokit</key>
<string>1.0.0b1</string>
<key>com.apple.kernel.libkern</key>
<string>6.9.9</string>
<key>com.apple.kernel.mach</key>
<string>1.0.4</string>
</dict>
</dict>
</plist>
Thanks
in advance.
=Pavan.