I am using the “freertos_ble_peripheral_server_bond” example which includes a custom and a BAS service profile. I would like to extend this example with other profiles such as HID or custom services.
Custom services are not the problem since I can copy+paste the existing “app_customss” source and header files and rename and modify it.
I struggle more with adding the HID profile.
I compared the projects “freertos_ble_peripheral_server_bond” with the “peripheral_server_hid” and I see some differences in how the profiles are added.
The guide “RSL10 Sample Code User’s Guide” describes a way how to extend existing projects with either premade profiles or custom services. The description matches with the files of “peripheral_server_hid” but not with the “freerots_ble_peripheral_server_bond”. So how do I included the HID profile there? I enabled in the rte the profiles HID but no code is generated in “RTE → Device → RSL”. Doesn’t need to be code generated such as in “ble_hid.c” which can be used in the application layer?
So far RSL10 abstraction can only support a few of standard profiles which can check and then add related *.c file and *.h into RTE - Device - RSL10 folder automatically.
They are listed in here.
Unfortunately, HID profile is not there so far.
You need manually copy ble_hogpd.c and ble_hogpd.h from peripheral_server_hid project into
RTE - Device - RSL10 folder.
Thank you very much for your reply. So I explain what I did:
I copied the ble_hogpd.c and .h files from the “peripheral_server_hid” into the RTE → Device → RSL10 folder and followed the instruction in the pdf file Sample Code Users Guide in chapter “How to Add a New Standard Service/Profile”. There I inserted the CFG_PRF_HOGPD in the includes and the amount of error reduced.
I now recognized that the ble_hogpd file does not have the same structure as the ble_bass files from the freerots_ble_peripheral_server_bond example. The instruction in the Sample Code User Guide does not seem to fit for the freertos example. Are you sure it will work like that or how am I supposed to implement this? I see a discprepancy between your documentation Sample Code Users guide and your example freertos_ble_peripheral_server_bond.
For example in the ble_bass.h from RSL10 folder there is not list of message handler such as in ble_hogpd.h.
/* List of message handlers that are used by the HID over GATT profile for
I have attached a modified freertos_ble_peripheral_server_bond project and I have added HID profile.
The reference project (freertos_ble_peripheral_server_bond) is based on RSL10.3.6.465.
Thank you for your reply. I have been analyzing this code and the integrated HID part is quite helpful.
I have still some questions and issues with the project / system.
First of all, you inserted “ble_hogpd.c” in the source folder. I am wondering, if the code there is on the application layer or still belongs to the ble stack like the ble_diss.c file in folder RTE->Device->RSL.
So what I would do next, is to seperate the functions and definitions in the ble_hogpd files into ble_hogpd and app_hogpd file, so the structure is the same as with the remaining profiles. Is this method reasonable?
Next I downloaded the project on the RSL10-sense-gevk development board. As central device I am using the nRF Connect App. The data from the custom service can be received, also the battery level is transmitted correctly. Unfortunately, I receive 30s to 2 minutes after connecting the GATT Error 0x8 on the nRF Connect app. The time seems to be random. Similar issues in forums tend towards a hardware issue. I tried another RSL sense GVK eval board and it behaves the same way. I have no idea what causes this error. Do you have an idea?
What I am gonna do is to install a sniffer and take a look at the transfer.
You can build your own app_hogpd.c and app_hogpd.h for your own application.
You can use ble_hogpd.c and ble_hogpd.h as abstraction layer files. (like ble_diss.c etc.)
The attached project is for our RSL10-002GEVB. I has not been tested on RSL10-sense-gevk development board.
Could you please try this on RSL10-002GEVB and see if you can get the same issue?
Thank you very much for the response, that helped.
I still think, that in the ble_hogpd.c file are some functions they should be in the app_hogpd.c file. Am I right?
I will look if we have the RSL10-002GEVB inhouse.
Cheers
Robert