-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check platform via bleno in case were behind a websocket #28
base: master
Are you sure you want to change the base?
check platform via bleno in case were behind a websocket #28
Conversation
@@ -36,7 +36,7 @@ | |||
], | |||
"license": "Apache-2.0", | |||
"dependencies": { | |||
"bleno": "~0.1.13", | |||
"bleno": "git+https://github.com/jacobrosenthal/bleno#platform-on-state-change", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to get fixed, I need a to get platform check seperated from websocket stuff, unless we can just get that all merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separating it would be great. The characteristic request handling is still WIP right?
…ip flags, just dont add them in the first place
3c8d30b
to
0ab5e77
Compare
Hrm. So this works on linux. But on osx 10.10.5 with the uid examples only Im getting xpcError: connection interrupted now |
ugh. duh, were back to an async timing issue. Beacon is accessing the property while its still unknown before the bindings return.
The point of my previous implementation was to hold back the initial state change emit in bleno until i got the platform, but were not doing that anymore now that its in bindings. |
No.. nevermind, we got that with the emit platform in child_process. The problem is we generate advertisement data when user calls advertiseUid, (thus only doing it once) but this happens before bleno.platform has been set as state hasnt even been reported as powered on yet. Advertise actually waits for that later. We could make a copy of all the advertising properties and generate later, but that feels gross. |
quickest fix would be for me to go back to generating flags and stripping them off when statechange fires |
Blah. Cant do that. _updateAdvertisementDataIfNeeded calls advertiseTlm directly, which would then not have its flags stripped |
I think we need to expose the adapter state to the user like discussed in: #25 (comment) |
for #23