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

Bluetooth_Mesh_Send_Packet

Hi ,

I'm new to working with NRF52 and Bluetooth mesh, I wanted to change some parts of the light_switch_client and server projects to be able to send other data than just the 0 and 1 (on or off) values, I want to be able to send uint32_t value , I know that I have to change the struct in simple_on_off models and simple_on_off_common files, but instead of making 4 uint8_t is it possible to just make a single uint_32_t value and send it using (access_model_reliable_publish()), cause I checked this function and the data type in the (access_message_rx_t) and (access_message_tx_t) and they have the pointer to uint8_t value to the first byte of the buffer and the length of the data to send, should I also change them or I'm not allowed to manipulate them?

Thank you for your helps

Parents
  • Hi Khoz,

    Data send over the air will be a byte array anyway. I'm not sure why you want to change the way access_message_tx_t and access_message_rx_t defined now to something else ?

    You can always convert your uint32_t to a byte array of 4 and then convert them back. Have a look here.

    You can change the stack as much as you want, but when you get to the radio it will be a pointer to byte array and the length that will be transmitted.

Reply
  • Hi Khoz,

    Data send over the air will be a byte array anyway. I'm not sure why you want to change the way access_message_tx_t and access_message_rx_t defined now to something else ?

    You can always convert your uint32_t to a byte array of 4 and then convert them back. Have a look here.

    You can change the stack as much as you want, but when you get to the radio it will be a pointer to byte array and the length that will be transmitted.

Children
Related