Skip to content
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

PPoGATT (BLE) support #73

Open
3 of 4 tasks
jwise opened this issue May 27, 2019 · 3 comments
Open
3 of 4 tasks

PPoGATT (BLE) support #73

jwise opened this issue May 27, 2019 · 3 comments

Comments

@jwise
Copy link
Contributor

jwise commented May 27, 2019

BLE-only devices need PPoGATT support. Need to do:

  • Make basic BLE connection on BLE devices
  • Get two-way PPoGATT communication in both client and server mode
  • Make sure Pebble Protocol code is ready to xmit Pebble Protocol to non-UART devices
  • Write PPoGATT TX/RX thread
@jwise
Copy link
Contributor Author

jwise commented Jun 9, 2019

Current status: MacOS refuses to speak to grab characteristics entirely, and something is still going wrong with handle identification for phone-as-GATT-server. Working on getting Gadgetbridge to talk to it in phone-as-GATT-client mode; ac9e91f took some steps in terms of pairing, but Gadgetbridge is still expecting something that isn't happening, as far as I can tell (looks like maybe we need to send it a PPoGATT packet first?).

@jwise
Copy link
Contributor Author

jwise commented Jul 29, 2019

Ok, here's some more updates. Gadgetbridge, apparently, can't be on the same phone as the Pebble app, so make sure the Pebble app is uninstalled, or the two of them will collide on using GATT. 43e78d7 got GadgetBridge a little further along in connecting, to the point where it sits and waits for RebbleOS to say something; GadgetBridge has to be run in client-only mode, because if it runs in server mode, it tries to send a NOTIFY event on a bad handle (which we can confirm in the btsnoop log). Not sure why it does that.

After sending GadgetBridge a PPoGATT reset event, it seems happier and no longer times out the PPoGATT init (and, in fact, responds with a reset ACK and a firmware version request!). We currently do not manage to elicit a response back from inside RebbleOS of the firmware version response, however, probably because of the return in the middle of the bluetooth_data_rx function. So I guess up next is to sync up with @ginge and figure out where the protocol branch is...

@jwise
Copy link
Contributor Author

jwise commented Aug 31, 2019

We can now talk to Gadgetbridge. The tx/rx state machine do not really support retransmitting or coalescing ACKs, though.

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

No branches or pull requests

1 participant