-
• #2
...
-
• #3
Thanks @Gordon.
Do I really need this bonding call on the peripheral side?
This thread here is a test to gain some insight how HID works as a peripheral to use it on the "other side" when Espruino is the Host/Central.No Code in iOS needed btw., just a confirmation (Yes/No).
How do I setup Espruino as HID device?
I thought thatNRF.setServices(undefined, { hid : kb.report });
would do the trick.
Is there more that is not given in the example code? -
• #4
Sorry - I posted on the wrong thread. Got confused between this and your other one about HID! https://forum.espruino.com/conversations/380964/#comment16739480
I think it might be related though. iOS in particular I think is quite particular about requiring a bonded connection, when some other OSes don't.
From http://www.espruino.com/BLE+Security#passkey-pin-pairing you could try also adding:
NRF.setSecurity({passkey:"123456", mitm:1, display:1});
So now when you connect iOS will want you to enter a passkey, but then the device should be bonded and maybe it'll work?
-
• #5
In developing the Rotary Encoder as mouse wheel, I tested the Espruino mouse example with the latest 2v15 release for Puck.js. It worked with no problem on Linux and IOS although I had to clear out some old pairing data by doing a complete reset of the Puck.
-
• #6
Strange. I tested also with Puck and even the newest release to rule out some Board-specific issue. No luck.
It gets paired, but no key or volume change gets recognized by either iPhone nor MacBook.However, this is not the project I'm working on, just a way to debug things "from the other side".
My original issue was just solved thanks to a hint by @Gordon :)
For investigating in the other HID project I tried to get a MDBT42Q set up as a BLE keyboard or volume control using this example from here
Strangely, it didn't work.
Here is my final code (mostly copied, but wrapped in an
onInit()
so it gets called after PowerUp):Could someone try and confirm my results please?
I tried both examples: The one with the keyboard and the one with the
volumeUp
control.None worked.
Some more findings:
volumeUp()
) my phone (iOS) shows a confirmation dialog.Is this expected behaviour or a bug?
Thanks in advance.