Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

The ch_map[5] field in ble_gap_opt_ch_map_t to set channel map

Hi

SDK 15.2.0

ch_map[5] is 5 bytes long so 40 bits.

Can you please confirm if ....

ch_map[0] bit 0 corresponds to channel 0

ch_map[0] bit 7 corresponds to channel 7

ch_map[1] bit 0 corresponds to channel 8

ch_map[1] bit 7 corresponds to channel 15

ch_map[2] bit 0 corresponds to channel 16

ch_map[2] bit 7 corresponds to channel 23

etc

Look forward to hearing from you.

Kind regards
Mahendra

Parents
  • Hi
    Thank you for the confirmation.
    Actually the link you provide is the output from the documentation in the code which I had checked.

    Unless I am not seeing it, there actually is no information in the link you provide that maps the bits in the 5 byte array to the actual channel numbers. And it is the logical channel numbers that it seems to link to, not the physical channel numbers (37.38.39 are adverts but spread across the spectrum in physical space) so again that needs to be clarified.

    May I suggest that this information is updated in the documentation that is in the code.

    In the meantime I will convert this query into a public one

    Kind regards
    Mahendra

  • Hi Mahendra.

    I think you are suggesting documenting the endian-ness nature of ch_map in that structure. If that is correct, then I do not think that we need to. As a little-endian device, that is implicit that the byte order you mentioned will be that way and not in any other way.

    The description of the bit you mentioned in your actual query is breakdown of that member in the little-endian way. Which is implicit.

    if you even feel that the below member is not clear to you as to which bit refers to which channel, then I can send a message to the team to review it again.

      uint8_t ch_map[5];                      /**< Channel Map (37-bit). */

    - Andreas

Reply Children
No Data
Related