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

UUID needed.. #1

Open
willwade opened this issue Aug 30, 2024 · 0 comments
Open

UUID needed.. #1

willwade opened this issue Aug 30, 2024 · 0 comments

Comments

@willwade
Copy link
Contributor

willwade commented Aug 30, 2024

I think we need to tweak something. I think we need to advertise with a UUID (reason being some code like in swift wont like it without a UUID)

  • Its more standard to use a UUID
  • Instead of a pairing packet. Use a predefined UUID.
  • Its easier for a lot of different systems to look for a UUID than MAC address.

so maybbbe something like

const uint8_t custom_uuid[] = {
  0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 
  0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0
};

void update_advertisement_data() {  
  buttons_data.package_index = package_i;

  for(uint8_t i = 0; i < n_buttons; i++) {
    for(uint8_t j=3;j>0;j--) {
      buttons_data.button_packs[j][i] = buttons_data.button_packs[j-1][i];
    }
    buttons_data.button_packs[0][i] = button_packs[i];
  }
  
  Bluefruit.Advertising.clearData();
  Bluefruit.Advertising.addServiceUUID(custom_uuid);
  Bluefruit.Advertising.addManufacturerData(&buttons_data, sizeof(buttons_data));
}
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

1 participant