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

Implement Bluetooth Setup Mode #28

Open
ah- opened this issue Mar 6, 2018 · 3 comments
Open

Implement Bluetooth Setup Mode #28

ah- opened this issue Mar 6, 2018 · 3 comments

Comments

@ah-
Copy link
Owner

ah- commented Mar 6, 2018

We have a mostly working implementation of bluetooth pairing etc. Talking to the BT controller works, and I have managed to pair with my laptop.

It'd be nice to implement the full workflow, and control the LEDs upon entering BT setup mode, display the BTHostListQuery result, and use the same keymap as the original FW.

@hdhoang
Copy link
Collaborator

hdhoang commented Mar 13, 2018

My pairing experience:

  1. Anne: turn on broadcast
  2. Host: scan and initiate pairing
  3. Anne: leave BT layer to regain normal number keys (I also press Fn once to make sure I'm in BASE layer, but this is possibly a bug in my layout modification)
  4. Anne: punch in the 6-digit code

Without step 3, the keys 1~4 and 0 ends the pairing session, since they invoke other bluetooth actions. It would be best if the MCU can get some indication from BLE chip to switch to BASE and highlight the number keys like stock does.

@ah-
Copy link
Owner Author

ah- commented Mar 14, 2018

I think it does get that indication, via BleOp::Pair here: https://github.com/ah-/anne-key/blob/master/src/bluetooth.rs#L177

Not quite sure yet how to best build the pin input mode. Sending the LED update to highlight the num keys should be easy though.

@ah-
Copy link
Owner Author

ah- commented Mar 15, 2018

Connection state feedback works now (apart from having to manually press left ctrl sometimes to make it update). Started building the pin entry mode, but it doesn't quite work correctly yet.

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

No branches or pull requests

2 participants