Hey all, I'm a little lost here. My Bangle is running a watchface that is listening on a specific UUID for short strings to act as notifications (not BLE notifications, just messages). The Bangle code works fine, and I can access it from both a Web Bluetooth page and a DroidScript app. However, I can't get my puck to send the message properly. Here is the Bangle (peripheral) code snippet:
Which works fine in an HTML page using "let NRF = navigator.bluetooth;"
I'm writing my log to a file since console is disabled when I run this, and the file reads:
Found
Connected
BLE error 0x11 (BUSY)
As i said, I know the Bangle code works, been using it for weeks. The Puck code runs in a browser just fine. Which device is "BUSY"?? Any help appreciated!
I guess it is bluetoooth stack on Puck that is BUSY - the return g.getPrimaryService(primaryServiceUuid); fail for some reason. Could it be that this code is running multiple times or there is something else BLE related running on Puck at the same time?
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.
Hey all, I'm a little lost here. My Bangle is running a watchface that is listening on a specific UUID for short strings to act as notifications (not BLE notifications, just messages). The Bangle code works fine, and I can access it from both a Web Bluetooth page and a DroidScript app. However, I can't get my puck to send the message properly. Here is the Bangle (peripheral) code snippet:
The showMsg() function is defined and works fine (just draws a dialog box and writes the string to screen).
Here is the Puck code (mostly thanks to Gordon's BLE example):
Which works fine in an HTML page using "let NRF = navigator.bluetooth;"
I'm writing my log to a file since console is disabled when I run this, and the file reads:
As i said, I know the Bangle code works, been using it for weeks. The Puck code runs in a browser just fine. Which device is "BUSY"?? Any help appreciated!