adafruit / Adafruit_CircuitPython_BLE_Radio

Simple byte and string based inter-device communication via BLE.
MIT License
6 stars 8 forks source link

Bluefruit Playground advertisements and Radio advertisements both using id 1 #11

Open dhalbert opened 4 years ago

dhalbert commented 4 years ago

@tannewt @hathach @ladyada

It looks like the Bluefruit Playground and Radio advertisements are both using manufacturer data advertisements with an id=1. https://github.com/adafruit/Adafruit_CircuitPython_BLE_Radio/blob/54cb3974ead8b185e9cf2bb30936ef7137af56df/adafruit_ble_radio.py#L60-L62

https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/eefeba8d64dfdae15a5469447664eea16d32816e/libraries/Bluefruit52Lib/examples/Peripheral/bluefruit_playground/bluefruit_playground.ino#L411-L423

/ Advertising with only board ID
  struct ATTR_PACKED {
    uint16_t mfr_id;

    uint8_t  field_len;
    uint16_t field_key;
    uint16_t field_value;
  } mfr_adv;

  mfr_adv.mfr_id = UUID16_COMPANY_ID_ADAFRUIT;
  mfr_adv.field_len = 4;
  mfr_adv.field_key = 1; // board id    // <---------------------------
  mfr_adv.field_value = USB_PID;

This is too bad. I think it's too late to change the Bluefruit Playground, because it's widely deployed, but maybe we should change Radio, in a major version change. Am I wrong?

We need to keep track of these, probaby in https://github.com/adafruit/bluetooth-low-energy

hathach commented 4 years ago

@dhalbert I think the board ID is OK, for both to include. Maybe we could add more keys to different between the two e.g Radio service and/or Sensor service etc.. The bluefruit app may need to role out a new update to filter the Radio service ?!!

tannewt commented 4 years ago

I doubt many are using both the app and the Radio service at the same time. I'd just update Radio with a major rev and suggest people update it on all of their devices.