How to enable multiple BLE notification and indicate in central side

I am able to subscribe for differen

t notify and indicate function .But i didnt get the data in notify and indicate function. i am add the code and log files

Parents
  • Hi Goudam, 

    Could you try to capture a sniffer trace ? We would need to verify if the characteristic CCCD attribute has been written or not. 
    I would suggest to test with one single characteristic first before moving to multiple ones. 

    Have you made sure the peripheral actually try to send notification ? 

    Have you tried to test with the peripheral_uart and the central_uart ? Did they work for you ? 

  • I did not use sniffer trace. However, in the NRF Connect app, I enabled the CCCD attribute, and it worked. How to Enable the CCCD attribute in Central

    I've already tried with single characteristics, but the problem is that I need to subscribe and write for all of the services in order to get data, so I tried to subscribe to all of them.

    I had already tried health rate measurement and it worked, so I continued in the same manner.

  • Hi Hung BuI,

    Could you share how to enable man in the middle security ? 

    I will try the sniffer trace and i will update you

  • Hello, 


    How does the temperature sensor do pairing with the phone ? does it have a display or it has a button or anything ?
    Please take a look at the uart example to see how passkey/numeric comparison work. 

    If the sensor has a display and you need to input the passkey into the central firmware you need to call 

    bt_conn_auth_passkey_entry() when you receive passkey_entry() callback. 
  • There is no display in the sensor, and we are connecting it using the steps below.

    1. Define the fever alert threshold.

    2.Enter the current time.

    3. Select the CCCDS option.

    Sensor does not work if we enable notify and indication separately.

  • Hi Goudam, 

    If the device doesn't have any display or keyboard how did you pair with MITM protection with the phone ? 
    Note that if only level 2 needed (no MITM ) then you can pair with Just work. 

    I'm afraid that we can't really help you on this case as it's more about the behavior of a 3rd party device that we are not familiar with. 

    What I can suggest you is to test using a peripheral (dummy device) that mimic the 3rd party device. So that you verify you can do all the task of connecting, service discovery, enable CCCD and can receive notification (from the dummy device) only after that you can start testing with the 3rd party device. You can then compare the trace between the dummy device and your central, vs the trace between the 3rd party device and your central. 

Reply
  • Hi Goudam, 

    If the device doesn't have any display or keyboard how did you pair with MITM protection with the phone ? 
    Note that if only level 2 needed (no MITM ) then you can pair with Just work. 

    I'm afraid that we can't really help you on this case as it's more about the behavior of a 3rd party device that we are not familiar with. 

    What I can suggest you is to test using a peripheral (dummy device) that mimic the 3rd party device. So that you verify you can do all the task of connecting, service discovery, enable CCCD and can receive notification (from the dummy device) only after that you can start testing with the 3rd party device. You can then compare the trace between the dummy device and your central, vs the trace between the 3rd party device and your central. 

Children
  • Hi Hung,

    On the vendor side, they mentioned that I should switch the security from L1 to L2 in sequence to subscribe to the battery,alert,position,human temperature measurement service, and then I should switch the security from L2 to L1 in order to write current time and fever threshold service, but switching from L2 to L1 never occurs; it is always in L2.

  • Hi Goudam, 

    The Bluetooth pairing always aim at highest possible pairing method. In this case if you have a display or keyboard it will try to do encryption with L2. 
    But please clarify with me that you have a keyboard of display or static passkey with the sensor. You mentioned you didn't have that. Without keyboard/display/static passkey how did you do L2 ? 

    Usually it shouldn't be an issue when doing a higher security level on a characteristic require lower level of security. Meaning if you are at L2 you can write to a characteristic requires L1. 

  • We don't have a keyboard, monitor, or passkey. However, the vendor stated that the security should be changed from L2 to L1 for write to a characteristics. I tried the method listed below to set security; if security changes successfully, it calls the security changed function, but it does not indicate whether the security change was successful or unsuccessful. How do I set the passkey in L2?

    .

  • Is there another way to change the security level from high to low?

  • If you don't have any keyboard or display on the device there isn't a way to do L2. 
    Please ask the vendor how they do L2 without keyboard or display. 

    Please answer, when you use NRF Connect on the phone and you connect to the sensor, did everything work as expected ?