Puck Controlling Puck - Troubleshooting Help #3738
Replies: 5 comments
-
Posted at 2021-05-19 by @gfwilliams Hi - this is an odd one. I get this too. It seems like you're doing everything right on the code front. Please could you try:
That's what worked well for me... I'm a bit busy today but I just filed an issue for this at espruino/Espruino#2008 and I'll try and get it fixed properly as soon as I can. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-05-19 by Kymvaris Gordon - Works like a champ with the added delay. Here's the full code just for anybody looking to see it all together:
Thanks for the help! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-05-19 by @gfwilliams Great - thanks for letting me know! I'll try and get a fix in soon - I'm not sure how that crept into 2v09 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-16 by @gfwilliams I'm just looking into this, and with latest firmwares I can't reproduce it running your original code. Any hints as to how I might reproduce it here? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-18 by @gfwilliams Ok, I figured it out (I think). This is due to negotiation of a higher MTU since this was added in Espruino 2v09. I think if you're connecting to a device with an older firmware you can connect just fine. It's when you connect between two devices with 2v09+ firmware that you have the issue. Follow this on the GitHub issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-05-18 by Kymvaris
I am trying to implement the code in the example in this link: https://www.espruino.com/Puck.js+Controlling+Other+Pucks
I have two Puck.js v1.0 running firmware 2v09. I flashed one with the "peripheral" code and saved it to flash before disconnecting from the Web IDE and power-cycling the Puck. I flashed the other with the "central" code with a few added debug statements in the catch blocks to print out the error.
When I press the button on the central puck, my the LED flashes red to indicate error and the error is printed to the console: BLE error 0x11 (BUSY). After that, any button presses just report the error "No device found matching filters" until I power-cycle the peripheral Puck. I assume my central puck is successfully connecting but not disconnecting when the error is caught (even though I call the disconnect()) function. This leaves the peripheral Puck in an odd state that can only be fixed with a power-cycle.
My question is twofold:
Since I modified the example code (to add debug statements in the catch() blocks), here is my code:
As additional information, the example code in the following documentation articles also fails with a BLE error 0x11 (BUSY) message.
The sample code in the documentation here: https://www.espruino.com/Reference#t_BluetoothDevice does execute without error. This is leading me to believe that my two Pucks can connect to each other but when I try to use the UART service to send commands, the BLE error 0x11 (BUSY) error is thrown.
Beta Was this translation helpful? Give feedback.
All reactions