{"id":423,"date":"2017-03-27T17:58:11","date_gmt":"2017-03-27T21:58:11","guid":{"rendered":"http:\/\/www.talariavr.com\/blog\/?p=423"},"modified":"2017-11-06T19:59:06","modified_gmt":"2017-11-07T00:59:06","slug":"vive-tracker-initial-documentation","status":"publish","type":"post","link":"http:\/\/www.talariavr.com\/blog\/vive-tracker-initial-documentation\/","title":{"rendered":"Vive Tracker &#8211; (Relatively) Maintained Documentation"},"content":{"rendered":"<p style=\"text-align: center;\"><span style=\"font-size: 18pt;\"><strong><span style=\"color: #00ccff;\"><span style=\"font-family: helvetica, arial, sans-serif;\">* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0<\/span><span style=\"font-family: helvetica, arial, sans-serif;\">* \u00a0* \u00a0* \u00a0* \u00a0*<\/span><\/span><span style=\"font-family: helvetica, arial, sans-serif; color: #00ccff;\"><br \/>\n<\/span><\/strong><\/span><span style=\"font-size: 18pt;\"><strong><span style=\"font-family: helvetica, arial, sans-serif;\">REDDIT USER \/U\/MATZMANN666 HAS CREATED AN ARDUINO LIBRARY, SEE BOTTOM OF POST FOR MORE INFORMATION<\/span><span style=\"font-family: helvetica, arial, sans-serif; color: #00ccff;\"><br \/>\n<\/span><span style=\"color: #00ccff;\"><span style=\"font-family: helvetica, arial, sans-serif;\"><span style=\"font-family: helvetica, arial, sans-serif;\">* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0<\/span><\/span><span style=\"font-family: helvetica, arial, sans-serif;\"><span style=\"font-family: helvetica, arial, sans-serif;\">* \u00a0* \u00a0* \u00a0* \u00a0*<\/span><\/span><\/span><span style=\"font-family: helvetica, arial, sans-serif; color: #00ccff;\"><br \/>\n<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\"><a href=\"http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-446\" src=\"http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking.png\" width=\"960\" height=\"462\" srcset=\"http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking.png 1920w, http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking-300x144.png 300w, http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking-768x370.png 768w, http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking-1024x493.png 1024w, http:\/\/www.talariavr.com\/blog\/wp-content\/uploads\/2017\/03\/TrackerWorking-561x270.png 561w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><br \/>\nHi friends &#8211; I&#8217;m maintaining this post as I continue working with the Vive Tracker, and will be doing my best to keep up with HTC&#8217;s evolving firmware and capabilities.\u00a0 I focus primarily on USB control of the Tracker, and do not go into interfacing with the pogo pins.\u00a0 If this is something you all request documentation for, then I&#8217;ll take the time to add it.<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\">Please note that if for whatever reason you need to reference my original documentation from March of 2017, it will be archived at <a href=\"http:\/\/www.talariavr.com\/blog\/vive-tracker-documentation-archive\"><span style=\"text-decoration: underline; color: #00ccff;\">this address<\/span><\/a>.\u00a0 Let&#8217;s get into it, shall we?<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\">Below is various levels of abstraction on how I altered the Vive Tracker&#8217;s inputs. \u00a0<span style=\"text-decoration: underline;\">Documentation on this page is relevant as of 26 October, 2017<\/span>. \u00a0I started my programming on a breadboarded Atmel AVR (the family of microcontrollers commonly used in <a href=\"http:\/\/arduino.cc\"><span style=\"text-decoration: underline; color: #00ccff;\">Arduino<\/span><\/a>) <a href=\"http:\/\/www.microchip.com\/wwwproducts\/en\/AT90USB647\"><span style=\"text-decoration: underline; color: #00ccff;\">AT90USB647<\/span><\/a> chip at 8 MHz and 3.3V with an external 5V power supply to the USB lines. \u00a0It should be noted that <strong>the Vive Tracker requires a 5V source in order for USB\u00a0communication to work<\/strong>. \u00a0Later, I designed a PCB with the same chip, and now a 3.3-to-5V boost converter to control the Tracker in one condensed circuit. \u00a0Additionally worth noting, <strong>the Tracker does not externally supply\u00a0power<\/strong>, which means accessory makers at this time will need to implement a secondary battery into their USB-driving designs. \u00a0It would appear that developers can permit the Tracker to charge off the accessory while in-communication over USB, but I have yet to confirm this feature.<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\"><span style=\"font-size: 18pt;\"><br \/>\n<\/span><span style=\"font-size: 18pt;\"><strong>1. The Feature Report<\/strong><\/span><br \/>\n<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">See pages 50 &#8211; 52 (.pdf\u00a0file pages 60 &#8211; 62) of the <a href=\"http:\/\/www.usb.org\/developers\/hidpage\/HID1_11.pdf\"><span style=\"text-decoration: underline; color: #00ccff;\">USB HID Specification 1.11<\/span><\/a>\u00a0for reference on HID Set_Report requests. \u00a0Referencing pages 26 &#8211; 29 (.pdf file pages 29 &#8211; 32) of the <a href=\"https:\/\/dl.vive.com\/Tracker\/Guideline\/HTC_Vive_Tracker_Developer_Guidelines_v1.5.pdf\"><span style=\"text-decoration: underline;\"><span style=\"color: #00ccff; text-decoration: underline;\">HTC Vive Tracker Developer Guidlines v1.5<\/span><\/span><\/a>, this is the format for shipping out an HID Feature Report with values specific to the Vive Tracker payloads:<\/span><\/p>\n<div><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>bmRequestType<\/em>: 0b00100001 \u00a0 \u00a0 \u00a0\/\/ See Page 50 of HID Spec for bit descriptions<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>bRequest<\/em>: \u00a0 \u00a0 \u00a00x09 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ Value for SET_REPORT<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wValue<\/em>: \u00a0 \u00a0 \u00a0 \u00a00x0300 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ MSB=Report Type (0x03, value for Feature report)<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ LSB=Report ID (0x00, report IDs not used &#8211; Page 51)<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wIndex<\/em>: \u00a0 \u00a0 \u00a0 \u00a02 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ HTC&#8217;s selected Descriptor Index (I think)<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wLength<\/em>: \u00a0 \u00a0 \u00a0 sizeof(payload) \/\/ Size in bytes of the coming payload (<em>Data<\/em> field, next line)<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>Data<\/em>: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{Data_Set_ADDR, Length_of_Following_Data, bData[0], bData[1], &#8230; , bData[n]}<\/span><\/span><\/div>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><br \/>\nMSB = Most Significant Byte, LSB = Least Significant Byte.<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">Below is an abstracted example for defining an accessory\u00a0connection and sending a payload declaring the trigger held down halfway and menu button pressed (more on defining bytes below).<\/span><\/p>\n<div><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>bmRequestType<\/em>: 0b00100001<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>bRequest<\/em>: \u00a0 \u00a0 \u00a00x09<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wValue<\/em>: \u00a0 \u00a0 \u00a0 \u00a00x0300<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wIndex<\/em>: \u00a0 \u00a0 \u00a0 \u00a02<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>wLength<\/em>:\u00a0 \u00a0 \u00a0 \u00a06<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>Data<\/em>: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{0xB3, 3, 0x03, 0x00, 0x00, 0}<\/span><\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><em>bmRequestType<\/em>: 0b00100001<br \/>\n<em>bRequest<\/em>: \u00a0 \u00a0 \u00a00x09<br \/>\n<em>wValue<\/em>: \u00a0 \u00a0 \u00a0 \u00a00x0300<br \/>\n<em>wIndex<\/em>: \u00a0 \u00a0 \u00a0 \u00a02<br \/>\n<em>wLength<\/em>: \u00a0 \u00a0 \u00a0\u00a012<br \/>\n<em>Data<\/em>: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{0xB4, 10, 0x00, 0b00000100, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00}<br \/>\n<\/span><\/span><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\"><span style=\"font-size: 18pt;\"><strong><br \/>\n2. Byte Definitions<\/strong><\/span><br \/>\n<\/span><\/div>\n<p><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\">The following are HTC&#8217;s byte definitions, as outlined by their developer guidelines linked above.\u00a0 I also add my own notes on the usefulness of various bytes (or lack-thereof).<\/span><\/p>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">ADDRESS: 0xB3<br \/>\nUPCOMING_DATA_COUNT (4)<br \/>\n0 &#8211; HOST_TYPE (1=PC, 2=PHONE, 3=ACCESSORY)<br \/>\n1 &#8211; RESERVED (CHARGE ENABLE, not sure if interfacing with this byte has any visible function)<br \/>\n2 &#8211; RESERVED (OS TYPE, TBD)<\/span><\/span><\/div>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">3 &#8211; LPF\u00a0(Low Pass Filter configuration, 0=184Hz, 1=5Hz, 2=10Hz, 3=20Hz. \u00a0Lower frequency configurations ignore slower vibrations of the Tracker IMU, such as from accessory haptics)<br \/>\n{ 0xB3, 4, HOST_TYPE, RESERVED, RESERVED, LPF }<\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">ADDRESS: 0xB4<br \/>\nUPCOMING_DATA_COUNT (10)<br \/>\n0 &#8211; NO VISIBLE FUNCTION (TAG INDEX)<br \/>\n1 &#8211; BUTTONS:<br \/>\n1.0 &#8211; TRIGGER (Following a SteamVR driver update, this value is independent of the analogue trigger byte)<br \/>\n1.1 &#8211; GRIP<br \/>\n1.2 &#8211; APPLICATION MENU<br \/>\n1.3 &#8211; SYSTEM (Yes, it will open the dashboard)<br \/>\n1.4 &#8211; TOUCHPAD (Following the same SteamVR driver update, this bit no longer requires TOUCHPAD_CONTACT to be high)<br \/>\n1.5 &#8211; TOUCHPAD_CONTACT (Does not require touchpad axis values)<br \/>\n1.6 &#8211; RESERVED (But whyyy?)<br \/>\n1.7 &#8211; RESERVED<br \/>\n2 &#8211; TOUCHPAD_X_LSB (LSB = Least Significant Byte)<br \/>\n3 &#8211; TOUCHPAD_X_MSB (MSB = Most Significant Byte)<br \/>\n4 &#8211; TOUCHPAD_Y_LSB (LSB)<br \/>\n5 &#8211; TOUCHPAD_Y_MSB (MSB)<br \/>\n6 &#8211; NO VISIBLE FUNCTION (Technically TRIGGER_LSB, this byte is irrelevant because SteamVR only accepts an 8-bit analogue trigger value and therefore this byte is ignored)<br \/>\n7 &#8211; TRIGGER (Technically TRIGGER_MSB, values remain unaffected by TRIGGER button)<br \/>\n8 &#8211; RESERVED (Technically BATTERY_LSB, we don&#8217;t have access to these bytes)<br \/>\n9 &#8211; RESERVED (Technically BATTERY_MSB)<br \/>\n{ 0xB4, 10, 0x00, BUTTONS, PAD_X_LSB, PAD_X_MSB, PAD_Y_LSB, PAD_Y_MSB, 0x00, TRIGGER, RESERVED, RESERVED }<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\"><span style=\"font-size: 18pt;\"><br \/>\n<\/span><span style=\"font-size: 18pt;\"><strong>3. Library Interfacing<\/strong><\/span><br \/>\n<\/span><\/div>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">USB protocols are not something you can just throw together in an afternoon &#8211; you&#8217;re going to want a library to handle all that overhead\u00a0(Trust me, this is coming from someone that would rather write their own scripts for basic math functions so everything is in my control &#8211; you&#8217;re going to want that library).\u00a0 For the code snippet\u00a0below,\u00a0I used the\u00a0<span style=\"text-decoration: underline; color: #00ccff;\"><a style=\"color: #00ccff; text-decoration: underline;\" href=\"http:\/\/www.fourwalledcubicle.com\/LUFA.php\" target=\"_blank\" rel=\"noopener\">Lightweight USB Framework for AVRs (LUFA)\u00a0library by Dean Camera<\/a><\/span>, building upon the <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">GenericHIDHost<\/span> demo found in <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">&#8230;\\LUFA 151115\\Demos\\Host\\LowLevel\\GenericHIDHost<\/span>; coded in <span style=\"font-size: 10pt; font-family: terminal, monaco, monospace;\">C++<\/span>.<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">First I edited the <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">makefile<\/span> to reflect my chip. \u00a0<a href=\"http:\/\/codeandlife.com\/2016\/01\/30\/usb-mouse-with-atmega32u4-pro-micro-clone-and-lufa\/\"><span style=\"text-decoration: underline;\"><span style=\"color: #00ccff; text-decoration: underline;\">This blog post<\/span><\/span><\/a> by Joonas Pihlajamaa really helped me get started. \u00a0Below are the values I changed:<\/span><\/p>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">\u00a0 MCU = at90usb647<br \/>\nBOARD = USER<br \/>\nF_CPU = 8000000<\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">I then went into <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">GenericHIDHost.h<\/span> and removed any references to on-board LEDs or a serial output monitor, as my custom board did not have a definitions file for these things. \u00a0Then within <span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt;\">GenericHIDHost.c<\/span>, this was the main function to perform the same task that was described at the end of <b>Section 1<\/b> of this post:<\/span><\/p>\n<div><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">int main(void)<\/span><br \/>\n<span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">{<br \/>\n. \u00a0 SetupHardware();<br \/>\n. \u00a0 GlobalInterruptEnable();<br \/>\n.<br \/>\n<\/span><\/span><\/span><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">. \u00a0 for(;;)<br \/>\n. \u00a0 {<br \/>\n. \u00a0 \u00a0 \u00a0 uint8_t\u00a0payload0xB3[6] = {0xB3, 3, 0x03, 0x00, 0x00, 0};<br \/>\n. \u00a0 \u00a0 \u00a0 uint8_t payload0xB4[12] = {0xB4, 10, 0x00, 1 &lt;&lt; 2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00};<br \/>\n.<br \/>\n. \u00a0 \u00a0 \u00a0 WriteNextReport(payload0xB3, 0x00, REPORT_TYPE_FEATURE, 6);<br \/>\n. \u00a0 \u00a0 \u00a0 USB_USBTask();<br \/>\n.<br \/>\n. \u00a0 \u00a0 \u00a0 WriteNextReport(payload0xB4, 0x00, REPORT_TYPE_FEATURE, 12);<br \/>\n. \u00a0 \u00a0 \u00a0 USB_USBTask();<br \/>\n. \u00a0 }<br \/>\n}<\/span><\/span><\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">This is the bare-bones firmware I needed on my AT90USB647 to get the Tracker to work reliably. \u00a0I can assure you it is far from clean. \u00a0For example, you do not need to send the 0xB3 payload every time you update data; only once after the initial device enumeration handshake completes.<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">The other code I had to change was in the LUFA Library was in the function <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">WriteNextReport<\/span>\u00a0at the end of <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">GenericHIDHost.c<\/span>. \u00a0Apparently <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><i>wIndex<\/i><\/span>\u00a0was set to <span style=\"font-size: 10pt; font-family: terminal, monaco, monospace;\">0<\/span> by default, however HTC&#8217;s Vive Tracker requires <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><i>wIndex<\/i><\/span> to be <span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">2<\/span>\u00a0(this was the missing puzzle piece for weeks when the Tracker was first released! \u00a0Change one number and everything finally works; what a feeling)<\/span><\/p>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">USB_ControlRequest = (USB_Request_Header_t)<br \/>\n{<br \/>\n.bmRequestType = 0b00100001,<br \/>\n.bRequest \u00a0 \u00a0 \u00a0= 0x09,<br \/>\n.wValue \u00a0 \u00a0 \u00a0 \u00a0= 0x0300,<br \/>\n.wIndex \u00a0 \u00a0 \u00a0 \u00a0= 2,<br \/>\n.wLength \u00a0 \u00a0 \u00a0 = ReportLength,<br \/>\n};<br \/>\n<\/span><span style=\"font-size: 12pt; font-family: helvetica, arial, sans-serif;\"><span style=\"font-size: 18pt;\"><br \/>\n<\/span><span style=\"font-size: 18pt;\"><strong>4. A Low(er)-Level Look<\/strong><\/span><br \/>\n<\/span><\/div>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">Solely from picking apart Dean&#8217;s library, these would seem to be the primary steps that need to be performed in order to successfully communicate with the Vive Tracker:<\/span><\/p>\n<div><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\"><span style=\"font-family: terminal, monaco, monospace; font-size: 10pt;\">&#8211; Initiate USB as host<br \/>\n&#8211; Enumerate the attached USB device<br \/>\n&#8211; Read and process the device&#8217;s configuration descriptor<br \/>\n&#8211; Set the device to its initial configuration (Dean remarks that it&#8217;s unlikely to have more than one configuration)<br \/>\n&gt; \u00a0 bmRequestType: 0b10000000<br \/>\n&gt; \u00a0 bRequest: 0x09<br \/>\n&gt; \u00a0 wValue: 1<br \/>\n&gt; \u00a0 wIndex: 0<br \/>\n&gt; \u00a0 wLength: 0<br \/>\n&gt; \u00a0 Data: NULL<br \/>\n&#8211; At this stage, all the setup is now complete!<br \/>\n&#8211; To send a report:<br \/>\n&gt; \u00a0 Prepare the bus\/pipe<br \/>\n&gt; \u00a0 Feed it the header (bmRequestType, bRequest, wValue, etc.)<br \/>\n&gt; \u00a0 Feed it the datastream (starting with {0xB_, etc.} )<br \/>\n&gt; \u00a0 Return the bus\/pipe to its initial state<br \/>\n&#8211; Perform any other needed USB host tasks<\/span><\/span><\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">This section isn&#8217;t 100% solidified for me, simply because Dean did such a great job at constructing this library that once I was able to format the payload correctly for the Tracker, I had no more\u00a0need to dive into the low-level for troubleshooting. \u00a0If you&#8217;re using AVRs for your microcontroller, I highly\u00a0recommend Dean&#8217;s LUFA library!<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">I am by no means proficient in USB HID communications, but if you run into any road blocks then feel free to reach out to me, perhaps I&#8217;ll be able to offer some advice as a result of my own troubleshooting.<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">I made note of this at the top &#8211; <del>if you think that it would be valuable for me to develop this into an library for USB Host-capable Arduino boards, please comment your interest below. \u00a0It could definitely help out if you explain what you would hope to use said library to do with the Vive Tracker.<\/del><\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">EDIT: Reddit user <span style=\"text-decoration: underline;\"><span style=\"color: #00ccff; text-decoration: underline;\"><a style=\"color: #00ccff; text-decoration: underline;\" href=\"https:\/\/www.reddit.com\/user\/matzman666\">\/u\/matzmann666<\/a><\/span><\/span>\u00a0has wonderfully created a library for the Arduino Due ARM-based microcontroller! \u00a0Check out their GitHub page here:\u00a0<a href=\"http:\/\/github.com\/matzman666\/USBHost\"><span style=\"text-decoration: underline;\"><span style=\"color: #00ccff; text-decoration: underline;\">github.com\/matzman666\/USBHost<\/span><\/span><\/a><\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">And lastly, I&#8217;d like to send a thousand thanks to <a href=\"https:\/\/twitter.com\/virtual_dario\"><span style=\"text-decoration: underline; color: #00ccff;\">Dario Laverde from HTC<\/span><\/a>.\u00a0 He was a great help in troubleshooting a lot of the feature report content, and I wouldn&#8217;t have Vive Trackers to work with if it weren&#8217;t for him. \u00a0Thank you, Dario!<\/span><\/p>\n<p><span style=\"font-family: helvetica, arial, sans-serif; font-size: 12pt;\">Alright, that&#8217;s all I&#8217;ve got for this documentation.\u00a0 Like I said at the top, let me know if there&#8217;s aspects about the Tracker that the community needs documentation on, and I&#8217;ll look into what I can learn.\u00a0 I hope some folks out there\u00a0find this information useful :)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* REDDIT USER \/U\/MATZMANN666 HAS CREATED AN ARDUINO LIBRARY, SEE BOTTOM OF POST FOR MORE INFORMATION * \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* \u00a0* Hi friends &#8211; I&#8217;m maintaining this post as I continue working with the Vive Tracker, and will be doing my best to keep up with&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"http:\/\/www.talariavr.com\/blog\/vive-tracker-initial-documentation\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12,13],"tags":[19,17,20,22,15,16,18,21,14],"class_list":["post-423","post","type-post","status-publish","format-standard","hentry","category-hardware","category-prototyping","category-vive-tracker","tag-documentation","tag-hid-host","tag-htc","tag-tracker","tag-usb","tag-usb-hid","tag-usb-host","tag-vive","tag-vive-tracker"],"_links":{"self":[{"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/posts\/423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/comments?post=423"}],"version-history":[{"count":41,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":531,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions\/531"}],"wp:attachment":[{"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/media?parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/categories?post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.talariavr.com\/blog\/wp-json\/wp\/v2\/tags?post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}