• Hi there !

    Indeed :)
    BUT it didn't became a "magic configurable USB HID device": it now allows to specifiy via AT-like commands which HID profile to use & then pass serially the stuff related to that HID report

    In short, you'll need:

    • BlueSuite_2_6_6_1311.zip
    • csr-spi-ftdi-0.5.3-a5.zip // IMPORTANT ( else you could get an error looking like you may have wire shorts )
    • zadig-2.4.exe
    • an RN42 with HID firmware to be dumped ..
    • an HC-05 from which we'll dump, mod & reflash the firmware

    I'll be doing a quick writeup of my notes on the subject, but you can already follow these:

    In the attached archive, you'll find all the necessary ;p

    nb: for the "Open Adaptive Controller" I'm working on ( currently using Espruino WiFi & flashed HC-05* .. and teensy for xbox360 stuff that I hope to move onto Espruino USB stuff ), I am trying to optimize the usage of the available pins & was wondering what was the best way to put a pin on "high impedance" ( floating ? ) to be able to light either 2 leds: both at same time, only former, only latter
    The above goal is somewhat close to what does the "STAT" pin in the below schematic

    *same for me: I guess for the final implementation of the said controller, I'll have to switch to Espruino bluetooth + wifi to be able to achieve fully custom Bluetooth HID reports ( I plan to retry the Puckjs code posted above & maybe soon purchase your latest board ;) ).

    Of course, I'll be posting the blueprints here ( I am currently finishing those & 'll be moving to the 3d part soon ) ;p

    last but not least, the debug code I used to interface the freshly flashed HC-05 .. and it worked ;p
    ps: yes, I could have done things better the way

    // setting the RN42 firmware as a HID gamepad device
    // we connect to the hc05 module using itd breakout's Vcc,Gnd, Txd & Rxd
    Serial1.setup(115200, { tx:B6, rx:B7 });
    Serial1.on('data', function (data) {console.log(data);});
    // R: using PIO11: HIGH ? HID selected, LOW ? using profile selected in flash
    // ==== CMD mode ====
    // wait a little bit then send '$$$' THEN SILENCE ( no line ending ) to enter command mode
    // then enter commands with CR line ending
    SF,1 // factory reset:
    //> AOK
    D // see current settings
    E // see advanced settings
    SM,6 // pairing
    //> AOK
    SN,OpenAdaptiveController // set name
    //> AOK
    S~,0 // SPP mode
    //> AOK
    S~,6 // HID mode
    //> AOK
    // HID report descriptors
    //SH,0230 // appear as keyboard+mouse combo
    SH,0240 // appear as a gamepad
    //> AOK
    GH // get current value of HID flag register
    R,1 // reboot module
    /* Current sequence used from above stuff to setup an "RN42" as a Bluetooth Gamepad:
    /* Gamepad HID report format:
      1    2    3                   4
      1: Raw report decriptor
      2: length, must be 6
      3: joysticks states
      4: buttons states bitmasks
    // Ex:
    // the following gives enough  time to focus the HTML5 gamepad tester page ;)

    Enjoy :D

    1 Attachment


Avatar for stephaneAG @stephaneAG started