Title: Migrating to Delcom USB HID Chip Set (Generation 2) from the Delcom USB custom driver Chip Set (Generation 1).

Similar documents
DelcomX USB HID ActiveX Control Datasheet

AN1814 APPLICATION NOTE

XDI Requirements and Use Cases

& WizChan. Driver Documentation

DYNAMIC ENGINEERING 150 DuBois St Suite 3, Santa Cruz CA Fax Est.

DYNAMIC ENGINEERING 150 DuBois, Suite C, Santa Cruz, CA Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA (831) Fax (831) Est.

Network Working Group. November Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

OpenOffice Specification Sample

Position Paper: Facets for Content Components

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

Human Interface Devices: Host Application

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est

Request for Comments: 2711 Category: Standards Track BBN October 1999

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

OASIS - Artifact naming guidelines

Category: Standards Track September 2003

Multi-Server Based Namespace Data Management of Resource Namespace Service

Updates: 2710 September 2003 Category: Standards Track. Source Address Selection for the Multicast Listener Discovery (MLD) Protocol

Network Working Group. Category: Standards Track <draft-aboba-radius-iana-03.txt> 30 March 2003 Updates: RFC IANA Considerations for RADIUS

Network Working Group. Category: Standards Track September 2003

Use and Interpretation of HTTP Version Numbers

Deployment Profile Template Version 1.0 for WS-Reliability 1.1

Network Working Group Request for Comments: Category: Best Current Practice January 2004

Network Working Group. Category: Standards Track February SIEVE Filtering: Spamtest and VirusTest Extensions

GENOVATION. Application Note: MiniTerm USB Low-Level Programming

IETF TRUST. Legal Provisions Relating to IETF Documents. Approved November 6, Effective Date: November 10, 2008

Network Working Group Request for Comments: 3397 Category: Standards Track Apple Computer, Inc. November 2002

SWOP Specifications for Web Offset Publications Edition 10.0 Errata

Metadata for SAML 1.0 Web Browser Profiles

STD_CU43USBSW_V1.0E. CUnet (MKY43) USB Unit. CU-43USB Software Manual

Expires: February 25, 2004 August 27, Using the NETCONF Configuration Protocol over Secure Shell (SSH) draft-wasserman-netconf-over-ssh-00.

Network Working Group. Category: Informational January Unused Dynamic Host Configuration Protocol (DHCP) Option Codes

Updates: 2535 November 2003 Category: Standards Track

Michel Drescher, FLE, Ltd. Standardised Namespaces for XML in GGF (draft 09) N/A

Request for Comments: 2493 Category: Standards Track January 1999

ECMA-405. Data Interchange on Parallel Write/Read Disk Format for 5 Optical Disks. 1 st Edition / December Reference number ECMA-123:2009

draft-aoun-mgcp-nat-package-02.txt

Category: Standards Track December 2003

OASIS Specification Document Template Usage

Example set of DFDL 1.0 properties

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA Fax Est.

J. Basney, NCSA Category: Experimental October 10, MyProxy Protocol

Configuration Description, Deployment and Lifecycle Management Working Group (CDDLM-WG) Final Report

Example set of DFDL 1.0 properties

{Describe the status and stability of the specification here.}

SSTC Response to Security Analysis of the SAML Single Sign-on Browser/Artifact Profile

Abstract Code-Signing Profile of the OASIS Digital Signature Services

Request for Comments: 3578 Category: Standards Track dynamicsoft J. Peterson NeuStar L. Ong Ciena August 2003

Authentication, Authorization and Accounting Requirements for the Session Initiation Protocol

IO-Warrior Dynamic Library V1.5 for Windows

Hierarchical Resources: Non-XML Resource Use Case

Test Assertions for the SCA Web Service Binding Version 1.1 Specification

IETF TRUST. Legal Provisions Relating to IETF Documents. February 12, Effective Date: February 15, 2009

USB-IO MATLAB. Gerox(c) 5/30/2003 USB-IO HID USB-IO HID USB IO. usbg.dll STEP.1 DOS. main STEP.2. STEP.3 main.

Open Cloud Computing Interface Platform

IVI-6.2: VISA Interoperability Requirements for USBTMC Specification

Network Working Group Request for Comments: 3634 Category: Standards Track Comcast Cable J. Bevilacqua N. Davoust YAS Corporation December 2003

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0

Airence C Library v1.2 for Windows

Metadata for SAML 1.0 Web Browser Profiles

Kerberos SAML Profiles

Category: Informational December 1998

Feb :33 draft-glenn-id-sensor-alert-mib-01.txt Page 1

Request for Comments: 3934 Updates: 2418 October 2004 BCP: 94 Category: Best Current Practice

CC Pilot XS. Backlight interface description

Network Working Group. Updates: 1858 June 2001 Category: Informational. Protection Against a Variant of the Tiny Fragment Attack

Chin Guok, ESnet. Network Service Interface Signaling and Path Finding

XACML Profile for Requests for Multiple Resources

Request for Comments: 4633 Category: Experimental August 2006

L76-L I2C Application Note

Test Assertions for the SCA_J Common Annotations and APIs Version 1.1 Specification

Address API REST Specification

ESP8266 Application Note Firmware Download Protocol

SCA JMS Binding v1.1 TestCases Version 1.0

DGILib USER GUIDE Atmel-42771A-DGILib_User Guide-09/2016

PCAN-OBD-2 API. Documentation. API Implementation of the OBD-2 Standard (ISO ) Document version ( )

Network Working Group Request for Comments: August Address-Prefix-Based Outbound Route Filter for BGP-4

DYNAMIC ENGINEERING. 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

The ZL_PMBus API Programmer s Guide

Open Cloud Computing Interface Service Level Agreements

XM112 Module Software. User Guide

Test Assertions for the SCA Assembly Model Version 1.1 Specification

PcieAltBase & PcieAltChan

SCA-J POJO Component Implementation v1.1 TestCases Version 1.0

FLYchip 2kbit User Guide

USB Interrupt Transfer Example PSoC 3 / PSoC 5

TAS1020 Application Notes

Proposal for SAML Attribute Changes

Introduction. General Description. Applicable Documents. Hardware Connectivity. Option 1: Stand Alone Auto Mode System with External EEPROM

Interoperability Specification for ICCs and Personal Computer Systems

Transcription:

Title: Migrating to Delcom USB HID Chip Set (Generation 2) from the Delcom USB custom driver Chip Set (Generation 1). Abstract: This document outlines the software changes that a user of generation 1 products using the direct communication method must take when migrating to generation 2 (USB HID) products. Definitions: Generation 2 All Delcom products that use the USB HID generic driver. Generation 1 All Delcom products that use the USB Delcom custom driver. Direct Communication Software connects to the USB device via the USB Driver. Indirect Communication Software connects to the USB device via the Delcom DLL. VID Vendor ID Number 0x0FC5 PID Product ID Number 0xB080 Related Part Numbers: All part numbers that start with 90xxxx. Document Revision: Document identifier: Application Note 220 Location: http://www.delcomproducts.com/downloads/appnote220.pdf Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 1 of 14

Table of Contents 1 Introduction... 3 2 Overview of required modification for direct communications... 3 3 USB HID Driver Advantages... 3 4 Software changes... 4 4.1 Finding the Device Name... 4 4.2 Write Command/Data Packet... Error! Bookmark not defined. 4.3 Read Command/Data Packet... 9 5 References... 11 Appendix A. Revision History... 12 Appendix B. Optional TID and SID Test... 13 Appendix C. Notices... 14 Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 2 of 14

1 Introduction In November 2008 we released our second generation of the USB firmware. This second generation firmware is similar to our original (first generation) products in form and function but instead of communicating via the Delcom driver this firmware uses the USB HID driver. Using the USB HID driver has many advantages, see USB HID Driver Advantages below. Unfortunately there are a few changes that need to be made when converting first generation code to second generation code. If you are communicating via the Delcom DLL driver, then no changes are necessary. Just make sure you are using version 0.7 or greater of the DLL. If you re not currently using the Delcom DLL than you will have to modified your code as described in this document or modify your code to use the Delcom DLL. This application note describes the changes require to communicate directly to the USB device via the USB HID driver, also referred to as Direct Communications. If you plan on convert your code to use the Delcom DLL please see the DLL documentation. Communicating via the Delcom DLL is also referred to as Indirect Communications. The simplest communication method is to use the Delcom DLL. 2 Overview of required modification for direct communications There are three areas that will need to be modified, there are: Device name The method that retrieves the device name must be changed. Write Command The write command/data packet changes slightly and the major command number change. Read Commands The reads command packet changes slightly, the minor command is used instead of the major command as the read command. Also read commands that pass more than one byte must also be changed. 3 USB HID Driver Advantages Overall the USB HID driver is more reliable, more secure, scalable and provides for a true plug and play USB device. Driver preinstalled on most operation systems. Compatible with 32bit and 64bit machines. Multi-core and multi-processor safe. Better security. Driver signed and certified by the OS vendor. Automatic driver updates by OS vendor. Larger read and write packet buffer size. More efficient data payload. Data verification feature for improved mission critical designs. Enhance error detection and handling. Scalable to higher performance USB chip sets. Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 3 of 14

4 Software changes The following sections describe the require changes to migrate generation1 code to generation 2 (USB HID) code. The following examples are shown in C and are for Microsoft Windows. Other operating systems have similar functions. This application note should be used in conjunction with the example code on the web at: C++ USB HID Example: http://www.delcomproducts.com/productdetails.asp?productnum=890607 C#.NET USB HID Example: http://www.delcomproducts.com/productdetails.asp?productnum=890630 VB.NET USB HID Example: VB.NET user should use the C#.NET example. Following the same instruction as the C#.Net example code. Note VB.NET and C#.NET modules can be mixed in the same project. All USB HID documentation and examples can be found at: http://www.delcomproducts.com/productdetails.asp?productnum=900000 Open and closing the device is the same as before, use CreateFile() and CloseFile(). hdevice=createfile(devicename, GENERIC_READ GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); // Open the device CloseHandle(hDevice); // Close the device 4.1 Finding the Device Name In order to communicate to the USB HID device you must first acquire the device name. To do this we will ask the systems API for all USB devices that match the unique GUID given to all USB HID device. For windows you must include the HID library and header file in your project, they are: hid.lib, hidpi.h, hidsdi, hidusage.h. For DotNet programs just include the Delcom HID code in your project. The function we will be using are: GetHidGuid() SetupDiGetClassDevs() SetupDiEnumDeviceInterfaces () SetupDiGetDeviceInterfaceDetail() CreateFile() HidD_GetAttributes() CloseFile() or CloseHandle() The Unique USB HID GUID can be acquired with the HidD_GetHidGuid() functions or hardcoded to {4D1E55B2-F16F-11CF-88CB-001111000030. Using the unique GUID we use the above functions to return all of the matching USB HID devices presently found on the system. One by one we need to test these devices until we find the correct device of interest. The correct device will have VID number of 0x0FC5 and PID number of 0xB080. Also at this time we can optionally Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 4 of 14

check for the device family type number and/or the unique serial number in the device (see Appendix B). Once we have confirmed that we have the correct device we note the device handle and optional save the device name. For those of you that based your code on the C++ example, the changes are minimal. There is just one added step of asking the system API for the VID and PID information. The following C function scans for the USB HID device and optionally tests for the family type number and serial number. If the device is found it copies the device handle to the global variable hdevice, saves the device name, and leaves the file open. #define USB_VID 0x0FC5 // USB Vendor ID (Always 0x0FC5 for Delcom products) #define USB_PID 0xB080 // USB Product ID (Always 0xB080 for Delcom HID device) #define USB_TID 0x0001 // USB Type ID (0=all, 1=USBHIDIO, 2=USBHIDVI, ) #define USB_SID 0x0000 // USB Serial ID (zero=scan for all) HANDLE hdevice; // Handle to the device char DeviceName[512]; // Devicename string // ------------------------------------------------------ // // ScanForHidDevice(VID,PID,TID,SID) - Scan thru all the HID device lookking // for a match on the VID, PID and optional TID (Type ID) and SID(SerialNum) // Sets the hdevice ghandle varible if found and opens the device // Return zero if found, else non-zero error code. // 0 = Success // 1 = No matching HID devices // ------------------------------------------------------ // unsigned int ScanForHIDDevice(unsigned int VID, unsigned int PID, unsigned int TID, unsigned int SID ) { //Use a series of API calls to find a HID with a matching Vendor,Product, Type and Serial ID. DelcomDeviceInfoStruct DelcomInfo; PSP_DEVICE_INTERFACE_DETAIL_DATA detaildata; GUID HidGuid; HANDLE hdevinfo; ULONG Required; HIDD_ATTRIBUTES Attributes; SP_DEVICE_INTERFACE_DATA devinfodata; bool LastDevice = FALSE; int MemberIndex = 0; bool MyDeviceDetected = FALSE; LONG Result; ULONG Length; // Variable init Length = 0; detaildata = NULL; hdevice=null; MemberIndex = 0; LastDevice = FALSE; HidD_GetHidGuid(&HidGuid); // Get the GUID for all system HIDs. hdevinfo=setupdigetclassdevs(&hidguid, NULL, NULL, DIGCF_PRESENT DIGCF_INTERFACEDEVICE); devinfodata.cbsize = sizeof(devinfodata); do { MyDeviceDetected=FALSE; Result=SetupDiEnumDeviceInterfaces(hDevInfo, 0, &HidGuid, MemberIndex, &devinfodata); if (Result!= 0) { //A device has been detected, so get more info Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 5 of 14

Result = SetupDiGetDeviceInterfaceDetail(hDevInfo, &devinfodata, NULL, 0, &Length, NULL); // zero length call to get size detaildata = (PSP_DEVICE_INTERFACE_DETAIL_DATA)malloc(Length); detaildata -> cbsize = sizeof(sp_device_interface_detail_data); Result = SetupDiGetDeviceInterfaceDetail(hDevInfo, &devinfodata, detaildata, Length, &Required, NULL); hdevice=createfile(detaildata->devicepath, GENERIC_READ GENERIC_WRITE, 0, (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, 0, NULL); Attributes.Size = sizeof(attributes); Result = HidD_GetAttributes(hDevice, &Attributes); MyDeviceDetected = FALSE; if( (Attributes.VendorID == VID) && (Attributes.ProductID == PID)) { MyDeviceDetected = TRUE; strncpy(devicename, detaildata->devicepath, 512); // save the devicename /* optional check for Family id and serial number, See Appendix B if(tid SID) { // Now check for TID and SID if non-zero if(getdeviceinfo(&delcominfo)) MyDeviceDetected = FALSE; else { if(tid && (DelcomInfo.Family!= TID)) MyDeviceDetected = FALSE; if(sid && (DelcomInfo.Serial!= SID)) MyDeviceDetected = FALSE; // end of TID or SID */ Else {//The PID and/or VID doesn't match. Close the device try the next one CloseHandle(hDevice); hdevice = 0; free(detaildata); //if (Result!= 0) else { // End of List - No HID devices detected! LastDevice=TRUE; // returned 0, so there are no more devices to check. //If we haven't found the device yet, then try the next one. MemberIndex++; // loop till either end of deivce list or we find our device while ((LastDevice == FALSE) && (MyDeviceDetected == FALSE)); SetupDiDestroyDeviceInfoList(hDevInfo); if (MyDeviceDetected == FALSE) { // Device not found hdevice = 0; return(1); else { // Device Found HidD_SetNumInputBuffers(hDevice,1); return(0); // Success //Free the memory Once the correct device has been opened you can start write and read to the device using the handle to the device (hdevice). Getting the device name is bit labor intensive as an alterative you could just use the Delcom DLL to get the device name and then continue with the write and read functions below. Or you could can the device name from one of our example programs and cut and paste it in to your code for quick test. Note that device names are dynamic and change when ever the device re-plugged in to the machine. Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 6 of 14

4.2 Write Command/Data Packet Sending a write command in generation 2 products is very similar to generation1. There are three minor changes here. First the MajorCmd number changes, in generation 1 products, the write major command was always 10. Now the major command is either 101 or 102. Major command 101 sends only the first 8 bytes of the write packet. Major command 102 sends all 16 bytes of the write packet. Use command 102 if you using the DataExt area of the write packet. If in doubt, use command 102, you can always send 16 bytes weather the command requires it on not. Note the length parameter in the API function should also match the 101 or 102 command. Again, when in doubt set the length parameter to 16 and use command 102. Secondly the packet data structure changes slightly. And lastly the API function to call is different. The write command/data packet and API for generation 1 (Delcom driver) was: // GEN1 USB Write Command/Data Packet Typedef struct { unsigned char Recipient; unsigned char DeviceModel; unsigned char MajorCmd; unsigned char MinorCmd; unsigned char DataLSB; unsigned char DataMSB; unsigned short Length; unsigned char DataExt[8]; PacketStruct,*pPacketStruct; // GEN1 API function BOOLEAN DeviceIoControl(hDevice, IOCTL_USBIO_SEND_PACKET, ptxpacket, 8+pPacket->Length, prxpacket, 8, &nbytes, NULL ); The new write command/data packet and API for generation 2 (USB HID) is: // GEN2 USB Write Command/Data Packet typedef struct _HIDPacketStruct { unsigned char MajorCmd; unsigned char MinorCmd; unsigned char DataLSB; unsigned char DataMSB; unsigned char DataHID[4]; unsigned char DataExt[8]; HIDPacketStruct, *phidpacketstruct; // GEN2 API function BOOLEAN HidD_SetFeature(hDevice, ppacket, Length); As you can see the packet are very similar. All you need to do is re-declare your packet structure, use the new 101 or 102 major command numbers and call the new API function. Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 7 of 14

For an example to set port0 to a value of 0xFF, we would use the 101-1 command. In this example we are going to change the data structure slightly because it will make the read commands easier later on. This packet structure is the recommend one to use. // GEN2 Example to set port0 & port1 to 0xFF. typedef union HIDPacketStruct { unsigned char Data[256]; struct { unsigned char MajorCmd; unsigned char MinorCmd; unsigned char DataLSB; unsigned char DataMSB; unsigned char DataHID[4]; unsigned char DataExt[8]; Tx; struct { unsigned char Cmd; Rx; HIDPacketStruct, *phidpacketstruct; HIDPacketstruct MyPacket; // Declare the packet MyPacket.Tx.MajorCmd = 101; // Fill the packet MyPacket.Tx.MinorCmd = 1; MyPacket.Tx.DataLSB = 0xFF; HidD_SetFeature(hDevice,MyPacket, 8) // lastly send the packet Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 8 of 14

4.3 Read Command/Data Packet There are four changes in sending a read command in generation 2 products. First the MajorCmd number changes, in generation 1 products the read major command was always 11. In generation 2 products there is a limitation of only being able to send one data byte with the read command. Therefore we use the minor command as the new read command number. There is one exception and that is for the read ports command (11-0). This command is now 100 because the USB HID protocol does not allow zero to be used as command number. Secondly the packet data structure changes. Thirdly the API function to call is different. Lastly, because of the one data byte restriction, any generation 1 read commands that past more than one byte of data must now be prefixed with a setup command. The following table shows what prefix or setup write command must be sent before the read command is sent. Generation 1 Read Commands Generation 2 Read & Setup Commands 11-1 Read port0 with Strobe Setup Command: 101-3 Read Command: 1 11-2 Read port1 with Strobe Setup Command: 101-3 Read Command: 2 11-18 Write 2 bytes, Read 8 Bytes Setup Command: 101-8 Read Command: 1 11-60 Read from I2C port Setup Command: 101-63 Read Command: 60 11-61 Selective read from I2C Port Setup Command: 101-63 Read Command: 61 11-91 SPI Write 1Byte, read 1-64bits Setup Command: 101-92 Read Command: 91 Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 9 of 14

A generation 2 example on reading the port values of the device. // GEN2 USB Write/Read Command/Data Packet typedef union HIDPacketStruct { unsigned char Data[256]; struct { unsigned char MajorCmd; unsigned char MinorCmd; unsigned char DataLSB; unsigned char DataMSB; unsigned char DataHID[4]; unsigned char DataExt[8]; Tx; struct { unsigned char Cmd; Rx; HIDPacketStruct, *phidpacketstruct; HIDPacketstruct MyPacket; // Declare the packet MyPacket.Rx.Cmd = 100; // Fill the packet read ports cmd HidD_GetFeature(hDevice,MyPacket, 8) // lastly send the packet unsigned char Port0 = MyPacket Data[0]; unsigned char Port2 = MyPacket Data[1]; A generation 2 example where more than one byte is needed. This example reads port0 with strobe on port1 pin 0. // GEN2 USB Write/Read Command/Data Packet typedef union HIDPacketStruct { unsigned char Data[256]; struct { unsigned char MajorCmd; unsigned char MinorCmd; unsigned char DataLSB; unsigned char DataMSB; unsigned char DataHID[4]; unsigned char DataExt[8]; Tx; struct { unsigned char Cmd; Rx; HIDPacketStruct, *phidpacketstruct; HIDPacketstruct MyPacket; // Declare the packet MyPacket.Tx.MajorCmd = 101; // Fill the tx setup packet MyPacket.Tx.MinorCmd = 3; // Setup the strobe MyPacket.Tx.DataLSB = 0x01; // Pin0 HidD_SetFeature(hDevice,MyPacket, 8) // send the setup or prefix packet cmd // Now send the read command MyPacket.Rx.Cmd = 100; // Fill the rx packet read ports cmd HidD_GetFeature(hDevice,MyPacket, 8) // lastly send the packet unsigned char Port0 = MyPacket Data[0]; unsigned char Port2 = MyPacket Data[1]; // Get the data Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 10 of 14

5 References Delcom USB HID Documentation and Examples http://www.delcomproducts.com/productdetails.asp?productnum=900000 Delcom DLL http://www.delcomproducts.com/productdetails.asp?productnum=890510 Delcom USB HID Chips http://www.delcomproducts.com/products_usbio.asp Delcom Distribution Disk http://www.delcomproducts.com/delcomcd/start.htm Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 11 of 14

Appendix A. Revision History Rev Date Author Description 0 11/04/2008 Doug Lovett Initial Release Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 12 of 14

Appendix B. Optional TID and SID Test If you plan on also testing for the family type and/or serial number add the following code to your product. And uncomment the optional check for Family id and serial number code. // Family Type Values enum FamilyType{ ALL, USBIO, USBVI, USBND ; // all Delcom USB device // all Delcom USB IO Chips & foot switch // all Delcom USB Visual Indicators // all Delcom USB Numeric Displays // DataStruct used by the GetDeviceInfo functions typedef struct DelcomDeviceInfoStruct_ { unsigned short int Family; unsigned short int Security; unsigned char Version; unsigned char Day; unsigned char Month; unsigned char Year; unsigned int Serial; unsigned int Spare; DelcomDeviceInfoStruct, *pdelcomdeviceinfostruct; // ---------------------------------------------------------------- // // Reads device info // Returns zero on success, else non-zero // Return data in a 16byte data buffer. Buffer must be predeclared // ---------------------------------------------------------------- // int GetDeviceInfo(pDelcomDeviceInfoStruct pinfo) { mypacket.rx.cmd = 104; if(!hidd_getfeature(hdevice,&mypacket, 16)) { return(1); // command failed // now get the data if the variable has been passed if(!pinfo) return(1); memcpy(pinfo,&mypacket,16); return 0; Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 13 of 14

Appendix C. Notices DELCOM PRODUCTS INC. takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on DELCOM PRODUCTS INC procedures with respect to rights in DELCOM PRODUCTS INC. specifications can be found at the DELCOM PRODUCTS INC. website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification, can be obtained from the DELCOM PRODUCTS INC. Executive Director. DELCOM PRODUCTS INC. invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the DELCOM PRODUCTS INC. Executive Director. Copyright DELCOM PRODUCTS INC. Open 2006. All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to DELCOM PRODUCTS INC., except as needed for the purpose of developing DELCOM PRODUCTS INC. specifications, in which case the procedures for copyrights defined in the DELCOM PRODUCTS INC. Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by DELCOM PRODUCTS INC. or its successors or assigns. This document and the information contained herein is provided on an AS IS basis and DELCOM PRODUCTS INC. DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. LIFE SUPPORT POLICY - Delcom Products are not authorized for use in life support devices and/or systems without the express written approval of Delcom. Appnote220.pdf Copyright DELCOM PRODUCTS INC. 2008. All Rights Reserved. Page 14 of 14