bleno
bleno copied to clipboard
Unusable on macOS 10.15.3
There are no obvious errors on install but 'stateChange' never fires.
node: v12.16.0
I am running into the same thing. Haven't dug much into it, but it looks like something changed.
running DEBUG=* ./index.js
shows some debugging info:
$ DEBUG=* ./index.js
Starting...
bleno platform darwin +0ms
bleno addressChange ... +1ms
highsierra-bindings sendCBMsg: 1, {
highsierra-bindings "kCBMsgArgName": "node-1588044072024",
highsierra-bindings "kCBMsgArgOptions": {
highsierra-bindings "kCBInitOptionShowPowerAlert": 1
highsierra-bindings },
highsierra-bindings "kCBMsgArgType": 1
highsierra-bindings } +0ms
highsierra-bindings xpcEvent: {
highsierra-bindings "kCBMsgId": 48,
highsierra-bindings "kCBMsgArgs": {
...
highsierra-bindings }
highsierra-bindings }
highsierra-bindings } +1ms
highsierra-bindings xpcEvent: {
highsierra-bindings "kCBMsgId": 6,
highsierra-bindings "kCBMsgArgs": {
highsierra-bindings "kCBMsgArgBTPowerState": 1,
highsierra-bindings "kCBMsgArgState": 5
highsierra-bindings }
highsierra-bindings } +0ms
So, it's getting an xpcEvent with a message id 48 and one with message id 6, but there are no handlers inside highsierra.js that handles those messages.
Same for MacOS Mojave 10.14.6 (18G5033) with Node v10.21.0
$ DEBUG=* node ./main.js
bleno - echo
bleno platform darwin +0ms
bleno addressChange 64:76:ba:8c:13:d1 +2ms
highsierra-bindings sendCBMsg: 1, {
highsierra-bindings "kCBMsgArgName": "node-1592678188769",
highsierra-bindings "kCBMsgArgOptions": {
highsierra-bindings "kCBInitOptionShowPowerAlert": 1
highsierra-bindings },
highsierra-bindings "kCBMsgArgType": 1
highsierra-bindings } +0ms
highsierra-bindings xpcEvent: {
highsierra-bindings "kCBMsgId": 4,
highsierra-bindings "kCBMsgArgs": {
highsierra-bindings "kCBMsgArgState": 5
highsierra-bindings }
highsierra-bindings } +4ms
highsierra-bindings state change poweredOn +0ms
bleno stateChange poweredOn +4ms
on -> stateChange: poweredOn
highsierra-bindings sendCBMsg: 16, {
highsierra-bindings "kCBAdvDataLocalName": "echo",
highsierra-bindings "kCBAdvDataServiceUUIDs": [
highsierra-bindings {
highsierra-bindings "type": "Buffer",
highsierra-bindings "data": [
highsierra-bindings 236,
highsierra-bindings 0
highsierra-bindings ]
highsierra-bindings }
highsierra-bindings ]
highsierra-bindings } +4ms
I recommend using: https://github.com/pokusew/nfc-pcsc, its supports raw transmit, and can be configured to handle large responses... You will need to generate / parse the TLV yourself.
I have also the issue that nothing works on macos - also with the current verison her on github ... Does anypne solved it @ptx2 @OR13 ?