This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hrs Peripheral Example

Hi, can you assist please....

I am using the Hrs example in SDK 17.0.2 as the basis for an application.

Using an unmodified code by loading the supplied hex file ble_app_hrs_pca10040_s132.hex loaded into an nRF52 DK board I notice a few things...

If I use the nRF Toolbox App everything appears to work fine and I see Advertising, Connection and the peripheral sending data to the App via a Sniffer/nRF Dongle. This does not appear to use LESC.

However if I follow the in the example notes https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Fhardware_driver_twi.html&cp=4_0_0_2_18

and use nRF Desktop I am not able to observe the same behaviour. I can connect via nRF Desktop & I see Advertising via the Sniffer ok. I follow the notes to initiate pairing and that looks good but if I press "Play" to try and get data from the peripheral nothing happens, meaning I don't see a regular transmission from the Slave/peripheral and eventually there is a disconnection by the Slave.

Whilst following the sequence in the notes I get this report from nRFdesktop. 

After connection but before the Disconnection I get this Sniffer trace which shows the pairing appears completed ok but thereafter I don't see anything coming back from the peripheral/slave.

In nRF Desktop I get a green text indicating Pairing ok?

This is the "Play/Stop" button in nRF Desktop I am using...

So I think I am following the test notes ok but maybe I'm doing something wrong or there is some more detail?

If I retry a connection but without pairing again I get...

So the link appears to use encryption ok but the result is the same meaning there is no Peripheral/slave regular transmission of (heart rate or other) data and after some timeout...

If I clear the bonding info by resetting on the nRF52 DK and go through the same procedure but without pairing I get the same result, meaning no regular transmission of heart rate etc from the Peripheral/slave.

This is the Sniffer trace in the above case.....

I have followed the pairing settings shown in the example notes which show to enable LESC,MITM & Bonding. I did do that but also not enabling MITM and I don't see any behaviour change, I consider the Peripheral ignores the MITM setting. The same goes for the I?O capabilities. I'm not sure MITM is valid using the nRF52 DK so perhaps this setting is not valid for the notes.

My application will want to use LESC and so I need to understand what is going on with these observations.

Your help would be appreciated.

Have a great weekend.

Martin

  • Hi, I developed the peripheral application further with another nRF52 DK programmed with the Hrs central example. That pair of boards works as expected and so now it is nice to know the reason why the observations in the thread above are being made. 

    Regards Martin

  • Hi Martin, 

    Are you able to provide the log from the terminal tool? 

    Would you see the same issue if you do "Erase all" before "Erase & write" on that board? I cannot reproduce that issue on my side and hard to say what causes that without the log. 

    -Amanda H.

  • Hi Amanda

    I'll revisit this shortly. However to program the central I just dragged the hex file to the JLINK drive of the nRF52 DK. So will erase all/reprogra using nrF Connect programmer and see if that changes anythng.

    Regards Martin

  • Hi Martin, 

    I see. Please let me know the result. Thanks. 

    -Amanda H.

  • Hi Amanda

    I just revisited this issue.

    Using a nRF52 DK - First I used nrF Connect Programmer to erase all and then program with the supplied hex file in the Hex files folder for Hrs Ble Peripheral.

    Then I use a new nrF52 DK board with nrF Connect which programs that board.

    Using the BLE app in nrF Connect Tools I go through the same procedure to try and pair with the Ble Hrs peripheral.

    I re do the procedure to pair ok and thne press Play.

    Here is the terminal output of the Ble peripheral stating reason 34 for the disconnection.

    and here the Log output in nrF Connect BLE App.

    Showing the attribute value change/written and then a connection update and then disconnection.

    As mentioned before, my adapted version of the Hrs peripheral (which is on a Fanstel board) and using nrF52 DK board programmed with the Hrs Central it is working fine.

    Also ok if I use a nrf52DK programmed as the Central, functions as expected with Peripheral.

    So I'm happy with that but it would be good to know why this method is not working. 

    Regards Martin

Related