Osx usb-serial device driver for 3410 and 5052 chipsets



Yüklə 29,73 Kb.
tarix17.01.2019
ölçüsü29,73 Kb.
#99994

OSX USB-Serial device driver for 3410 and 5052 chipsets
This documentation describes content of package, installation and parametrization of TIVCPSerial driver for MacOSX version 10.4 and higher for PPC 32-bit,10.4.4 and higher for Intel 32-bit platform and 10.6 and higher for Intel 64-bit platform.
Package
Package which describes this documentation should contain:
- project file - TIUMPSerial.xcodeproj - project file for XCode IDE version 3.1 and higher. To build for Intel 64-bit platform as well you need to use Xcode IDE version 3.2 and higher which run on Mac OS X 10.6
- dumpbinsh folder - contains script for converting Firmware images (residing in folder FWImages) to compilable source code
- FWImages folder - contains actual Firmware images in *.i51 format. Because of limitation of kernel extension (driver) architecture on MacOSX, firmware must be staticaly compiled into KEXT binary. For recompilation convenience, it is sufficient just to copy new FW images to this folder and recompile driver by opening TIUMPSerial.xcodeproj project in XCode.
- build folder - contains resulting kernel extension/driver (TIVCPSerial.kext) - the TIVCPSerial.kext is actually package folder, so it has folder like hierarchical structure. Make sure you are manipulating with the whole structure.
- SerialPortSample - contain source files for testing application - it is adjusted code from Apple Sample Codes - adapted to enumerate correctly all serial drivers and use /dev/cu.TIVCP3410 device for communication. If you change port name, or you want to test it on 5052 chipset, please change source code appropriately before testing.
- all other folders contain source files important to rebuild the driver
Rebuilding the driver
For rebuilding the driver you must have at least XCode version 3.1 (run on Mac OS X 10.5) and higher installed on your computer for building 32-bit, but for rebuilding full universal binary with 64-bit Intel version for Snow Leopard, you need to use Xcode version 3.2 and higher (run on Mac OS X 10.6) and build on Mac OS X 10.6!
Rebuilding itself can be done by double clicking on TIUMPSerial.xcodeproj project file and rebuild the .kext file. Build process will automatically incorporate both i51 firmware images found in FWImages subfolder.
Resulting driver can be found in build/TIVCPSerial.kext
Installation
1) Copy TIVCPSerial.kext extension into /System/Library/Extensions folder



cd build/

sudo cp -R TIVCPSerial.kext /System/Library/Extensions

sudo touch /System/Library/Extensions
2) Set kext owner to root - it is kext system specification - without it, kext is not recognized by system



sudo chown -R root:wheel /System/Library/Extensions/TIVCPSerial.kext
3) Set kext privileges to 755 - it is kext system specification - without it, kext is not recognized by system



sudo chmod -R 755 /System/Library/Extensions/TIVCPSerial.kext

4) Rebuild internal system kext cache (on Mac OS X 10.4 only)



kextcache -e
5) Reboot computer
After the last step the connected USB-Serial devices should be recognized and driver loaded appropriately, when connected to USB port.
Parametrization
- Change of FW image - for changing the FW image, please put new images to FWImages folder, open TIUMPSerial.xcodeproj project to Apple IDE and recompile TIVCPSerial.kext driver package/folder. The driver MUST be recompiled each time you change Firmware images. It is the limitation of kernel architecture on MacOSX
- Change USB parameters - all changeable parameters for USB infos and port names can be found in Info.plist file stored as TIVCPSerial.kext/Contents/Info.plist, inside of TIUMSerial.kext package. It is XML file editable using regular text editor or using Property List Editor (part of Apple development tools). The part you need to change is stored under IOKitPersonalities dictionary tag in this XML file.

All parameters are encoded as key-value pairs - hopefully self explainable
Here is the explanation for the parameters, its types and function (taken from Info.plist itself):


- generic name for section (type of USB info)

TIVCP3410



- system bundle identifier - should not be changed

CFBundleIdentifier

com.ti.driver.TIVCPSerial

- class name - MUST NOT be changed!!!!

IOClass

TIUMPSerial
- class provider - MUST NOT be changed!!!!

IOProviderClass

IOUSBDevice
- base name for POSIX name of device and also displayable string for user - named port listed in port selection UI

IOTTYBaseName

TIVCP3410
- chipset type - MUST be set to either 3410 or 5052

TIUMPChipset

3410
For correct device discovery and driver matching, the USB triplet info should be set - bcdDevice, Product ID and VendorID. This triplet is described by Apple as minimal recognition info. Please remember if you don't specify all three items - driver may not be matched with your device

- bcdDevice (or device version) o USB device itself

bcdDevice

276
- product id of USB device itself (in decimal)

idProduct

13328
- vendor id of USB device itself (in decimal)

idVendor

1105


Here is the explanation for setting the "merge" device which controls display of "New Network Interface dialog on 10.6 (taken from Info.plist itself):
TIVCP3410Merge



CFBundleIdentifier

com.apple.driver.AppleUSBMergeNub

IOClass

AppleUSBMergeNub

IOProviderClass

IOUSBDevice

IOProviderMergeProperties





- Here if you want to show the dialog put "Prompt" otherwise "None"

New Interface Detected Action

None



- Please change the idProduct and idVendor accordingly to your USB device.

idProduct

13328

idVendor

1105


Testing
For testing the driver you can use either included source code for explaining how to write and manipulate serial communication client, or you can use third party communication applications such as ZTerm shareware by David P. Alverson:
http://homepage.mac.com/dalverson/zterm/
Or goSerial by Andreas Mayer (furrysoft):
http://www.furrysoft.de/?page=goserial
Or Zoc6 by Marcus Schmidt (emtec):
http://www.emtec.com
Also driver writes some internal information - helps for debugging to system.log file. You can view dynamically this file by using /Application/Utilities/Console.app application or by using terminal when using this command:
tail -f /var/log/system.log
it displays dynamically the last couple of lines from current content of system.log where driver writes all debugging information into.
Yüklə 29,73 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin