-
Notifications
You must be signed in to change notification settings - Fork 287
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
Unhandled event #43
Comments
Have same problem with discovered iOS device |
Same here with my Mac. I don't know where I can find the meaning of all the MsgId. Would anyone know? GATT doesn't handle the id 53 in function HandleXpcEvent (device_darwin.go). However, the bluetooth indicator on my mac shows that it is connected to my board! |
It's a MTU exchange request, which we currently don't handle on the OS X port. |
@roylee17 Thanks! Would you know where I could find all the MTUs? |
@roylee17 it looks like @flemay has made some progress on this on his fork. I have an iDevices iGrill2 device that never fully connects on paypal/gatt (halting at the unhandled event warning), but is able to fully discover services and characteristics with flemay/gatt. Would be nice to see that stuff merged in! |
Yeah, I think looking at noble you'll see that they have different files |
I wonder if there's any OS X C constants we can match against that are more |
@bgentry @roylee17 My changes are mainly based on Noble. He told me the codes change whenever Apple releases a new os version. So he does reverse engineering to maintain Noble. I wish we could specify a version of os in golang the same way we target platform. At the moment I am not 100% sure if the codes are exact. I am still trying to understand how I can subscribe to notify service using p.SetNotifyValue. Any clue? |
Hi Guys, Those event codes are reverse engineered by Noble/Bleno, and we're in debt to them :-) Not sure what's the best way to tell the OS X version yet, but it seems the following should do the work, and we can replace it later when we find a better (canonical) way to do it.
Are you interested in having those event codes merge back with support of Yosemite and Mavericks? Regarding p.SetNotifyValue(), the easiest way is to modify the examples/explorer.go and give it a try: Roy
|
@roylee17 Thanks for the reply. I have tried your code but couldn't get it work on my So It goes inside the The |
So the above code subscribed to your peripheral's characteristic, but you're not sure does your peripheral actually send notification? You can test your peripheral with your phone (I use LightBlue on iPhone). Subscribe to the characteristic, and see if that peripheral does send some notification. |
It does work with |
Not sure this is due to the event ID changes between OS X version, or it's because didn't handle "Indication" correctly. Since now I only have Yosemite, I'll see what's happening on Yosemite, and get back to you. |
It also works on my iphone with I don't call |
Pushed! :) |
The rsp.id == 74 inside the loop() now should be changed to 71. It meant to tell weather a "read response" is a response to earlier read request, or is an asynchronous notification. Now the problem is - there is no further report of event 71, even we seem to successfully subscribe to the characteristic. I can see my peripheral sending notifications after the subscription. But they are not reported. Will look into it. |
Thank you so much for investigating! :) |
Sorry for the late response , and taking so long to resolve this (hopefully) There are actually two issues here:
9a3c51a should fix this.
The event IDs were ported from last year for Mavericks, so we need to update it for Yosemite. Let me know how it works for you :) |
What's the status of this issue, is there anything I can do to help? (I'm on Mavericks and have an example code + BLE device) |
I will try the fix tonight and let you know! I don't know about Mavericks as I am working with yosemite/el-capitain :) |
For what it's worth, I think it's totally fine to only target the latest 2 releases of OS X |
hello |
Not sure if this is an issue or the way the stack is supposed to work - but I get the following output and don't see how a callback would respond to it.
2015/06/22 10:39:37 Unhandled event: xpc.Dict{"kCBMsgId":53, "kCBMsgArgs":xpc.Dict{"kCBMsgArgDeviceUUID":xpc.UUID{0x4c, 0x33, 0x9e, 0x37, 0x99, 0x2a, 0x42, 0xb2, 0x9d, 0xaf, 0xf2, 0x8e, 0x3, 0xc6, 0xbf, 0x5e}, "kCBMsgArgATTMTU":104}}
The text was updated successfully, but these errors were encountered: