You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested on the basic BLE device operation, but the Callback related functions were not working properly.
If you could comment on whether it is a code issue or a Node binding issue, that would be helpful.
Enviroments
Node.js v18.15.0
Vanilla JS (Not TS)
MacOS 12.6.3 (I tried it on Windows11 and it still didn't work)
Pattern 1
simpleble_adapter_set_callback_on_found
simpleble_adapter_set_callback_on_updated
I added following line in examples/node/scan.mjs (converted TS to JS).
//Register callback
bindings.simpleble_adapter_set_callback_on_updated(
adapter,
(_adapter, _peripheral, _userdata) => {
//I want to do something here,,,
}, null);
But I got a following errror.
# Fatal error in v8::HandleScope::CreateHandle()
# Cannot create a handle without a HandleScope
Pattern 2
simpleble_adapter_set_callback_on_scan_start
simpleble_adapter_set_callback_on_scan_stop
I added following line in examples/node/scan.mjs (converted TS to JS).
@jins-tkomoda yeah, that's a known problem. I figured out the cause is the C++ bindings. It involves how the callback is being called and the pointer parameters.
I've mostly stopped working on Node-SimpleBLE. Instead, I'm trying to work to merge the bindings directly into node-webbluetooth. You can follow along our progress here: thegecko/webbluetooth#44 (comment)
The goal is to have a single cross-platform library that works identically across Node, Deno, and Browsers.
Hi, I appreciate your wonderful project!!
I tested on the basic BLE device operation, but the Callback related functions were not working properly.
If you could comment on whether it is a code issue or a Node binding issue, that would be helpful.
Enviroments
Pattern 1
I added following line in examples/node/scan.mjs (converted TS to JS).
But I got a following errror.
Pattern 2
I added following line in examples/node/scan.mjs (converted TS to JS).
But I got a following errror.
Pattern 3
simpleble_peripheral_notify
Simply I tested examples/node/scan.mjs (converted TS to JS). But as soon as the program received the notification, it occured segmentation fault.
The text was updated successfully, but these errors were encountered: