Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1 lines (1 sloc) 19.7 KB
<html><head><title>Traktor F1 Teardown &amp; HID Protocol Analysis</title><style type="text/css">ol{margin:0;padding:0}.c10{max-width:468pt;background-color:#ffffff;padding:72pt 72pt 72pt 72pt}.c7{color:inherit;text-decoration:inherit}.c13{color:#1155cc;text-decoration:underline}.c14{font-size:12pt}.c0{direction:ltr}.c3{margin-left:36pt}.c11{background-color:#ffffff}.c5{text-indent:175.5pt}.c8{height:14pt}.c9{text-align:center}.c4{font-weight:bold}.c1{font-size:10pt}.c6{font-size:8pt}.c2{height:11pt}.c12{font-family:"Verdana"}.title{padding-top:24pt;line-height:1.15;text-align:left;color:#000000;font-size:36pt;font-family:"Arial";font-weight:bold;padding-bottom:6pt}.subtitle{padding-top:18pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:24pt;font-family:"Georgia";padding-bottom:4pt}li{color:#000000;font-size:11pt;font-family:"Arial"}p{color:#000000;font-size:11pt;margin:0;font-family:"Arial"}h1{padding-top:24pt;line-height:1.15;text-align:left;color:#000000;font-size:18pt;font-family:"Arial";font-weight:bold;padding-bottom:6pt}h2{padding-top:18pt;line-height:1.15;text-align:left;color:#000000;font-size:14pt;font-family:"Arial";font-weight:bold;padding-bottom:4pt}h3{padding-top:14pt;line-height:1.15;text-align:left;color:#666666;font-size:12pt;font-family:"Arial";font-weight:bold;padding-bottom:4pt}h4{padding-top:12pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:11pt;font-family:"Arial";padding-bottom:2pt}h5{padding-top:11pt;line-height:1.15;text-align:left;color:#666666;font-size:10pt;font-family:"Arial";font-weight:bold;padding-bottom:2pt}h6{padding-top:10pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:10pt;font-family:"Arial";padding-bottom:2pt}</style></head><body class="c10"><p class="c0 title"><a name="h.ji76l7nguqpf"></a><span>Traktor F1 Teardown &amp; HID Protocol Analysis</span></p><h1 class="c0"><a name="h.kf5pu9njpb99"></a><span>HID Analysis</span></h1><p class="c0"><span class="c1">One interesting gotcha is that the F1 is a High Speed (480 Mbs) device. Unfortunately that means the &nbsp;cheaper hardware analyzers (&lt;1000 USD) will not work. </span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">USBlyzer is a software USB sniffing solution that has a free 30 day trial and is really easy to use so if anyone wants to sniff USB by themselves it can be found here. Once expired the 30 day trial can be circumvented by changing your calendar.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c13"><a class="c7" href="http://www.usblyzer.com/download.htm">http://www.usblyzer.com/download.htm</a></span></p><p class="c0 c2"><span class="c4 c14"></span></p><p class="c0"><span class="c1">I don&rsquo;t think the fact that the F1 is a high speed device will prevent us from emulating it using a full speed microcontroller.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">This is just a basic analysis, I haven&#39;t delved too deeply into the initial configuration of the device. However at this stage it does not appear there is any special handshaking beyond declaring a serial number. </span></p><hr><h2 class="c0"><a name="h.tudel4z8wybi"></a><span>Output Report</span></h2><p class="c0"><span class="c1">The LEDs of the F1 are set using a single output report with a length of 81 Bytes. All animations including blinking states, and the white line animation displayed when changing banks are controlled by the software. That is a blinking led is turned on by the software, then toggled by the software at a certain interval, rather than being put into a blinking state where the strobing is controlled purely by the F1 hardware.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">All leds appear to have some level of brightness control, Traktor allows you to vary the &ldquo;On State Brightness&rdquo; and &ldquo;Dim State Percentage&rdquo; levels using the configuration menu. All the values listed in this document are for an On state brightness of 100%, and a Dim state Percentage of 0%.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c4 c1">Byte 01 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="c1">&nbsp;ID (= 80)</span></p><p class="c0 c3"><span class="c4 c1">Byte 02 .. 17</span><span class="c1">&nbsp; &nbsp; &nbsp; 7-segment displays</span></p><p class="c0 c3"><span class="c4 c1">Byte 18 .. 25 </span><span class="c1">&nbsp; &nbsp; &nbsp;Small Function Keys</span></p><p class="c0 c3"><span class="c4 c1">Byte 26 .. 73 </span><span class="c1">&nbsp; &nbsp; &nbsp;RGB Pads</span></p><p class="c0 c3"><span class="c4 c1">Byte 74 .. 81 </span><span class="c1">&nbsp; &nbsp; &nbsp;Stop Keys</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">The first byte is always 80. </span></p><p class="c0 c2"><span class="c1"></span></p><h3 class="c0"><a name="h.8jba6gwen41s"></a><span>Bytes 02 thru 17&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7 Segment Displays </span></h3><p class="c0"><span class="c1">The next 16 bytes control the 7 segment displays, each byte represents one of the segments. A value of 64 is used when that segment is on, and a zero value when it is off. Bytes 2 - 9 control the right hand digit, and bytes 10 - 17 control the left digit.</span></p><p class="c0"><img height="225" src="images/image00.jpg" width="225"></p><p class="c0"><span class="c1">The segments are addressed as follows. </span></p><p class="c0"><span class="c1">Note that the DP actually appears top left of the digit.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c5"><span class="c6">Byte 1: DP</span></p><p class="c0 c5"><span class="c6">Byte 2: Segment G</span></p><p class="c0 c5"><span class="c6">Byte 3: Segment C</span></p><p class="c0 c5"><span class="c6">Byte 4: Segment B</span></p><p class="c0 c5"><span class="c6">Byte 5: Segment A</span></p><p class="c0 c5"><span class="c6">Byte 6: Segment F</span></p><p class="c0 c5"><span class="c6">Byte 7: Segment E</span></p><p class="c0 c5"><span class="c6">Byte 8: Segment D</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c9 c2"><span class="c1"></span></p><p class="c0 c9 c2"><span class="c1"></span></p><p class="c0 c2 c9"><span class="c1"></span></p><h3 class="c0"><a name="h.a309z2q3gp50"></a><span>Bytes 18 thru 25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Small Function Keys</span></h3><p class="c0"><span class="c1">The next 8 bytes control the brightness of the 8 small functions keys located near the middle of the device.</span></p><p class="c0"><span class="c1">The full brightness value is 7F, off is 0.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c4 c1">Byte 1</span><span class="c1">&nbsp; &nbsp; &nbsp;Browse</span></p><p class="c0 c3"><span class="c4 c1">Byte 2 </span><span class="c1">&nbsp; &nbsp; Size</span></p><p class="c0 c3"><span class="c4 c1">Byte 3</span><span class="c1">&nbsp; &nbsp; &nbsp;Type</span></p><p class="c0 c3"><span class="c4 c1">Byte 4</span><span class="c1">&nbsp; &nbsp; &nbsp;Reverse</span></p><p class="c0 c3"><span class="c4 c1">Byte 5</span><span class="c1">&nbsp; &nbsp; &nbsp;Shift</span></p><p class="c0 c3"><span class="c4 c1">Byte 6</span><span class="c1">&nbsp; &nbsp; &nbsp;Capture</span></p><p class="c0 c3"><span class="c4 c1">Byte 7</span><span class="c1">&nbsp; &nbsp; &nbsp;Quant</span></p><p class="c0 c3"><span class="c1 c4">Byte 8</span><span class="c1">&nbsp; &nbsp; &nbsp;Sync</span></p><p class="c0 c2"><span class="c1"></span></p><h3 class="c0"><a name="h.6fsr86ccybdk"></a><span>Bytes 26 thru 73 &nbsp; &nbsp; RGB Pads</span></h3><p class="c0"><span class="c1">The next 48 bytes are used to set the color of each of the 16 pads. 3 bytes are used for the RGB color settings of each pad are arranged in BRG order: Blue, Red, Green.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c4 c1">Byte 1</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #1 Blue </span></p><p class="c0 c3"><span class="c4 c1">Byte 2</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #1 Red</span></p><p class="c0 c3"><span class="c4 c1">Byte 3</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #1 Green</span></p><p class="c0 c3"><span class="c4 c1">Byte 4</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #2 Blue </span></p><p class="c0 c3"><span class="c4 c1">Byte 5</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #2 Red</span></p><p class="c0 c3"><span class="c4 c1">Byte 6</span><span class="c1">&nbsp; &nbsp; &nbsp;Pad #2 Green</span></p><p class="c0 c3"><span class="c4 c1">&hellip;</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">White is sent as 73 73 73. Each color uses a 7 bit resolution, min (off) = 0, max (100% on) = 0x7D</span></p><p class="c0"><span class="c1">I will add further information on the color settings later. </span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">There is no buffering of the color states of other banks, the color information is fully refreshed from the host in response a bank change key press.</span></p><p class="c0 c2"><span class="c1"></span></p><h3 class="c0"><a name="h.bp65adfw5543"></a><span>Bytes 74 thru 81 &nbsp; &nbsp; Stop Keys</span></h3><p class="c0"><span class="c1">The next 8 bytes are used to control the brightness of the 4 stop keys at the bottom of the device. Each of these keys uses two leds to provide sufficient illumination along its length, it appears you can control these LEDs separately as each key uses two control bytes. &nbsp;</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c4 c1">Byte 74</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 4 Stop Key LED 1 </span></p><p class="c0 c3"><span class="c4 c1">Byte 75</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 4 Stop Key LED 2</span></p><p class="c0 c3"><span class="c4 c1">Byte 76</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 3 Stop Key LED 1 </span></p><p class="c0 c3"><span class="c4 c1">Byte 77</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 3 Stop Key LED 2</span></p><p class="c0 c3"><span class="c4 c1">Byte 78</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 2 Stop Key LED 1 </span></p><p class="c0 c3"><span class="c4 c1">Byte 79</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 2 Stop Key LED 2</span></p><p class="c0 c3"><span class="c4 c1">Byte 80</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 1 Stop Key LED 1 </span></p><p class="c0 c3"><span class="c4 c1">Byte 81</span><span class="c1">&nbsp; &nbsp; &nbsp;Column 1 Stop Key LED 2</span></p><h2 class="c0 c8"><a name="h.9k5gte4u9vfk"></a></h2><hr><h2 class="c0"><a name="h.f9bk23rok6t1"></a><span>Input Report</span></h2><p class="c0"><span class="c1">The state of all input controls is communicated via a single input report of 22 Bytes</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">The first byte is the version number, currently 0x01</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">The next two byte contain the bit encoded boolean state of the pads, true = pressed.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 7 (MSB) = Pad 1</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 2</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 3</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 4</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 5</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 6</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 7</span></p><p class="c0 c3"><span class="c1">Byte 2 Bit 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 8</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 7 (MSB) = Pad 9</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 10</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 11</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 12</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 13</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 14</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 15</span></p><p class="c0 c3"><span class="c1">Byte 3 Bit 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Pad 16</span></p><p class="c0 c2"><span class="c4 c1"></span></p><p class="c0"><span class="c1">The boolean state for the other buttons are sent via Byte 4 &amp; Byte 5.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 7 (MSB) = Shift Key</span></p><p class="c0 c3"><span class="c1">Byte 4 But 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = Reverse Key</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Type Key</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Size Key</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Browse Key</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=</span></p><p class="c0 c3"><span class="c1">Byte 4 Bit 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 7 (MSB) = Kill Key 1</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Kill Key 2</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Kill Key 3</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Kill Key 4</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Sync Key</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Quant Key</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= Capture Key</span></p><p class="c0 c3"><span class="c1">Byte 5 Bit 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=</span></p><p class="c0 c2"><span class="c1"></span></p><h3 class="c0"><a name="h.yckbdzntt07v"></a><span>Rotary Encoder</span></h3><p class="c0"><span class="c1">The 6th byte contains a wrapped 0..255 value for the rotary encoder. On reset this value is 0, each clockwise step increments the value by 1 up to a maximum of 0xFF (255). Incrementing past 255 results in wrap around to 0 and decrementing through 0 wraps to 255.</span></p><p class="c0 c2"><span class="c4 c1"></span></p><h3 class="c0"><a name="h.hymm5ry2m73x"></a><span>Analog Inputs</span></h3><p class="c0"><span class="c1">The analog inputs are sent using bytes 7 thru 22. Each analog input uses two bytes in little endian format [TODO: check this] The first byte gives the least significant 8 bits of resolution, the second byte contains the most significant 4 bits of the ADC in the lower 4 bits.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">ie; a decimal value of 4000, usually represented as 0x0FA0 in hexadecimal will be sent as the byte stream &nbsp;{0xA0, 0x0F}</span></p><p class="c0 c2"><span class="c4 c1"></span></p><hr><h1 class="c0"><a name="h.dmni2seozk5i"></a><span>Teardown</span></h1><p class="c0"><span class="c1">Construction style is the same as the X1, using the same back panel plastic, with a modified chassis and aluminium front panel.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">To disassemble remove 8 screws from the back of the unit, including one covered by a &ldquo;Warranty Void if Removed&rdquo; sticker.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">Remove the 4 potentiometer caps along with the 4 fader caps and 1 rotary encoder cap. </span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">Now remove the 3 screws which fasten the PCB to the chassis.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">The PCB can now be removed from chassis along with the silicon switch actuators, and light mask.</span></p><p class="c0 c2"><span class="c1"></span></p><h2 class="c0"><a name="h.kk51c61l7q84"></a><span>Notable Mechanical Design Features</span></h2><p class="c0"><span class="c1">The F1 uses the more expensive high retention force USB connector from</span><span class="c4 c1">&nbsp;Kycon</span><span class="c1">. This connector has been used on the Audio 4, Audio 6, Audio 8, Audio 10, S2, &amp; S4 devices but not on the X1 or Audio 2.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">Linear Potentiometer parts are made by </span><span class="c4 c1">Alpha Taiwan</span><span class="c1">&nbsp;and use a felt dust cover which gives them a slightly coarse feel.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">Rotary Potentiometer parts are made by</span><span class="c4 c1">&nbsp;Alps</span><span class="c1">, same part used across all Traktor products.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">RGB Pad design is uses </span><span class="c4 c1">PLCC-4 Package RGB leds</span><span class="c1">&nbsp;placed within contact housing, similar to how many back-lit tact switches are constructed, but without a lens cap or housing. The switch bodies &amp; LED pins are SMT.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">The silicon actuators are formed by a thin sheet of silicon with solid extrusions on one side forming the pad/ dispersion element, and two thin extrusions on the other which contact the PCB when the switch is fully depressed, protecting the contact against excessive force. </span></p><p class="c0 c2"><span class="c1"></span></p><h2 class="c0"><a name="h.a7z7durj5ez9"></a><span>Notable Electronic Design Features</span></h2><p class="c0"><span class="c1">The F1 uses an </span><span class="c4 c1">XMOS L1</span><span class="c1">&nbsp;128 pin microcontroller. NI have used the XMOS multi channel audio reference design across the S2, S4, Audio 6, and Audio 10 devices, and now appear to be using this part on devices with no audio capability. Given its multi threading capabilities it is useful for implementing an RGB display without needing expensive driver chips.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">ADC conversion is performed by a National Semiconductor </span><span class="c4 c1 c11">ADC78H90CIMT</span><span class="c1">&nbsp;8 Channel SPI ADC device.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">Buttons are read using </span><span class="c4 c1">74HC165</span><span class="c1">&nbsp;parallel in/serial out shift registers</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0"><span class="c1">LEDs are driven via </span><span class="c4 c1">74HC595</span><span class="c1">.</span></p><p class="c0 c2"><span class="c1"></span></p><p class="c0 c2"><span class="c1"></span></p></body></html>