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

Question from Bluetooth low energy Characteristics, a beginner's tutorial - challenge 2

Hello, 

I followed this tutorial in order to familiarise with the code and understand better what is going on. Now, my question is the following, regarding challenge 2:

I am using nRF connect phone app to read/write bytes into the characteristic. But I do not see any difference between BLE_GAP_CONN_SEC_MODE_SET_OPEN and BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM.

Of course, for BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS, I cannot read or write (that worked as I expected).

But what should I expect for the other 2 options? I can easily read or write, there's no difference. Should any kind of window pop-up, or do I need to look for something else, in order to see how the encryption is performed?

Thanks in advance. 

Parents
  • Hello Amanda,

    And thanks for explaining me this! In the mobile app, it seems that every time I connect, I bond by-default. But it's good to know that this means an encrypted communication - thanks!

    I have some new questions: going on with the same tutorial, I tried to send the values of the temperature to the application, as notification, but I am a bit confused:

    1. How should I interpret these values? Should I translate them from hexa to decimal? Although 0x76 means 118 dgr in decimal, so I guess there should be another trick.

    2. Why are the first bits of the characteristic changed? I understood that the least significant bits should be changed, according to the different temperatures experienced by the sensor. Please see the two attachments:

    Thank you for noticing me regarding the summer-holidays delay.

    Best regards, Marry

  • Hi Marry,

    Marry said:
    1. How should I interpret these values? Should I translate them from hexa to decimal? Although 0x76 means 118 dgr in decimal, so I guess there should be another trick.

    See this post.  

    Marry said:
    2. Why are the first bits of the characteristic changed? I understood that the least significant bits should be changed, according to the different temperatures experienced by the sensor.

     You could use ble_gatts_hvx_params_t::offset to modify the offset within the attribute value. See this post

    -Amanda H. 

  • Hello,

    See this post.

    Unfortunately, this does not answer my question. I was confused of how to interpret that value, since 0x76 means 118 dgr in decimal. And this post confirms what I thought, i.e. that I should convert the data from hexa to decimal. But still, I do not understand my 118 (decimal) degrees value. 

    Additionally, one could say that the last bytes (AA) are the temperature, but that's 170 dgr in decimal, therefore, it also does not make any sense. 

  • Hi, . After reading more about the temperature sensor, I found out that it actually measures the temperature inside the chip. Therefore maybe 118 degrees could be possible. Could you please tell me if this is the right way to read that value? Thank you in advance.

  • Hi Marry, 

    You should search on Devzon for the similar questions like this retrieve-characteristic-value

    The support staff is reduced during the summer holidays, and you may experience delayed answers.

    -Amanda H. 

Reply Children
Related