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

Data transfer between Bluetooth SIGmesh and Cloud Server

Hi,

Greetings!

I am trying to develop a device called as "Gateway", which can receive SIGmesh messages and update/send those messages to cloud server and vice-versa.

Gateway: Please note that this device will have nRF52832 module and Wi-Fi module.

Wi-Fi module to be used for communicating with cloud server.

So for simplicity and to start with, here I am considering SIGmesh to Cloud Server communication.

After having a look at source code from SDK for mesh 4.0.0, I came across "mesh_msg_handle()" in access.c file.

If I am right, I think all mesh messages within network got first dumped here and then proceeds further to respective SIGmesh model handler.

If it is correct then can I make use of it for my Gateway development, means all the received messages to be transferred to Wi-Fi controller (present in Gateway), which then transfers to cloud server.

If it is not a correct way then please guide me on how can I implement it in proper way?

Thanks in advance.

Regards,

Dinesh

Parents
  • Hi Dinesh, 

    Bluetooth Mesh is designed as a local network, at least on current version 1.0.1. There is no definition on how it should be transferred to the cloud. So it's up to you to decide how you want to send the data to cloud.

    mesh_msg_handle() is the place that the node handle all the packets that:

    - Have the destination address inside the subscription address list, including the unicast address of the node

    - Have the network key/subnet key that in the subnet/network keys list. 

    - Have the application key in the application key list. 

    This meant, only those packet that supposed to be processed by the Gateway node will be processed here.

    You can forward all the data inside that function to the cloud. But you can also have some logic for example only forward the message to a certain model to the cloud and you will only forward the content of the payload, not the full mesh packet for example. 
    It's all up to you to customize it to fit to your application. 

  • Hi Hung,

    Greetings!

    Pleased to have your reply once again.

    Your and your team guidance is helping us so much.

    So moving ahead further in accordance with your above reply, can you please help me bit further on below points?

    Considering all keys (network, subnet, application etc) are present

    1. If Gateway device subscribes to all address (0xFFFF), then will I able to receive all packets within that network?

    2. Which functions does handle encryption and decryption of mesh message?

    3. I am thinking of sending encrypted message to cloud server so that based decryption it can be handled further for which network the message is desired.

    4. Or I have to add some labels and forward message to cloud.

    Please guide.

    Regards,

    Dinesh

  • Hi Dinesh,

    1. No, the address 0xFFFF is the address that all nodes subscribed to. This means if a node send a message to 0xFFFF all nodes in the network will receive it. Not the other way around.

    2. It's handled on network and transport layer. There are 2 levels of encryption, first is with the network key (handled in network layer) and second is with the application key on upper transport layer. 

    3. If you want to send encrypted packet to the cloud, please use other common encryption on top of your data and don't use the Mesh encryption, for example use AES. 

    4. I don't know what you are planing to do and what your application is about so I can't give you more detailed advice.  

Reply
  • Hi Dinesh,

    1. No, the address 0xFFFF is the address that all nodes subscribed to. This means if a node send a message to 0xFFFF all nodes in the network will receive it. Not the other way around.

    2. It's handled on network and transport layer. There are 2 levels of encryption, first is with the network key (handled in network layer) and second is with the application key on upper transport layer. 

    3. If you want to send encrypted packet to the cloud, please use other common encryption on top of your data and don't use the Mesh encryption, for example use AES. 

    4. I don't know what you are planing to do and what your application is about so I can't give you more detailed advice.  

Children
No Data
Related