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

Multiple switch on a single server node

Hello,

I had been looking at BLE mesh documentation as well as the examples on the SDK and looks every node should have a dedicated function. generic on/off server controlling one switch, sensor node reading one sensor and I think that's the BLE specification. I am looking for a way to control more things in one node ie 4 wall sockets on a single node, temperature and humidity sensors on a single node. Is there a low level interface to receive and send string instead so that the every node will parse the string? or is there a better way to handle what I want?

My purpose is to use a single BLE module for multiple functions

Regards,

  • Hi Lakay, 

    If you have a look at our light switch client example you can find that we have 2 elements on one node. Each element has a light switch client. It's initialized in models_init_cb() function. 

    If you want to have multiple servers that control multiple light bulb you can choose to do the same thing. Note that on one element there should be only one server/client with the same model. This is the reason why we have multiple elements with one model on each element. 

    If you plan to use a generic model to control multiple application/sensor you can define your own model (something similar to the UART service we have in Bluetooth LE). You can follow our simple on_off model in our SDK (models/) and instead of sending 1 byte you can send a byte array instead. 

  • Thank you for the inputs. I'm progressing more quickly :D 

Related