FOTA with custom services

Hi,
QUESTION:
We want to use the FOTA Image system with our custom application. There are custom BLE services in this app. But the FOTA user’s guide indicates:

Is there an example to illustrate how to add custom services and characteristics with FOTA system?

Best regards,
Yann

Hi Yann,
The FOTA Service can be used alongside with other custom services but it requires some modifications from the basic FOTA example.
The difference is that all attributes defined by all custom services (including FOTA) must be inserted into single attribute array that can be passed to the GATTM_AddAttributeDatabase function in one go.

As an example, this has been done in the firmware for the Lighting Kit platform which uses 3 custom services + FOTA service.
The source code for the platform is part of BDK CMSIS-Pack, example: Lighting Kit Firmware (FL7760, RTOS, FOTA).
The creation of attribute database is located in source/module/lk_ble_custom_attdb.c file.

Lighting Kit page+pack: Link

Hi Lukas,
thanks for you answer.
I will take a look at this example.

Hi,
i have added all custom services in the same array before the use of the GATTM_AddAttributeDatabase function. but at the discovery of services, the BLE client only see the first service and not the second service (DFU service). the second one is included in the first and it is seen as a secondary service (not a primary).
it seems I’m missing something.
is there another example like the “ble_peripheral_server_bond” but with 2 or more custom services (without RTOS and BDK) even without FOTA?
Best regards,
Yann.