Skip to content

Conversation

@jacobrosenthal
Copy link

for #23

package.json Outdated
Copy link
Author

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

Copy link
Collaborator

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?

@jacobrosenthal jacobrosenthal mentioned this pull request Sep 28, 2015
…ip flags, just dont add them in the first place
@jacobrosenthal jacobrosenthal force-pushed the platform-check-bleno-property branch from 3c8d30b to 0ab5e77 Compare October 3, 2015 17:22
@jacobrosenthal
Copy link
Author

Hrm. So this works on linux. But on osx 10.10.5 with the uid examples only Im getting xpcError: connection interrupted now
https://gist.github.com/jacobrosenthal/3d35e7e5390da73129cc

@jacobrosenthal
Copy link
Author

ugh. duh, were back to an async timing issue. Beacon is accessing the property while its still unknown before the bindings return.

Jacobs-MacBook-Air:node-eddystone-beacon jacobrosenthal$ node examples/uid/with-tlm.js 
beacon platform unknown
bleno platform darwin
xpcError: connection interrupted

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.

@jacobrosenthal
Copy link
Author

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.
Or we could not accept advertise() if we're not powered on... (ie become more like bleno)

@jacobrosenthal
Copy link
Author

quickest fix would be for me to go back to generating flags and stripping them off when statechange fires

@jacobrosenthal
Copy link
Author

Blah. Cant do that. _updateAdvertisementDataIfNeeded calls advertiseTlm directly, which would then not have its flags stripped

@sandeepmistry
Copy link
Collaborator

I think we need to expose the adapter state to the user like discussed in: #25 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants