Bluefruit should only advertise one new service but doesn't

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
iitgrad
 
Posts: 98
Joined: Sun Dec 30, 2012 6:43 pm

Bluefruit should only advertise one new service but doesn't

Post by iitgrad »

I am trying to get the Bluefruit BLE UART to only advertise the one new service I have created, but it appears to always add it to three other services even though I have cleared the others. (or believe I have).

For example, I am doing the following commands. I have the switch set to command mode.

```
at
OK
ati
BLEFRIEND32
nRF51822 QFACA10
62E04AEF41A3CF26
0.8.0
0.8.0
Sep 25 2017
S110 8.0.0, 0.2
OK
AT+GAPDEVNAME
Adafruit Bluefruit LE
OK
AT+GAPSETADVDATA
ERROR
AT+GATTCLEAR
OK
AT+GATTADDSERVICE=UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
1
OK
AT+GATTADDCHAR=UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,VALUE=100
1
OK
AT+GATTLIST
ID=01,UUID=0x0011,UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
ID=01,UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,MAX_LEN=1,DATATYPE=0,VALUE=100
OK
ATZ
OK
AT+GATTLIST
ID=01,UUID=0x0011,UUID128=00-11-00-11-44-55-66-77-88-99-AA-BB-CC-DD-EE-FF
ID=01,UUID=0x0002,PROPERTIES=0x02,MIN_LEN=1,MAX_LEN=1,DATATYPE=0,VALUE=100
OK
AT+GAPSTARTADV
OK
```

And here is what I see in my logs when I discover this device and examine it's services.

```
(lldb) po peripheral.services
▿ Optional<Array<CBService>>
▿ some : 4 elements
- 0 : <CBService: 0x2825a6240, isPrimary = YES, UUID = 00001530-1212-EFDE-1523-785FEABCD123>
- 1 : <CBService: 0x2825a6180, isPrimary = YES, UUID = Device Information>
- 2 : <CBService: 0x2825a6680, isPrimary = YES, UUID = 6E400001-B5A3-F393-E0A9-E50E24DCCA9E>
- 3 : <CBService: 0x2825a5700, isPrimary = YES, UUID = 00110011-4455-6677-8899-AABBCCDDEEFF>

(lldb)
```

The service I have added shows up as #3 in the list. Shouldn't it be the first and only?

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”