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?
Many thanks and best regards
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.
After that, using peripheral_server_hid for reference, you can add HID profile into Free_ble_peripheral_server_bond project.
Thank you for using our community forum!
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
- device role application manager */
At the moment I am still facing some errors while adding HID profile to the freertos_… project.
Best regards and nice weekend
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.
Since I have selected DIO5 (BUTTON_DIO) for UART_TX , so this project selects DIO0 (touch to ground) to perform keyboard click.
To verify this HID function (after pairing success), you can use GPIO0 pin and touch to GND pin.
On your computer go to Bluetooth & other devices,
Once connected RSL10 board , DIO6 LED is steady on.
Touch DIO0 pin to the GND pin on the RSL10 board and you will see letters on notepad , which are defined in on_semi_banner_str.
static struct on_semi_banner_str on_semi_banner
freertos_ble_peripheral_server_bond_H.7z (598.9 KB)
Thank you for using our community forum!
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.
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.
Hi @naer ,
Yes. You are right. The project is just a reference to show HID profile.
The ble_hogpd.c is not optimized.