User Tools

Site Tools


usb_protocol_information

This is an old revision of the document!


Work In Progress

Ergodex DX1 protocol
====================

Written By Dominic Clifton (C) 2007


I guess the first byte is probably a control code that puts it in "program mode"

Commands
========

16 bytes per command.

Byte 1:     Command Code
Bytes 2-16: Command Data


Program Keys
------------

Usage:
    
    Program up to 4 keys per command

Command Code: 

    0x03

Command Data: 

    3 bytes per key (below) 
    If a key is not to be programmed then pad the command with 0x00's
    
    Then for each key that has a single key macro assigned to it sends 3 bytes
    Byte1: key number in hex (corresponds to the number on the physical key itself)
    Byte2: "Key Type"
        key types:
            0x01 - "Single Key"
            0x03 - "Macro"
    
    3rd byte is different depending on "Key Type"
    
        when key is is:
        
        "Single Key"
        
            Byte 3: Keyboard Scan Code
                                    
            See Keyboard Scan Code Specification [References 1,2] Appendix C: USB Keyboard/Keypad Page (0x07)        
                
        "macro"
        
            Byte 3: Empty Value (0x00)
            
            When
    
    Example of command sent when switching to an application that has a profile enabled for it.
    
    000421: Bulk or Interrupt Transfer (UP), 05.02.2007 20:27:53.4687500 +0.1093750
    Pipe Handle: 0x87ca8884 (Endpoint Address: 0x2)
    Send 0x70 bytes to the device:
     03 01 01 1E 02 01 1F 03 01 20 04 01 21 05 01 22   ......... ..!.."
     03 06 01 23 07 01 24 08 01 25 09 01 26 0A 01 27   ...#..$..%..&..'
     03 0B 01 14 0C 01 1A 0D 01 08 0E 01 15 0F 01 17   ................
     03 10 01 1C 11 01 18 12 01 0C 13 01 12 14 01 13   ................
     03 15 01 04 16 01 16 17 01 07 18 01 09 19 01 0A   ................
     03 29 01 1D 2A 01 1B 2B 01 06 2C 01 19 00 00 00   .)..*..+..,.....
     02 00 00 01 00 00 01 01 00 00 00 00 00 00 00 00   ................

Finish Programming
------------------

Usage:

    Sent after one or more "Program Keys" commands.

Command Code:

    0x02
    
Command Data:

    00 00 01 00 00 01 01 00 00 00 00 00 00 00 00
    
    Contents unknown at present.
    
    Very similar (only one bit difference) to "Start Programming"

Start Programming
-----------------

Usage:

    Sent when device is idle.
    Sent before one or more "Program Keys" commands.
    
Command Code:

    0x02
    
Command Data:
    00 00 01 00 01 01 01 00 00 00 00 00 00 00 00

    Contents unknown at present.

Get Device Status
-----------------

Usage:

    Sent when device is idle.

Command Code:

    0x0A
    
Command Data:

    Fill with 0x00's

Command Response:

    16 bytes
    
    First byte: 0x0A
    Next 8 bytes: encoded serial number?
    Next 2 bytes: binary status flags?
    Next 5 bytes: filled with 0x00

References
==========


1 - Key Support, Keyboard Scan Codes, and Windows

 http://www.microsoft.com/whdc/device/input/Scancode.mspx

2 - Keyboard Scan Code Specification

 http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
usb_protocol_information.1170762582.txt.gz · Last modified: 2007/02/06 12:49 (external edit)