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
/*
>Serial1.print('$$$');
=undefined
C
MD
*/
// 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:
Serial1.println('SF,1');
Serial1.println('S~,6');
Serial1.println('SN,EspruinoGamepad');
Serial1.println('SH,0240');
Serial1.println('GH');
Serial1.println('R,1');
*/
/* Gamepad HID report format:
1 2 3 4
0xFD,0x06,0x00,0x00,0x00,0x00,0x55,0xAA
1: Raw report decriptor
2: length, must be 6
3: joysticks states
4: buttons states bitmasks
*/
// Ex:
//Serial1.write(0xFD,0x06,0x00,0x00,0x00,0x00,0x55,0xAA);
// the following gives enough time to focus the HTML5 gamepad tester page ;)
setTimeout(function(){
Serial1.write(0xFD,0x06,0x00,0x00,0x00,0x00,0x55,0xAA);
},5000);
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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:
I'll be doing a quick writeup of my notes on the subject, but you can already follow these:
Alternative method ( using FTDI adapter instead of parallel port):
https://www.youtube.com/watch?v=y8PcNbAA6AQ
Evan Kale's Bluetooth PS2 controller mod:
https://www.youtube.com/watch?v=mt8uF9IblUU
same authors' PS2 keyboard/mouse Bluetooth adapter:
https://www.youtube.com/watch?v=UJaqHnPR-XE&feature=youtu.be
HC-05 infos:
https://components101.com/wireless/hc-05-bluetooth-module
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
Enjoy :D
1 Attachment