2018-05-27 11:14 AM
Hi,
I'm using the BlueNRG-MS as HID peripheral and having trouble with the re-connection process.
In order to reconnect with the central, I use directed advertising.
The central recognize the slave and I get pairing complete event. The problem is that HID service remains encrypted for some reason and thus I cannot send HID reports (GATT services works). I can see that the device is connected.
What is the correct procedure of initiating a reconnecting between bonded devices ? pseudo code will be welcome.
Thanks,
Yon
Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-05-28 03:59 AM
Hi Yon,
What is the application you are testing for HID on the BlueNRG-MS device? I can recommend for reference the HID profile application included in the
package (~\Projects\Multi\Applications\Profiles_LowPower\).Kind Redards
Andrea
2018-05-28 11:58 AM
Hi,
I don't want to use this example because it is based on a compiled closed library.
I have mine own code which works fine, just the reconnection causing me problems.
Regards,
Yon
2018-05-29 07:07 AM
Hi Yon,
The projects included in the current version of the package (v3.3.0) are based on Profile Library in source form. You can use them as a reference point (e.g., in terms of parameter setting) against your own code.
Hope that can help.
Kind Regards
Andrea
2018-05-29 12:27 PM
Hi Again,
The project you have mentioned is very bad. All the relevant code is hidden in the compiled library. It is worthless for writing production firmware.
All I'm asking is a short pseudo code or sequence I should use in order to complete the pairing process successfully. Please help me with that.
Regards
2018-05-30 02:51 AM
Hi,
I guess you are missing something. Project '~\Projects\Multi\Applications\Profiles_LowPower' is one of the available applications which includes all Profile library files in source form.
Are you sure you are synced on the latest version of the package?
2018-05-30 01:59 PM
Hi,
I'm looking in this exact same project. Lets examine the HID file hid_profile.c, for example the function Advertize() is calling another function HidDevice_Make_Discoverable which is linked to the compiled library ProfPerip_HID_Device_L476RG.bin.
Could you please please please provide a short sequence for what I want? Why this have to be so complicated
2018-05-31 03:08 AM
Hi,
First of all, the file you are mentioning does not exist. HidDevice_Make_Discoverable() is invoked by Advertize() placed in hid_profile_application.c.
HidDevice_Make_Discoverable() is declared in 'STM32CubeExpansion_BLE1_V3.3.0\Middlewares\ST\STM32_BlueNRG\LibProfPeriph\Inc\hid_device.h' and defined in 'STM32CubeExpansion_BLE1_V3.3.0\Middlewares\ST\STM32_BlueNRG\LibProfPeriph\Src\hid_device\hid_device.c' both in source form.
Please, check your package version or download it again.
2018-06-21 11:20 AM
so I have download this version and run the example.
What I see is that the on the first pairing everything works fine, but after I reset the board and try again, the device gets 'connected' in windows Bluetooth control window, but no messages are sent. It seems like the link is not encrypted for some reason. any idea why?