-
I don't think this is true now. HID just needs to be enabled when you pair it with your device
Well I'm new to this, but when exactly is boot0.js executed, when I pair with another device or a single time on start?
The code in boot0.js is basically:
var s = require('Storage').readJSON('setting.json',1)||{}; if (s.HID) { // Human interface device Bangle.HID = "(...)"; NRF.setServices({}, {uart:true, hid:Bangle.HID}); }
so when HID is not enabled in settings while starting and boot0.js is only executed on start the NRF.setServices() never happens, correct?
-
Thanks, the bootloader code was a missing part. I read it "HID needs to be enabled when turning on the clock" or else it will not work.
Still it does not work with the Linux computer, but it works with an Android (the 9 byte version, not the 8 byte) after restarting the clock.
Can I assume Android was the primary target this was tested with?
Any do you have a commented version of the hid description in the bootloader somewhere? The longterm goal is a joystick app using the accelerometer as stick and I guess the description would need modification for that.
Also does it work for anyone with a Linux PC? -
Sorry, I don't see where you get the variable length from, the ble_hidÂ_keyboard.js also does only 8 arguments? According to the source the function accepts different length. Still I don't know if 9 arguments is correct since I have not read the hid documentation yet. Also jswrap_ble_sendHIDReport() states:
Send a USB HID report. HID must first be enabled with
NRF.setServices({}, {hid: hid_report})
so the setServices() call is really missing here.
-
According to the BLE+Keyboard documentation NRF.setServices() accepts 8 arguments, but hid-keyboard.js gives 9 arguments. Also the shift modifier is set and the NRF.setServices() call is missing. Is there any other documentation to check?
-
Hi,
I'm currently trying to test the hid function with the "Bluetooth Keyboard" and "Binary Bluetooth Keyboard" applications and a linux computer, but I'm not able to input any keys.
The device is paired successfully:
input: Bangle.js 3f3e Keyboard as /devices/virtual/misc/uhid/0005:0000:0000.0003/input/input3
input: Bangle.js 3f3e Consumer Control as > /devices/virtual/misc/uhid/0005:0000:0000.0003/input/input4
hid-generic 0005:0000:0000.0003: input,hidraw1: BLUETOOTH HID v0.00 Keyboard [Bangle.js 3f3e] on AA:AA:AA:AA:AA:AAbut I do not seem to get any bytes from the hidraw device:
xxd /dev/hidraw1
prints nothing. The same procedure worked with a bluetooth keyboard.
The "hid"-option is enabled on the bangle.js. Does anyone has an idea what extra steps needs to be done?
Found a parser:
https://eleccelerator.com/usbdescreqparser/