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

Publish Period format not aligned with mesh standard definition

In acces.h there is the publish period format definition, which is

/**
 * Model publish period structure.
 */
typedef struct
{
    /** Step resolution. */
    uint8_t step_res : ACCESS_PUBLISH_STEP_RES_BITS;
    /** Number of steps. */
    uint8_t step_num : ACCESS_PUBLISH_STEP_NUM_BITS;
} access_publish_period_t;

However in sectiion 4.2.2.2 of the MshPRFv1.0.1 it states differently and it should be

/**
 * Model publish period structure.
 */
typedef struct
{

    /** Number of steps. */
    uint8_t step_num : ACCESS_PUBLISH_STEP_NUM_BITS;
    /** Step resolution. */
    uint8_t step_res : ACCESS_PUBLISH_STEP_RES_BITS;

} access_publish_period_t;

Parents
  • Hi,

    Thank you for raising concerns regarding the bit ordering of the bit fields. I have reported it to the developers for them to have a look into it.

    The internal representation used by our SDK is not necessarily the same as what is sent over the air, even though the structure is similar. That means this is not necessarily an error, but it is good to have it checked anyway.

    Have you experienced any compatibility issues when connecting nRF based Bluetooth mesh devices with other devices, that can be tracked down to different interpretation of the Access Publish Period structure?

    Regards,
    Terje

  • Hi,

    The mesh team had a look at the matter, and the structure you mentioned is only used internally. For communication over the Bluetooth mesh network, we use the usual patterns of masks, bitshifts and other bit operations to put the fields in the correct location and to read from the correct locations within the packets. Bitfields cannot be used for that, as implementation differs between toolchains.

    Regards,
    Terje

Reply
  • Hi,

    The mesh team had a look at the matter, and the structure you mentioned is only used internally. For communication over the Bluetooth mesh network, we use the usual patterns of masks, bitshifts and other bit operations to put the fields in the correct location and to read from the correct locations within the packets. Bitfields cannot be used for that, as implementation differs between toolchains.

    Regards,
    Terje

Children
No Data
Related