File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
examples/Peripheral/cplay_ble Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,22 @@ void startAdv(void)
143143{
144144 // Advertising packet
145145 Bluefruit.Advertising .addFlags (BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
146- Bluefruit.Advertising .addTxPower ();
147146
148- // Include bleuart 128-bit uuid
149- Bluefruit.Advertising .addService (bleuart);
147+ // Advertising with only board ID
148+ struct ATTR_PACKED {
149+ uint16_t mfr_id;
150+
151+ uint8_t field_len;
152+ uint16_t field_key;
153+ uint16_t field_value;
154+ } mfr_adv;
155+
156+ mfr_adv.mfr_id = UUID16_COMPANY_ID_ADAFRUIT;
157+ mfr_adv.field_len = 4 ;
158+ mfr_adv.field_key = 1 ; // board id
159+ mfr_adv.field_value = USB_PID;
160+
161+ Bluefruit.Advertising .addManufacturerData (&mfr_adv, sizeof (mfr_adv));
150162
151163 // Secondary Scan Response packet (optional)
152164 // Since there is no room for 'Name' in Advertising packet
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ extern const uint8_t UUID128_CHR_ADAFRUIT_VERSION[16];
227227 * https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
228228 *------------------------------------------------------------------*/
229229#define UUID16_COMPANY_ID_APPLE 0x004C
230-
230+ # define UUID16_COMPANY_ID_ADAFRUIT 0x0822
231231
232232/* ------------------------------------------------------------------*/
233233/* Unit values ( used in Characteristic Presentation Format )
You can’t perform that action at this time.
0 commit comments