initial websocket bindings - #124
Conversation
There was a problem hiding this comment.
Arbitrarily chose 0xB1f, one up from nobles websocket.
|
I also missed this os check, https://github.com/sandeepmistry/bleno/blob/master/lib/bleno.js#L132 It seems innapropriate to os check a second time, and its (currently) impossible to know what bindings are under the WS hood... Perhaps the bleno api should be identical no matter the platform, but rather send a null value for the unimplemented variables? |
|
Its not exactly unit tests, but I found the debug=bindings helpful in trying to determine if ws is properly passing through and executing the same bindings calls. All examples appear identical, heres the battery characteristic logs https://gist.github.com/jacobrosenthal/3aa67244397d2ffdb01a |
|
Interesting.. stop isnt working from the websocket bindings at the moment even thought the bindings logging look perfect. @sandeepmistry notice the super fast return time on the not working copy (15ms vs 155) Thoughts on that? |
|
@jacobrosenthal looks ok on my Mac: var eddystoneBeacon = require('./../../index');
eddystoneBeacon.advertiseUid('00010203040506070809', 'aabbccddeeff');
setTimeout(function() {
console.log('stop');
eddystoneBeacon.stop();
}, 5000);Using LightBlue on iOS, could not discover my Mac. What are you using for the central? |
|
I havent been able to reproduce it anymore yet. Maybe just a weird blued state that day.. |
|
Eddystone does a platform check as well which doesnt square with websocket: I have a platform check branch bringing os.platform call into bleno api so it can be used behind websocket that after some more testing and discussion Im going to merge here: |
Like we've been discussing in don/node-eddystone-beacon#25 (comment) - I think we both agree the platform check can be a property instead of a async function |
5e8149a to
6da467e
Compare
|
Added a platform check |
6da467e to
30517bb
Compare
|
May I suggest to forward your changes to: https://github.com/abandonware/bleno/ Meanwhile, feedback welcome on latest release: |
|
Please confirm this issue is resolved with @abandonware version Relate-to: abandonware#17 |
First pass at websocket bindings. Sorta works, but seems to spawn a new device every time.
Feedback obviously welcome.
I dont see any unit tests for bindings?