Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 18 of 18

Thread: Teensy 3.6/4.1 USB Support for CCID USB Card Readers

  1. #1
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23

    Teensy 3.6/4.1 USB Support for CCID USB Card Readers

    I have a project where we need to connect a CCID USB Card reader to our Teensy 4.1 Based board. We would like to be able to just do the basic functions of detecting when a Card/FOB is scanned and receiving the Card ID. We don't need support right now for Writing cards or reading the extra data from the card storage.

    I did some simple testing with the USB library and at least have it detecting the reader and displaying the correct description of the device.

    The CCID standard is quite different than any of the other protocols, so I would looking for ideas on how to get started.

    I have copies of the CCID Standard Docs and have been reading quite a bit, from what I see there needs to be 4 Pipes created to the device for proper communication. I think if someone can help me get started, I can get this going to share with everyone.

    From what I gather, I would need the following Functions to communicate with the Reader.

    Interrupt - IN
    Bulk-Out
    Bulk-In

    On page 59 of the CCID Standard Document, there is an example of a basic Card Detected, Card Read, Card Removed example of the handshake.



    -Steve

    The reader is from AB Circle and is the model number CIR315A


    USB HID Device Info Program

    This Sketch shows information about plugged in HID devices

    *** You can control the output by simple character input to Serial ***
    R - Turns on or off showing the raw data
    C - Toggles showing changed data only on or off
    <anything else> - toggles showing the Hid formatted breakdown of the data


    USBDeviceInfo claim this=2000CAC8

    ****************************************
    ** Device Level **
    vid=31AA
    pid=3001

    bDeviceClass = 0
    bDeviceSubClass = 0
    bDeviceProtocol = 0
    09 04 00 00 03 0B 00 00 03 36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00
    E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01 07
    05 01 02 40 00 00 07 05 82 02 40 00 00 07 05 85 03 08 00 0A 09 04 01 00 03 0B 00 00 04 36 21 10
    01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00
    00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01 07 05 04 02 08 00 00 07 05 83 02 40 00
    00 07 05 86 03 08 00 0A

    USBDeviceInfo claim this=2000CAC8

    ****************************************
    ** Interface Level **
    09 04 00 00 03 0B 00 00 03 36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00
    E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01 07
    05 01 02 40 00 00 07 05 82 02 40 00 00 07 05 85 03 08 00 0A 09 04 01 00 03 0B 00 00 04 36 21 10
    01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00
    00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01 07 05 04 02 08 00 00 07 05 83 02 40 00
    00 07 05 86 03 08 00 0A
    bInterfaceNumber = 0
    number end points = 3
    bInterfaceClass = 11
    bInterfaceSubClass = 0
    bInterfaceProtocol = 0

    USBDeviceInfo claim this=2000CAC8

    ****************************************
    ** Interface Level **
    09 04 01 00 03 0B 00 00 04 36 21 10 01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00
    08 F8 01 00 00 FE 00 00 00 00 00 00 00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01 07
    05 04 02 08 00 00 07 05 83 02 40 00 00 07 05 86 03 08 00 0A
    bInterfaceNumber = 1
    number end points = 3
    bInterfaceClass = 11
    bInterfaceSubClass = 0
    bInterfaceProtocol = 0

  2. #2
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Here is the link to the CCID Version 1.1 Document:

    https://www.usb.org/document-library...cid-version-11

    Also, there is a project for a Linux Driver out there with support for this and many other Readers:

    https://ccid.apdu.fr/

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    Sorry, I am not sure how much time and energy I be able to help. But will try to answer questions as they come along.

    It should be doable, but it may take a bit of work to do. If this device was one that was based on HID, it is often a lot easier, as you can hopefully just hook it in with the hid parser code and your code is called with the different data fields... Sometimes there is still some work to do as many of these devices still expect some handshake to get started. Like the equivalent of some IOCTL that says something like: Start sending report 1...

    For devices that implement their own interface this can be a lot more work. As you mentioned, you can look at the Linux driver and for sure get hints. Often times they end up with lots more setup than is needed.... Other times I look for others who have implemented it, like USB Host Shield 2... But I don't see anything.

    So then some times, I try to capture the USB data that goes between it and either a windows or Linux Host and then try to deduce which parts I need.
    If you have a fancy scope like Paul has Beagle... it is easier.

    I don't. If the device communicates with USB2 and not at high speed (480mbs), then I can capture some of this with my Saleae Logic Analyzer. But it is a pain.
    I used to capture everything with their previous software, and save to file, then have to do several steps to reduce the sometime millions of lines out output, down to something like maybe 100 lines that are of interest. I have now have a hacked up version of their USB protocol analyzer plus an HLA which does a lot more of the data reduction for me, but it is still a pain...

    From there, I then start sort of hacking my way along...
    I plug it in to the host and capture how much data I get so far and compare to the other code and then generate the next message and see happens...

    I also try to gather as much data as I can from something like linux. For example I plug it in to my Ubuntu x86... machine and then
    print out system information like: dmesg | tail -40
    To see what things it tells me...

    I then use lsusb to give me more information.
    like from lsusb -v
    I always have to look up the command format, to specify the device...)
    And it will typically tell you about things like endpoints and the like.

    Again I know this is not much help

  4. #4
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Thanks for the reply!! I have made some progress.

    First, the device in question is NOT an HID device, it is strictly a USB CCID device.

    I ended up taking the Serial.cpp section, duplicated it to CCID.cpp and have modified it quite a bit. I now have it getting the Device/Interface/Endpoint Descriptors!! So far I have only modified the claim function. See Sample output with Debugging enabled.

    So I believe if I can 'attach' to the Interrupt-IN pipe, not sure how, but I would receive NotifySlotChange Messages, which is really all I'm looking for right now.

    My question is how do you attach to the Interrupt-IN pipe and read back the data? Do I assign Pipes to all three endpoints, or are Interrupt Pipes treated differently?

    I also have one of the Saleae Logic Analyzers, but never used it for USB, mostly for SPI/I2C and Pixel Data.

    Based on the Doc on page 59 it flows like this

    USB HOST CHIP CARD READER

    Card Inserted on Slot #0

    <-------- Interrupt - IN
    RDR_to_PC_NotifySlotChange Message

    Bulk-OUT ------------>
    PC_to_RDR_IccPowerOn

    <-------- Bulk - IN
    RDR_to_PC_DataBlock
    (Return Card State and Power State)

    Bulk-OUT ------------>
    PC_to_RDR_XfrBlock

    <-------- Bulk - IN
    RDR_to_PC_DataBlock
    (Return Card State and Power State)
    and Card Data

    Card Removed from Slot #0
    <-------- Interrupt - IN
    RDR_to_PC_NotifySlotChange Message



    Some of the data has been removed as it was un-necessary.


    CCID Testing - Circle Card Reader
    USB2 PLL running
    reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Setup Done!
    port change: 10001803
    connect
    begin reset
    port change: 10001805
    port enabled
    end recovery
    new_Device: 12 Mbit/sec
    new_Pipe
    enumeration:
    enumeration:
    enumeration:
    Device Descriptor:
    12 01 00 02 00 00 00 40 AA 31 01 30 03 02 01 02 00 01
    VendorID = 31AA, ProductID = 3001, Version = 0203
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1

    Manufacturer: Circle
    Product: CIR315
    Config data length = 177

    Configuration Descriptor:
    09 02 B1 00 02 01 00 80 7D
    NumInterfaces = 2
    ConfigurationValue = 1
    09 04 00 00 03 0B 00 00 03

    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 11 / 0 / 0
    36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12
    00 00 00 67 32 00 00 E7 4C 06 00 00 00 02 00 00
    00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00
    00 00 00 00 00 01
    HID, 7 report descriptors
    07 05 01 02 40 00 00
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 82 02 40 00 00
    Endpoint = 2 IN
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 85 03 08 00 0A
    Endpoint = 5 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10
    09 04 01 00 03 0B 00 00 04

    Interface = 1
    Number of endpoints = 3
    Class/Subclass/Protocol = 11 / 0 / 0
    36 21 10 01 00 01 03 00 00 00 FA 00 00 00 FA 00
    00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00
    00 00 00 00 00 00 00 00 BA 00 02 00 0F 01 00 00
    00 00 00 00 00 01
    HID, 1 report descriptor
    07 05 04 02 08 00 00
    Endpoint = 4 OUT
    Type = Bulk
    Max Size = 8
    Polling Interval = 0
    07 05 83 02 40 00 00
    Endpoint = 3 IN
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 86 03 08 00 0A
    Endpoint = 6 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10


    >>CCID Claim Begin ======================
    >>09 04 00 00 03 0B 00 00 03 36 21 10 01 00 07 03
    00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00
    E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00
    00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01 07
    05 01 02 40 00 00 07 05 82 02 40 00 00 07 05 85
    03 08 00 0A 09 04 01 00 03 0B 00 00 04 36 21 10
    01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00
    00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00
    00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00
    00 00 01 07 05 04 02 08 00 00 07 05 83 02 40 00
    00 07 05 86 03 08 00 0A
    >>USBCCID claim this = 200031E0
    >vid = 31AA
    >pid = 3001
    >bDeviceClass = 0
    >bDeviceSubClass = 0
    >type = 0
    >bDeviceProtocol = 0
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: INTERFACE
    >bLength = 0x9
    >bDescriptorType = 0x4
    >bInterfaceNumber = 0x0
    >bAlternateSetting = 0x0
    >bNumEndpoints = 0x3
    >bInterfaceClass = 0xB
    >bInterfaceSubClass = 0x0
    >bInterfaceProtocol = 0x0
    >iInterface = 0x3
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: FUNCTIONAL
    Ignore for Now!!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 1 Bulk-OUT tx_size = 64
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 82 Bulk-IN rx_size = 64
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 85 Interrupt rx_size = 8
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: INTERFACE
    >bLength = 0x9
    >bDescriptorType = 0x4
    >bInterfaceNumber = 0x1
    >bAlternateSetting = 0x0
    >bNumEndpoints = 0x3
    >bInterfaceClass = 0xB
    >bInterfaceSubClass = 0x0
    >bInterfaceProtocol = 0x0
    >iInterface = 0x4
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: FUNCTIONAL
    Ignore for Now!!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 4 Bulk-OUT tx_size = 8
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 83 Bulk-IN rx_size = 64
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 86 Interrupt rx_size = 8
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptors Processes.
    Interfaces Found: 1
    EndPoints Found: 8
    Interface: 0
    Bulk Endpoint rx:2 tx:1 intr:5
    Interface: 1
    Bulk Endpoint rx:3 tx:4 intr:6
    rx buffer size:64
    tx buffer size:64
    new_Pipe
    new_Pipe
    new_Pipe
    *** Device CCID 31aa:3001 - connected ***
    manufacturer: Circle
    product: CIR315

  5. #5
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    I think I'm stuck at this point. The Device Identification is working, but I can't seem to get any other interaction going with the reader.

    I believe I am sending request to the device, but not seeing any responses so far, Also when a card is scanned, it should create an Interrupt Message, and I don't seem to be able to detect that.

    Could really use a little help getting this going.

    -Steve

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    Saleae - Which one do you have... (I have a few), but do most of my USB stuff with PRO 8...
    It was a real pain to get the data down to something useful. But I now have hacked up version of USB low level analyzer which outputs new format output, and a High Level Analyzer which can strip that down to something useful. Was at one point trying to get Saleae to integrate it into main USB...

    But not yet: Some details are up at:
    https://github.com/saleae/usb-analyzer/issues/3
    https://discuss.saleae.com/t/usb-ls-...nhanced/1222/9

    What I am often looking for, is to see details like:
    Code:
    SETUP , DATA0 , 0x0 , 0x0 ,  0x80 0x6 0x0 0x1 0x0 0x0 0x8 0x0
    IN , DATA1 , 0x0 , 0x0 ,  0x12 0x1 0x10 0x1 0x0 0x0 0x0 0x8
    SETUP , DATA0 , 0x0 , 0x0 ,  0x0 0x5 0x1 0x0 0x0 0x0 0x0 0x0
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x0 0x1 0x0 0x0 0x12 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x12 0x1 0x10 0x1 0x0 0x0 0x0 0x8
    IN , DATA0 , 0x0 , 0x1 ,  0x8a 0x25 0x36 0x0 0x9 0x1 0x1 0x2
    IN , DATA1 , 0x0 , 0x1 ,  0x0 0x1
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x0 0x3 0x0 0x0 0xfc 0x1
    IN , DATA1 , 0x0 , 0x1 ,  0x4 0x3 0x9 0x4
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x1 0x3 0x9 0x4 0xfc 0x1
    IN , DATA1 , 0x0 , 0x1 ,  0x16 0x3 0x53 0x0 0x49 0x0 0x4e 0x0
    IN , DATA0 , 0x0 , 0x1 ,  0x4f 0x0 0x57 0x0 0x45 0x0 0x41 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x4c 0x0 0x54 0x0 0x48 0x0
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x2 0x3 0x9 0x4 0xfc 0x1
    IN , DATA1 , 0x0 , 0x1 ,  0x26 0x3 0x57 0x0 0x69 0x0 0x72 0x0
    IN , DATA0 , 0x0 , 0x1 ,  0x65 0x0 0x64 0x0 0x20 0x0 0x47 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x61 0x0 0x6d 0x0 0x69 0x0 0x6e 0x0
    IN , DATA0 , 0x0 , 0x1 ,  0x67 0x0 0x20 0x0 0x4d 0x0 0x6f 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x75 0x0 0x73 0x0 0x65 0x0
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x0 0x2 0x0 0x0 0x9 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x9 0x2 0x3b 0x0 0x2 0x1 0x0 0xa0
    IN , DATA0 , 0x0 , 0x1 ,  0xf0
    SETUP , DATA0 , 0x0 , 0x1 ,  0x80 0x6 0x0 0x2 0x0 0x0 0x3b 0x0
    IN , DATA1 , 0x0 , 0x1 ,  0x9 0x2 0x3b 0x0 0x2 0x1 0x0 0xa0
    When a device is plugged in. Normally the raw stuff in same cases out of the released USB analyzer the save to file, may output 200k lines of data, which I often can reduce to probably about 50 lines that are interesting.

    I have also had some luck using WireShark app and PC or Linux to capture some of the stuff. But it usually takes me awhile to remember how I do it the previous time. And then filter it down to where you may get similar type data...

    Or use a actual scope, like: https://www.totalphase.com/products/beagle-usb480/
    Which I think is what Paul uses... For me, who just does it for the fun of it... I have not invested in one of these...

    Most of the devices have a handshake where they go through and where we will ask the device something and wait for them to respond, and depending on the response will ask for the next thing

    I will try to take a look at their document/device driver. But is is again easier to look st what they do when plugged in to help to direct where to look next.

  7. #7
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Kurt,

    The Saleae I have is the older Black Logic 8, So I'm not sure it can capture USB at that speed.

    If you want to helpout on this, I can send you the code I have so far and mail you one of the Circle Readers with a few test cards for testing. PM me and I'll send you my contact Info.

    I have done the WireShark Trace and could provide an example capture file with the Filter needed to view the USB traffic.

    Here is my latest Trace:

    At the bottom, you will see I am trying to send out a Request for Slot Status to the Endpoint 1 - Bulk-Out Pipe. But not sure how to get the response back from device.

    -Steve


    CCID Testing - Circle Card Reader
    USB2 PLL running
    reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Setup Done!
    port change: 10001803
    connect
    begin reset
    port change: 10001805
    port enabled
    end recovery
    new_Device: 12 Mbit/sec
    new_Pipe
    enumeration:
    enumeration:
    enumeration:
    Device Descriptor:
    12 01 00 02 00 00 00 40 AA 31 01 30 03 02 01 02 00 01
    VendorID = 31AA, ProductID = 3001, Version = 0203
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
    enumeration:
    enumeration:
    Manufacturer: Circle
    enumeration:
    Product: CIR315
    enumeration:
    Config data length = 177
    enumeration:
    Configuration Descriptor:
    09 02 B1 00 02 01 00 80 7D
    NumInterfaces = 2
    ConfigurationValue = 1
    09 04 00 00 03 0B 00 00 03
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 11 / 0 / 0
    36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00 E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01
    HID, 7 report descriptors
    07 05 01 02 40 00 00
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 82 02 40 00 00
    Endpoint = 2 IN
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 85 03 08 00 0A
    Endpoint = 5 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10
    09 04 01 00 03 0B 00 00 04
    Interface = 1
    Number of endpoints = 3
    Class/Subclass/Protocol = 11 / 0 / 0
    36 21 10 01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00 00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01
    HID, 1 report descriptor
    07 05 04 02 08 00 00
    Endpoint = 4 OUT
    Type = Bulk
    Max Size = 8
    Polling Interval = 0
    07 05 83 02 40 00 00
    Endpoint = 3 IN
    Type = Bulk
    Max Size = 64
    Polling Interval = 0
    07 05 86 03 08 00 0A
    Endpoint = 6 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10
    enumeration:
    USBHub memory usage = 960
    USBHub claim_device this=20004CE0
    USBHub memory usage = 960
    USBHub claim_device this=200050A0
    HIDParser claim this=200038A0
    HIDParser claim this=20003F60
    HIDParser claim this=20004620

    >>CCID Claim Begin ======================
    Data Received>>09 04 00 00 03 0B 00 00 03 36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00 E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01 07 05 01 02 40 00 00 07 05 82 02 40 00 00 07 05 85 03 08 00 0A 09 04 01 00 03 0B 00 00 04 36 21 10 01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00 00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01 07 05 04 02 08 00 00 07 05 83 02 40 00 00 07 05 86 03 08 00 0A
    >>USBCCID claim this = 200031E0
    >vid = 31AA
    >pid = 3001
    >bDeviceClass = 0
    >bDeviceSubClass = 0
    >type = 0
    >bDeviceProtocol = 0
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: INTERFACE 0, LEN:9
    >bLength = 0x9
    >bDescriptorType = 0x4
    >>>bInterfaceNumber = 0x0
    >bAlternateSetting = 0x0
    >>>bNumEndpoints = 0x3
    >bInterfaceClass = 0xB
    >bInterfaceSubClass = 0x0
    >bInterfaceProtocol = 0x0
    >iInterface = 0x3
    09 04 00 00 03 0B 00 00 03
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: FUNCTIONAL
    >bLength = 0x36 >>Should Be: 0x36
    >bDescriptorType = 0x21 >>Should Be: 0x21
    >bcdCCID = 0x110 >>Expected: 0x0110
    >bMaxSlotIndex = 0x0
    >bVoltageSupport = 0x7
    >dwProtocols = 0x3
    >dwDefaultClock = 4800
    >dwMaximumClock = 4800
    >bNumClockSupported = 0x0
    >dwDataRate = 12903
    >dwMaxDataRate = 412903
    >bNumDataRatesSupported = 0x0
    >dwMaxIFSD = 0x200
    >dwSynchProtocols = 0x0
    >dwMechanical = 0x0
    >dwFeatures = 0x404BA
    >dwMaxCCIDMessageLength = 522
    >bClassGetResponse = 0x0
    >bClassEnvelope = 0x0
    >bLcdLayout_X = 0x0
    >bLcdLayout_Y = 0x0
    >bPINSupport = 0x0
    >bMsxCCIDBusySlots = 0x1
    36 21 10 01 00 07 03 00 00 00 C0 12 00 00 C0 12 00 00 00 67 32 00 00 E7 4C 06 00 00 00 02 00 00 00 00 00 00 00 00 00 00 BA 04 04 00 0A 02 00 00 00 00 00 00 00 01
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 1 Bulk-OUT tx_size = 64
    07 05 01 02 40 00 00
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 82 Bulk-IN rx_size = 64
    07 05 82 02 40 00 00
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 0 Endpoint: 85 Interrupt rx_size = 8
    07 05 85 03 08 00 0A
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: INTERFACE 1, LEN:9
    >bLength = 0x9
    >bDescriptorType = 0x4
    >>>bInterfaceNumber = 0x1
    >bAlternateSetting = 0x0
    >>>bNumEndpoints = 0x3
    >bInterfaceClass = 0xB
    >bInterfaceSubClass = 0x0
    >bInterfaceProtocol = 0x0
    >iInterface = 0x4
    09 04 01 00 03 0B 00 00 04
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: FUNCTIONAL
    >bLength = 0x36 >>Should Be: 0x36
    >bDescriptorType = 0x21 >>Should Be: 0x21
    >bcdCCID = 0x110 >>Expected: 0x0110
    >bMaxSlotIndex = 0x0
    >bVoltageSupport = 0x1
    >dwProtocols = 0x3
    >dwDefaultClock = 250
    >dwMaximumClock = 250
    >bNumClockSupported = 0x0
    >dwDataRate = 10752
    >dwMaxDataRate = 129032
    >bNumDataRatesSupported = 0x0
    >dwMaxIFSD = 0xFE
    >dwSynchProtocols = 0x0
    >dwMechanical = 0x0
    >dwFeatures = 0x200BA
    >dwMaxCCIDMessageLength = 271
    >bClassGetResponse = 0x0
    >bClassEnvelope = 0x0
    >bLcdLayout_X = 0x0
    >bLcdLayout_Y = 0x0
    >bPINSupport = 0x0
    >bMsxCCIDBusySlots = 0x1
    36 21 10 01 00 01 03 00 00 00 FA 00 00 00 FA 00 00 00 00 00 2A 00 00 08 F8 01 00 00 FE 00 00 00 00 00 00 00 00 00 00 00 BA 00 02 00 0F 01 00 00 00 00 00 00 00 01
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 4 Bulk-OUT tx_size = 8
    07 05 04 02 08 00 00
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 83 Bulk-IN rx_size = 64
    07 05 83 02 40 00 00
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptor Type: ENDPOINT Interface: 1 Endpoint: 86 Interrupt rx_size = 8
    07 05 86 03 08 00 0A
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Descriptors Processes.
    Interfaces Found: 1
    EndPoints Found: 8
    Interface: 0
    Bulk Endpoint rx:2 tx:1 intr:5
    Interface: 1
    Bulk Endpoint rx:3 tx:4 intr:6
    rx buffer size:64
    tx buffer size:64
    new_Pipe
    new_Pipe
    new_Pipe
    allocate_interrupt_pipe_bandwidth
    best_bandwidth = 4, at offset = 0, shift= 0
    (CCID)>>PC_to_RDR_GetSlotStatus
    65 00 00 00 00 01 00 00 00 00
    >>CCID Claim Complete ======================
    *** Device CCID 31aa:3001 - connected ***
    manufacturer: Circle
    product: CIR315
    tx_callback
    sent.

  8. #8
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Kurt,

    Turns out that my Saleae is more usefully than I thought!! It seems to capture the USB data with no major issue. It would be great if we could do a quick zoom and see if I'm on the right track.

    I'm running version 2.3.5 of the Logic 2 software and it seems to decode the data pretty well!! I wish they had filtering!!!!

    Well, I'm jumping down the USB Trace rabbit hole and see where it leads!!

    Thanks so far for your help and suggestions.

    -Steve

    Note: I have attached a Capture from the Card Reader.
    Attached Files Attached Files
    Last edited by shmorgan; 06-18-2022 at 12:54 AM.

  9. #9
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    I should have mentioned, with data from the USB LS FS Analyzer. I typically need to then switch the capture type to Packets instead of control transfers.

    I then look for those packets that have "Data" and in this file of > 52K lines there are only 2 with Data...
    What version of the Logic Analyzer software are you using? I am currently using the Version 2 stuff with their latest release 2.3.55

    So the interesting thing would be if you have a setup, like connected to PC/Linux/??? that recognizes the board and maybe one or two card detection and can capture that in Packet mode.
    Then output the file as mentioned, which could be very big!

    Then if possible try to reduce the data to something manageable, I showed some of steps I did in a few places like the posting:
    https://discuss.saleae.com/t/any-vid...s-analyzer/643

    What I have found is that I use the Linux grep on the file and find all lines that have data and return it plus the line before it...
    something like: grep -i -B 1 data.csv > extracted_data.csv

    and then I use editor to remove -- lines
    And then I combine the two lines into one...

    And that hopefully gives a reasonable number of lines to look through.

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    Forgot to mention in previous post,

    Also hard to fully know what is going on, without seeing some of your startup code.

    For example: With your endpoints,

    For those which are to receive data from the device, have you queued up transfer objects with buffers, that are setup to receive the data.

    Like if you look in lets say keyboard.cpp you will see code that looks like:
    Code:
    	datapipe = new_Pipe(dev, 3, endpoint, 1, 8, interval);
    	datapipe->callback_function = callback;
    	queue_Data_Transfer(datapipe, report, 8, this);
    Where we then have:

    Code:
    void KeyboardController::callback(const Transfer_t *transfer)
    {
    	//println("KeyboardController Callback (static)");
    	if (transfer->driver) {
    		((KeyboardController *)(transfer->driver))->new_data(transfer);
    	}
    }
    Which is defined as a static function. Which then grabs our object pointer out of it and calls new_data

    Code:
    void KeyboardController::new_data(const Transfer_t *transfer)
    {
    	println("KeyboardController Callback (member)");
    	print("  KB Data: ");
    	print_hexbytes(transfer->buffer, 8);
    ...
    	queue_Data_Transfer(datapipe, report, 8, this);
    }
    Which then processes the data and then queues back up the a transfer structure to receive the next one. Note in this case we are only setup with one receive buffer/transfer, with other classes we may queue up multiple transfers, to handle faster devices which may queue up multiple things before we have chance to process.

    My guess is there is still some setup needed, like maybe to ask which report format or start device or ... This is needed Maybe multiple

  11. #11
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Ok, so this morning, I captured and filtered traffic with the card reader connected to both the Windows Machine and the Teensy. On each one, I scanned 5 cards.

    I have included the traces here. Hope the filtering helps!!! The filtered files are the ones with _out in the file name.

    The one thing I see right off, is in the Teensy Trace, a bunch of DATAT0 with all the bytes set to 0x00, from Time 2.89 until the end.

    -Steve
    Attached Files Attached Files

  12. #12
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    Actually your capture files work nicely...

    I then simply added my version of the USB LS/FS LLA and then my HLA, that uses it...

    From that I could get data like:
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	3 
Size:	54.9 KB 
ID:	28742
    And the report view output, has data from my HLA, like:
    Code:
    SETUP , DATA0 , 0x0 , 0x0 ,  0x80 0x6 0x0 0x1 0x0 0x0 0x40 0x0
    IN , DATA1 , 0x0 , 0x0 ,  0x12 0x1 0x0 0x2 0x0 0x0 0x0 0x40 0xaa 0x31 0x1 0x30 0x3 0x2 0x1 0x2 0x0 0x1
    SETUP , DATA0 , 0x0 , 0x0 ,  0x0 0x5 0x1a 0x0 0x0 0x0 0x0 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x1 0x0 0x0 0x12 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x12 0x1 0x0 0x2 0x0 0x0 0x0 0x40 0xaa 0x31 0x1 0x30 0x3 0x2 0x1 0x2 0x0 0x1
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x2 0x0 0x0 0xff 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x9 0x2 0xb1 0x0 0x2 0x1 0x0 0x80 0x7d 0x9 0x4 0x0 0x0 0x3 0xb 0x0 0x0 0x3 0x36 0x21 0x10 0x1 0x0 0x7 0x3 0x0 0x0 0x0 0xc0 0x12 0x0 0x0 0xc0 0x12 0x0 0x0 0x0 0x67 0x32 0x0 0x0 0xe7 0x4c 0x6 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xba 0x4 0x4 0x0 0xa 0x2
    IN , DATA0 , 0x0 , 0x1a ,  0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x7 0x5 0x1 0x2 0x40 0x0 0x0 0x7 0x5 0x82 0x2 0x40 0x0 0x0 0x7 0x5 0x85 0x3 0x8 0x0 0xa 0x9 0x4 0x1 0x0 0x3 0xb 0x0 0x0 0x4 0x36 0x21 0x10 0x1 0x0 0x1 0x3 0x0 0x0 0x0 0xfa 0x0 0x0 0x0 0xfa 0x0 0x0 0x0 0x0 0x0 0x2a 0x0 0x0 0x8 0xf8 0x1
    IN , DATA1 , 0x0 , 0x1a ,  0x0 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xba 0x0 0x2 0x0 0xf 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x7 0x5 0x4 0x2 0x8 0x0 0x0 0x7 0x5 0x83 0x2 0x40 0x0 0x0 0x7 0x5 0x86 0x3 0x8 0x0 0xa
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x3 0x0 0x0 0xff 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x4 0x3 0x9 0x4
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x2 0x3 0x9 0x4 0xff 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0xe 0x3 0x43 0x0 0x49 0x0 0x52 0x0 0x33 0x0 0x31 0x0 0x35 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x6 0x0 0x0 0xa 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x1 0x0 0x0 0x12 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x12 0x1 0x0 0x2 0x0 0x0 0x0 0x40 0xaa 0x31 0x1 0x30 0x3 0x2 0x1 0x2 0x0 0x1
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x2 0x0 0x0 0x9 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x9 0x2 0xb1 0x0 0x2 0x1 0x0 0x80 0x7d
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x2 0x0 0x0 0xb1 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x9 0x2 0xb1 0x0 0x2 0x1 0x0 0x80 0x7d 0x9 0x4 0x0 0x0 0x3 0xb 0x0 0x0 0x3 0x36 0x21 0x10 0x1 0x0 0x7 0x3 0x0 0x0 0x0 0xc0 0x12 0x0 0x0 0xc0 0x12 0x0 0x0 0x0 0x67 0x32 0x0 0x0 0xe7 0x4c 0x6 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xba 0x4 0x4 0x0 0xa 0x2
    IN , DATA0 , 0x0 , 0x1a ,  0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x7 0x5 0x1 0x2 0x40 0x0 0x0 0x7 0x5 0x82 0x2 0x40 0x0 0x0 0x7 0x5 0x85 0x3 0x8 0x0 0xa 0x9 0x4 0x1 0x0 0x3 0xb 0x0 0x0 0x4 0x36 0x21 0x10 0x1 0x0 0x1 0x3 0x0 0x0 0x0 0xfa 0x0 0x0 0x0 0xfa 0x0 0x0 0x0 0x0 0x0 0x2a 0x0 0x0 0x8 0xf8 0x1
    IN , DATA1 , 0x0 , 0x1a ,  0x0 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xba 0x0 0x2 0x0 0xf 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x7 0x5 0x4 0x2 0x8 0x0 0x0 0x7 0x5 0x83 0x2 0x40 0x0 0x0 0x7 0x5 0x86 0x3 0x8 0x0 0xa
    SETUP , DATA0 , 0x0 , 0x1a ,  0x0 0x9 0x1 0x0 0x0 0x0 0x0 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x3 0x3 0x9 0x4 0x4 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x18 0x3 0x43 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x3 0x3 0x9 0x4 0x18 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x18 0x3 0x43 0x0 0x49 0x0 0x52 0x0 0x33 0x0 0x31 0x0 0x35 0x0 0x20 0x0 0x50 0x0 0x49 0x0 0x43 0x0 0x43 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x4 0x3 0x9 0x4 0x4 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x16 0x3 0x43 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x4 0x3 0x9 0x4 0x16 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x16 0x3 0x43 0x0 0x49 0x0 0x52 0x0 0x33 0x0 0x31 0x0 0x35 0x0 0x20 0x0 0x53 0x0 0x41 0x0 0x4d 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x0 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x3 0x0 0x0 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x4 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x3 0x0 0x0 0x4 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x4 0x3 0x9 0x4
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x1 0x3 0x9 0x4 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0xe 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x1 0x3 0x9 0x4 0xe 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0xe 0x3 0x43 0x0 0x69 0x0 0x72 0x0 0x63 0x0 0x6c 0x0 0x65 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x3 0x3 0x9 0x4 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x18 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x3 0x3 0x9 0x4 0x18 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x18 0x3 0x43 0x0 0x49 0x0 0x52 0x0 0x33 0x0 0x31 0x0 0x35 0x0 0x20 0x0 0x50 0x0 0x49 0x0 0x43 0x0 0x43 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x0 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x3 0x0 0x0 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x4 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x0 0x3 0x0 0x0 0x4 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x4 0x3 0x9 0x4
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x1 0x3 0x9 0x4 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0xe 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x1 0x3 0x9 0x4 0xe 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0xe 0x3 0x43 0x0 0x69 0x0 0x72 0x0 0x63 0x0 0x6c 0x0 0x65 0x0
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x4 0x3 0x9 0x4 0x2 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x16 0x3
    SETUP , DATA0 , 0x0 , 0x1a ,  0x80 0x6 0x4 0x3 0x9 0x4 0x16 0x0
    IN , DATA1 , 0x0 , 0x1a ,  0x16 0x3 0x43 0x0 0x49 0x0 0x52 0x0 0x33 0x0 0x31 0x0 0x35 0x0 0x20 0x0 0x53 0x0 0x41 0x0 0x4d 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x65 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x81 0x0
    OUT , DATA0 , 0x4 , 0x1a ,  0x65 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    OUT , DATA1 , 0x4 , 0x1a ,  0x0 0x0
    IN , DATA0 , 0x3 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x1
    OUT , DATA0 , 0x4 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x1 0x0
    OUT , DATA1 , 0x4 , 0x1a ,  0x0 0x0
    IN , DATA1 , 0x3 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x1 0x1 0x0 0x1
    OUT , DATA0 , 0x4 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x2 0x0
    OUT , DATA1 , 0x4 , 0x1a ,  0x0 0x0
    IN , DATA0 , 0x3 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x2 0x42 0xfe 0x0
    IN , DATA0 , 0x5 , 0x1a ,  0x50 0x3
    OUT , DATA1 , 0x1 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x81 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x2 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x14 0x0 0x0 0x0 0x0 0x2 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x1 0x0 0x0 0x0 0x0 0x6a
    OUT , DATA1 , 0x1 , 0x1a ,  0x61 0x7 0x0 0x0 0x0 0x0 0x3 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x82 0x7 0x0 0x0 0x0 0x0 0x3 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x4 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x4 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x5 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x5 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x6 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x6 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x7 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x7 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x8 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x8 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x9 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x9 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0xa 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0xa 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0xb 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0xb 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0xc 0x4 0x0 0x0 0xff 0xca 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x6 0x0 0x0 0x0 0x0 0xc 0x0 0x81 0x0 0x83 0xd4 0x98 0xa1 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0xd 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0xd 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0xe 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x0 0x60 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0xe 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0xf 0x4 0x0 0x0 0xff 0xb0 0x0 0x1 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0xf 0x0 0x81 0x0 0x14 0x1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0x10 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xd3 0xf7 0xd3 0xf7 0xd3 0xf7
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x10 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0x11 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x7 0x60 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x11 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x12 0x4 0x0 0x0 0xff 0xb0 0x0 0x7 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x12 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x7f 0x7 0x88 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0x13 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x13 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0x14 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x0 0x60 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x14 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x15 0x4 0x0 0x0 0xff 0xb0 0x0 0x1 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x15 0x0 0x81 0x0 0x14 0x1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0x16 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x16 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0x17 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x0 0x60 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x17 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x18 0x4 0x0 0x0 0xff 0xb0 0x0 0x1 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x18 0x0 0x81 0x0 0x14 0x1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x3 0xe1 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0x19 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x19 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0x1a 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x0 0x60 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x1a 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xb 0x0 0x0 0x0 0x0 0x1b 0x4 0x0 0x0 0xff 0x82 0x0 0x0 0x6 0xd3 0xf7 0xd3 0xf7 0xd3 0xf7
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x1b 0x0 0x81 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xa 0x0 0x0 0x0 0x0 0x1c 0x4 0x0 0x0 0xff 0x86 0x0 0x0 0x5 0x1 0x0 0x4 0x60 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x2 0x0 0x0 0x0 0x0 0x1c 0x0 0x81 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x1d 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x1d 0x0 0x81 0x0 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    IN , DATA1 , 0x5 , 0x1a ,  0x50 0x2
    IN , DATA0 , 0x5 , 0x1a ,  0x50 0x3
    OUT , DATA0 , 0x1 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x1e 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x1e 0x0 0x81 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x1f 0x0 0x0 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x14 0x0 0x0 0x0 0x0 0x1f 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x3 0x0 0x0 0x0 0x0 0x68
    OUT , DATA0 , 0x1 , 0x1a ,  0x61 0x7 0x0 0x0 0x0 0x0 0x20 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x82 0x7 0x0 0x0 0x0 0x0 0x20 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x21 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x21 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x22 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x22 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x23 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x23 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x24 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x24 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x25 0x4 0x0 0x0 0xff 0xb0 0x0 0x0 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x25 0x0 0x81 0x0 0x4 0x76 0x67 0x9d 0xda 0x38 0x4d 0x81 0x2e 0x48 0x0 0x0 0xe1 0x10 0x12 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x26 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x26 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x27 0x4 0x0 0x0 0xff 0xb0 0x0 0x27 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x27 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xbd 0x4 0x0 0x0 0xff 0x0 0x5 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x28 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x28 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x29 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x29 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x2a 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x2a 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x2b 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x2b 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x2c 0x4 0x0 0x0 0xff 0xb0 0x0 0x2b 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x2c 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x76 0x67 0x9d 0xda 0x38 0x4d 0x81 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x2d 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x2d 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x2e 0x4 0x0 0x0 0xff 0xb0 0x0 0x8 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x2e 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x2f 0x4 0x0 0x0 0xff 0xb0 0x0 0xc 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x2f 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x30 0x4 0x0 0x0 0xff 0xb0 0x0 0x10 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x30 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x31 0x4 0x0 0x0 0xff 0xb0 0x0 0x14 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x31 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x32 0x4 0x0 0x0 0xff 0xb0 0x0 0x18 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x32 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x33 0x4 0x0 0x0 0xff 0xb0 0x0 0x1c 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x33 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x34 0x4 0x0 0x0 0xff 0xb0 0x0 0x20 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x34 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x35 0x4 0x0 0x0 0xff 0xb0 0x0 0x24 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x35 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    IN , DATA1 , 0x5 , 0x1a ,  0x50 0x2
    IN , DATA0 , 0x5 , 0x1a ,  0x50 0x3
    OUT , DATA0 , 0x1 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x36 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x36 0x0 0x81 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x37 0x0 0x0 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x14 0x0 0x0 0x0 0x0 0x37 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x3 0x0 0x0 0x0 0x0 0x68
    OUT , DATA0 , 0x1 , 0x1a ,  0x61 0x7 0x0 0x0 0x0 0x0 0x38 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x82 0x7 0x0 0x0 0x0 0x0 0x38 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x39 0x4 0x0 0x0 0xff 0xb0 0x0 0x0 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x39 0x0 0x81 0x0 0x4 0xc6 0x66 0x2c 0xda 0x38 0x4d 0x80 0x2f 0x48 0x0 0x0 0xe1 0x10 0x12 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x3a 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x3a 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x1 0x1d 0x54 0x2 0x65 0x6e 0x54 0x68 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x3b 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x3b 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x3c 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x3c 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x3d 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x3d 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x3e 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x3e 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x3f 0x4 0x0 0x0 0xff 0xb0 0x0 0x27 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x3f 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xbd 0x4 0x0 0x0 0xff 0x0 0x5 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x40 0x4 0x0 0x0 0xff 0xb0 0x0 0x2b 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x40 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0xc6 0x66 0x2c 0xda 0x38 0x4d 0x80 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x41 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x41 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x1 0x1d 0x54 0x2 0x65 0x6e 0x54 0x68 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x42 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x42 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x43 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x43 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x44 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x44 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x45 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x45 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x46 0x4 0x0 0x0 0xff 0xb0 0x0 0x8 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x46 0x0 0x81 0x0 0x69 0x73 0x20 0x69 0x73 0x20 0x61 0x20 0x74 0x65 0x73 0x74 0x20 0x6f 0x66 0x20 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x47 0x4 0x0 0x0 0xff 0xb0 0x0 0xc 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x47 0x0 0x81 0x0 0x74 0x68 0x65 0x20 0x43 0x68 0x69 0x70 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x48 0x4 0x0 0x0 0xff 0xb0 0x0 0x10 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x48 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x49 0x4 0x0 0x0 0xff 0xb0 0x0 0x14 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x49 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x4a 0x4 0x0 0x0 0xff 0xb0 0x0 0x18 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x4a 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x4b 0x4 0x0 0x0 0xff 0xb0 0x0 0x1c 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x4b 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x4c 0x4 0x0 0x0 0xff 0xb0 0x0 0x20 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x4c 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x68 0x65 0x6c 0x6c 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x4d 0x4 0x0 0x0 0xff 0xb0 0x0 0x24 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x4d 0x0 0x81 0x0 0x6f 0x20 0x77 0x6f 0x72 0x6c 0x64 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    IN , DATA1 , 0x5 , 0x1a ,  0x50 0x2
    IN , DATA0 , 0x5 , 0x1a ,  0x50 0x3
    OUT , DATA0 , 0x1 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x4e 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x4e 0x0 0x81 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x4f 0x0 0x0 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x14 0x0 0x0 0x0 0x0 0x4f 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x3 0x0 0x0 0x0 0x0 0x68
    OUT , DATA0 , 0x1 , 0x1a ,  0x61 0x7 0x0 0x0 0x0 0x0 0x50 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x82 0x7 0x0 0x0 0x0 0x0 0x50 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x51 0x4 0x0 0x0 0xff 0xb0 0x0 0x0 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x51 0x0 0x81 0x0 0x4 0xa9 0x60 0x45 0xda 0x38 0x4d 0x80 0x2f 0x48 0x0 0x0 0xe1 0x10 0x12 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x52 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x52 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x53 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x53 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x54 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x54 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x55 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x55 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x56 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x56 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x57 0x4 0x0 0x0 0xff 0xb0 0x0 0x27 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x57 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xbd 0x4 0x0 0x0 0xff 0x0 0x5 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x58 0x4 0x0 0x0 0xff 0xb0 0x0 0x2b 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x58 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0xa9 0x60 0x45 0xda 0x38 0x4d 0x80 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x59 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x59 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x5a 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x5a 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x5b 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x5b 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x5c 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x5c 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x5d 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x5d 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x5e 0x4 0x0 0x0 0xff 0xb0 0x0 0x8 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x5e 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x5f 0x4 0x0 0x0 0xff 0xb0 0x0 0xc 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x5f 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x60 0x4 0x0 0x0 0xff 0xb0 0x0 0x10 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x60 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x61 0x4 0x0 0x0 0xff 0xb0 0x0 0x14 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x61 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x62 0x4 0x0 0x0 0xff 0xb0 0x0 0x18 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x62 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x63 0x4 0x0 0x0 0xff 0xb0 0x0 0x1c 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x63 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x64 0x4 0x0 0x0 0xff 0xb0 0x0 0x20 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x64 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x65 0x4 0x0 0x0 0xff 0xb0 0x0 0x24 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x65 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    IN , DATA1 , 0x5 , 0x1a ,  0x50 0x2
    IN , DATA0 , 0x5 , 0x1a ,  0x50 0x3
    OUT , DATA0 , 0x1 , 0x1a ,  0x63 0x0 0x0 0x0 0x0 0x0 0x66 0x0 0x0 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x81 0x0 0x0 0x0 0x0 0x0 0x66 0x0 0x81 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x62 0x0 0x0 0x0 0x0 0x0 0x67 0x0 0x0 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x14 0x0 0x0 0x0 0x0 0x67 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x3 0x0 0x0 0x0 0x0 0x68
    OUT , DATA0 , 0x1 , 0x1a ,  0x61 0x7 0x0 0x0 0x0 0x0 0x68 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x82 0x7 0x0 0x0 0x0 0x0 0x68 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x69 0x4 0x0 0x0 0xff 0xb0 0x0 0x0 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x69 0x0 0x81 0x0 0x4 0x7e 0x60 0x92 0xda 0x38 0x4d 0x80 0x2f 0x48 0x0 0x0 0xe1 0x10 0x12 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x6a 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x6a 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x6b 0x4 0x0 0x0 0xff 0xb0 0x0 0x27 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x6b 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xbd 0x4 0x0 0x0 0xff 0x0 0x5 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x6c 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x6c 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x6d 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x6d 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x6e 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x6e 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x6f 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x6f 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x70 0x4 0x0 0x0 0xff 0xb0 0x0 0x2b 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x70 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x7e 0x60 0x92 0xda 0x38 0x4d 0x80 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x71 0x4 0x0 0x0 0xff 0xb0 0x0 0x4 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x71 0x0 0x81 0x0 0x1 0x3 0xa0 0xc 0x34 0x3 0x0 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x72 0x4 0x0 0x0 0xff 0xb0 0x0 0x8 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x72 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x10 0x0 0x0 0x0 0x0 0x73 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0xb 0xa0 0x0 0x0 0x3 0x97 0x43 0x49 0x44 0x5f 0x1 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x73 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x74 0x4 0x0 0x0 0x0 0xca 0x7f 0x68 0x0
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x74 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x75 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x8 0x0 0x0 0x10 0x0
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x75 0x40 0xff 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0xe 0x0 0x0 0x0 0x0 0x76 0x4 0x0 0x0 0x0 0xa4 0x4 0x0 0x9 0xa0 0x0 0x0 0x3 0x97 0x42 0x54 0x46 0x59
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x0 0x0 0x0 0x0 0x0 0x76 0x40 0xff 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x77 0x4 0x0 0x0 0xff 0xb0 0x0 0xc 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x77 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x78 0x4 0x0 0x0 0xff 0xb0 0x0 0x10 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x78 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x79 0x4 0x0 0x0 0xff 0xb0 0x0 0x14 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x79 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x7a 0x4 0x0 0x0 0xff 0xb0 0x0 0x18 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x7a 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x7b 0x4 0x0 0x0 0xff 0xb0 0x0 0x1c 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x7b 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA0 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x7c 0x4 0x0 0x0 0xff 0xb0 0x0 0x20 0x10
    IN , DATA0 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x7c 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    OUT , DATA1 , 0x1 , 0x1a ,  0x6f 0x5 0x0 0x0 0x0 0x0 0x7d 0x4 0x0 0x0 0xff 0xb0 0x0 0x24 0x10
    IN , DATA1 , 0x2 , 0x1a ,  0x80 0x12 0x0 0x0 0x0 0x0 0x7d 0x0 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x90 0x0
    IN , DATA1 , 0x5 , 0x1a ,  0x50 0x2
    So I sort of skipped ahead... Did not look for any special things yet set the SETUP... Many of those looked like read in descriptors of one form or another.
    And I show one of the first Output messages...

    Again I could be wrong, but looks like it is sending: OUT , DATA0 , 0x1 , 0x1a , 0x65 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    So if you look at the 0x65, and in the datasheet table 6.1 is PC_to_RDR_GetSlotStatus
    Which those 10 bytes are probably that message: P29

    Next line is an input: IN , DATA0 , 0x2 , 0x1a , 0x81 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x81 0x0
    So 0x81 at table 6.2-1 p48 RDR_to_PC_SlotStatus
    The format of the message is on p50
    so bStatus = 0x2 Not sure is this the Time Extension is requested???
    bError - 0x81

    But my strategy would be to walk though each of these OUT/IN pairs and setup sort of a state table or the like, and try to emulate what the windows driver was doing... For example I see a few outputs starting with cammand 0x61 Set parameters, which might be interesting.
    Likewise 0x62 Power On...

    Hope that helps

  13. #13
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    I Saved away the Excel document with the Windows capture stuff.

    Note I did a quick edit of CSV file before it and added the names of some of the commands/responses to the data.

    Like:
    Code:
    OUT 	 DATA0 			 PC_to_RDR_GetSlotStatus(0x65) 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    IN 	 DATA0 			 RDR_to_PC_SlotStatus(0x81) 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x81 0x0
    OUT 	 DATA0 			 PC_to_RDR_GetSlotStatus(0x65) 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    OUT 	 DATA1 			  0x0 0x0
    IN 	 DATA0 			 RDR_to_PC_SlotStatus(0x81) 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x1
    OUT 	 DATA0 			 PC_to_RDR_IccPowerOff(0x63) 0x0 0x0 0x0 0x0 0x0 0x1 0x0
    OUT 	 DATA1 			  0x0 0x0
    IN 	 DATA1 			 RDR_to_PC_SlotStatus(0x81) 0x0 0x0 0x0 0x0 0x0 0x1 0x1 0x0 0x1
    OUT 	 DATA0 			 PC_to_RDR_IccPowerOn(0x62) 0x0 0x0 0x0 0x0 0x0 0x2 0x0
    OUT 	 DATA1 			  0x0 0x0
    IN 	 DATA0 			 RDR_to_PC_DataBlock(0x80) 0x0 0x0 0x0 0x0 0x0 0x2 0x42 0xfe 0x0
    IN 	 DATA0 			  0x50 0x3
    OUT 	 DATA1 			 PC_to_RDR_IccPowerOff(0x63) 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    IN 	 DATA1 			 RDR_to_PC_SlotStatus(0x81) 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x81 0x0
    OUT 	 DATA0 			 PC_to_RDR_IccPowerOn(0x62) 0x0 0x0 0x0 0x0 0x0 0x2 0x0 0x0 0x0
    IN 	 DATA0 			 RDR_to_PC_DataBlock(0x80) 0x14 0x0 0x0 0x0 0x0 0x2 0x0 0x81 0x0 0x3b 0x8f 0x80 0x1 0x80 0x4f 0xc 0xa0 0x0 0x0 0x3 0x6 0x3 0x0 0x1 0x0 0x0 0x0 0x0 0x6a
    OUT 	 DATA1 			 PC_to_RDR_SetParameters(0x61) 0x7 0x0 0x0 0x0 0x0 0x3 0x1 0x0 0x0 0x11 0x10 0x0 0x4d 0x0 0x20 0x0
    IN 	 DATA1 			 RDR_to_PC_Parameters(0x82) 0x7 0x0 0x0 0x0 0x0 0x3 0x0 0x81 0x1 0x11 0x10 0x1 0x4d 0x0 0xfe 0x0
    Attached Files Attached Files

  14. #14
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    I believe you are right on track with that. I did get the interrupt receive working and can now detect when a card is in range and when it is removed!! So that is part 1 of my requirement. Woo Hoo!!!

    I just added a routine to send out the NotifySlotChange message and I am getting a response, but no idea what it means, as the document is kinda unclear on this. Need to dig in and see if I can figure out what it means.

    Right now, I am not following the Bulk-Out Format as I am not changing the bSeq code yet, Going to test that now, create a global to hold that value so all outbound messages will have a changing value.

    I know to read a card, the sequence of events described is to receive the Interrupt message of card change, then you send power off, power on, get slot status and then read the card data.

    I think we are very close to having the starting of support for CCID devices.

    Here is a Debug Trace so far:

    Seems I am getting a good DataBlock Message with bStatus = 00 and bError set to 0x81.

    Per page 55, is bmCommandStatus field is 0, the command processed without Error. Look like
    bError may be RFU (Reserved for Future Use?) when bStatus is 00.


    It's Exciting to get this far!!

    -Steve

    Descriptors Processes.
    Interfaces Found: 1
    EndPoints Found: 5
    Bulk Endpoint rx:2 tx:1 intr:5
    rx buffer size:64
    tx buffer size:64
    new_Pipe Endpoint:2, Direction:1, Maxlen:64, interval:0
    new_Pipe Endpoint:1, Direction:0, Maxlen:64, interval:0
    new_Pipe Endpoint:5, Direction:1, Maxlen:8, interval:10
    allocate_interrupt_pipe_bandwidth
    best_bandwidth = 3, at offset = 0, shift= 0
    >>CCID Claim Complete ======================
    *** Device CCID 31aa:3001 - connected ***
    *** manufacturer: Circle
    *** product: CIR315
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Inserted -> 50 03 00 00 00 00 00 00
    (CCID)>>PC_to_RDR_IccPowerOn -> 62 00 00 00 00 00 00 00 00 00
    *** Card Just Changed State to (3)
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 00 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Removed -> 50 02 00 00 00 00 00 00
    *** Card Just Changed State to (2)
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Inserted -> 50 03 00 00 00 00 00 00
    (CCID)>>PC_to_RDR_IccPowerOn -> 62 00 00 00 00 00 01 00 00 00
    *** Card Just Changed State to (3)
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 01 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Removed -> 50 02 00 00 00 00 00 00
    *** Card Just Changed State to (2)
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Inserted -> 50 03 00 00 00 00 00 00
    (CCID)>>PC_to_RDR_IccPowerOn -> 62 00 00 00 00 00 02 00 00 00
    *** Card Just Changed State to (3)
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 02 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
    (CCID)<<Interrupt: Got a RDR_to_PC_NotifySlotChange Message Slot 0: Card Removed -> 50 02 00 00 00 00 00 00
    *** Card Just Changed State to (2)

  15. #15
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    I think I have determined that the data in the abData section is defined as ATR (Answer to Reset), returned directly by the Card being read.

    I have several example of cards, Fobs and even Disney Magic Bands that I can read with this reader.

    Each seem to have a different Structure.

    The 2nd byte is the size of the abData Structure
    The 7th byte is the bSeq Number


    Cheap white Prox Looking cards from Amazon:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 14 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

    Laundry Tags from Tags to Go:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 15 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68

    Disney Magic Band:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 06 00 00 00 00 16 00 81 00 3B 81 80 01 80 80

    Cheap blue fob from Amazon:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 17 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

    Red Hello Hotel Key:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 18 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

    Travel Happy Hotel Key:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 19 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 26 00 00 00 00 4D

    Welcome Home Hotel Key:
    (CCID)<<RDR_To_PC_DataBlock Received -> 80 14 00 00 00 00 1A 00 81 00 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68

    My guess is that it somehow defines the card type and how much memory is on the card. I can't seem to find much info on the ATR structure.

  16. #16
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,543
    Looks like you are making progress...

    As for the actual data not much I can tell you other than the data structure as I am sure you know on P49...
    80 14 00 00 00 00 14 00 81 00 $$ 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
    MT = 80
    App data length = 0x14 or 20 bytes
    Slot = 0
    Seq = 0x14
    status = 0
    error = 0x81 (User defined)
    chain = 0
    App data: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

    As for what all of this data is??? Not sure...
    For some of the cheap cards, like: Cheap white cards from Amazon, something like:
    https://smile.amazon.com/Proximity-P.../dp/B06WLL29HM

    It sounds like maybe you can find data in places like:

    https://www.google.com/url?sa=t&rct=...C86nidxN-p3OJ8

    You might also get some information from the linux driver you linked to earlier to see if you can find out how it processes each card...

  17. #17
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    Actually, more like these cards.

    https://www.amazon.com/HiLetgo-Commu...s%2C83&sr=1-10

    I believe the ones you linked to are actual Prox Cards, this reader is a NFC reader. Different frequencies.

    Yea, I got the first part of the structure just fine, it was the App data part I am lacking as it depends on the card manf.

    I will contact Goto Tags on Tuesday and see if they can help out a bit. They will be our supplier for the Readers and Cards. Around 60 Readers and around 10K cards.

    Going to be really cool.

    -Steve

  18. #18
    Member shmorgan's Avatar
    Join Date
    Jul 2020
    Location
    Lawrenceville, Ga
    Posts
    23
    I have it reading the number off the cards, and am still guessing at some of the Card Structures, as they are different between cards.

    The one issue I'm seeing, if there is more going on on the Teensy 4.1. Other timers, network, web server, UDP, etc, I stop getting responses to request for data from the card. I still get the interrupt messages.

    One thing I have noticed that is different between the Teensy USB and Windows Driver USB is the Huge about of traffic on the UBS Interface on the Teensy.

    I have narrowed it down to one command and not sure what is causing the issue, may a retry loop of some kind?

    Here is the claim section to setup the six data pipes.

    If I un-comment out this line, the traffic on the USB bus is like 100X as much with a bunch of

    SYNC,PID IN, Address=0x01 Endpoint=0x02 CRC OK, EOP
    SYNC, PID NAK, EOP

    Code:
    queue_Data_Transfer(rxpipe2, rx1_2, rx_size2, this);
    Code:
    	//=====================================================
    	// Setup Interface 1 Pipes:
    	// Interrupt
    	// Bulk-In
    	// Bulk-Out
    	//=====================================================
    	
    	rxpipe1 = new_Pipe(dev, 2, rx_ep1 & 15, 1, rx_size1);
    	if (!rxpipe1) {
    		 return false;
    	}
    	rxpipe1->callback_function = rx_callback1;
    	queue_Data_Transfer(rxpipe1, rx1_1, rx_size1, this); // <<-- This Causing a huge amout of Traffic on the USB Port
    
    	txpipe1 = new_Pipe(dev, 2, tx_ep1, 0, tx_size1);
    	if (!txpipe1) {
    		 return false;
    	}
    	txpipe1->callback_function = tx_callback1;
    	
    	// Setup the Interrupt Pipe to handle the two Interrupt Messages
    	intrpipe1 = new_Pipe(dev, 3, intr_ep1, 1, 8, 0x0A);
    	if (!intrpipe1) {
    		 return false;
    	}
    	intrpipe1->callback_function = intr_callback1;
    	queue_Data_Transfer(intrpipe1, intrdatabuff1, sizeof(intrdatabuff1), this); // Start Listening for Interrupt Messages
    
    	//=====================================================
    	// Setup Interface 2 Pipes:
    	// Interrupt
    	// Bulk-In
    	// Bulk-Out
    	//=====================================================
    
    	rxpipe2 = new_Pipe(dev, 2, rx_ep2 & 15, 1, rx_size2);
    	if (!rxpipe2) {
    		 return false;
    	}
    	rxpipe2->callback_function = rx_callback2;
    	//queue_Data_Transfer(rxpipe2, rx1_2, rx_size2, this); // <<-- This Causing a huge amout of Traffic on the USB Port
    
    	txpipe2 = new_Pipe(dev, 2, tx_ep2, 0, tx_size2);
    	if (!txpipe2) {
    		 return false;
    	}
    	txpipe2->callback_function = tx_callback2;
    
    	// Setup the Interrupt Pipe to handle the two Interrupt Messages
    	intrpipe2 = new_Pipe(dev, 3, intr_ep2, 1, 8, 0x0A);
    	if (!intrpipe2) {
    		 return false;
    	}
    	intrpipe2->callback_function = intr_callback2;
    	queue_Data_Transfer(intrpipe2, intrdatabuff2, sizeof(intrdatabuff2), this); // Start Listening for Interrupt Messages

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •