Can't change services

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hey,

i tested the sample code "heart_rate_monitor" on BCM920732_BLE_KIT and with LightBlue on my mac. Works great.

So i deleted the last service "UUID_SERVICE_DEVICE_INFORMATION" in the variable blehrm_spar_db_data[] but in LightBlue

were all services (1801,1800,180D,180A).

Or with "hello_sensor" i saw with LightBlue the services 1801,1800,180D,180A and the last service UUID_SERVICE_BATTERY (180F) is missing??

Always the same 4 services 1801,1800,180D,180A. Neither more nor less


Am I on the completely wrong way?!?

0 Likes
1 Solution

Sorry, if you are using 20732 your filenames would show 20732.  I was referencing 36/37 and SDK 2.0.


DLConfigBD_ADDRFALG is Bluetoooth Device Address to be programmed in your device.  The asterisks allows build environment to create a kind of random address.  So that you program 5 different devices on 5 computers the address will be unique.  You can change that to be specific 12 hex digits.  Like 20732A000001, or 00caba1ca99e. 

View solution in original post

6 Replies
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

LightBlue can be caching services of your paired, or previously connected device.  The simples way would be to change BDADDR of your device.  It can be done in the WICED-Smart-SDK\Platforms\BCM920736\20736_EEPROM.btp. (or 20737 if you are building for 20737 target.  It can be also _SFLASH if your device uses serial flash rather than EEPROM).

Anonymous
Not applicable

I think you mean the path: WICED-Smart-SDK\Platforms\BCM920732\20732_EEPROM.btp and the variable DLConfigBD_ADDRBase ="20732A0*****"!


I changed it to "20732A2*****", download "hello_sensor" and got in LightBlue 1801,1800,1803,1802,1804,180F. ?!?!Why??

After i changed it to "20732A4*****", download "hello_sensor" and got in LightBlue 1801,1800,1B7E8251-2877-41C3-B46E-CF057C562023,180A,180F. Yeah,....these are the correct services .For a test i changed it to "20732A6*****" and got the correct services again .

Can you explain me the impact of the DLConfigBD_ADDRBase!?!?

But if i delete in the "hello_sensor_gatt_database[]" the Battery service, it's still displayed in light blue!?!


0 Likes

Sorry, if you are using 20732 your filenames would show 20732.  I was referencing 36/37 and SDK 2.0.


DLConfigBD_ADDRFALG is Bluetoooth Device Address to be programmed in your device.  The asterisks allows build environment to create a kind of random address.  So that you program 5 different devices on 5 computers the address will be unique.  You can change that to be specific 12 hex digits.  Like 20732A000001, or 00caba1ca99e. 

Anonymous
Not applicable

Ok thanks that's very helpful.

DLConfigFixedBD_ADDRFALG or DLConfigBD_ADDRBase?! I changed always DLConfigBD_ADDRBase.


I tested it with serveral services and characteristics. E.g. DLConfigBD_ADDRBase is "123456789012" with 5 new different serivces. LightBlue shows all 5 services. All OK. But if i replace/delete one service LightBlue shows the old one. Only when i change the ADDRBase e.g. to "123456789013" i see the new one. I have tested it a few times.

And if i use a old number i see the services that i tested with this number?! The numbers are stored with the respective services?


In summary, for me this means when i add/delete a service/characteristic i have to change the DLConfigBD_ADDRBase. Confused! Is that right?!
0 Likes
Anonymous
Not applicable

Ahh i think i found the error/bug whatever....

The Macbook stores each connected device. Logically. I found over 30 old connections (all BCM920732 with different adresses) and deleted all.

The relation between the ADDR and the services were the old stored connections.

When i add a new service/characteristic i musst delete the old stored connection on my Macbook. The services in LightBlue updates only when it sees a new device and start a connection.

Now makes all sense except why LightBlue the services not always updated .

OK  now I'm happy, thanks a lot...

That's correct.  To work right you either need to change BDADDR of the board when you load a different set of services.  Or make sure that services are not cached on the client side.  This is a test lab problem which never should show up in the field.

If your device can really change the GATT database after it has started talking to a client, there is a "standard" way to tell the client about that.