Decoding message sent by Gateway shield to a connected DK


#1

I would appreciate the community’s help in code showing how to read a message sent by the Gateway shield to a connected DK? The message sent by the Gateway shield has an integer value that will be used to change a DK variable.

Thanks in advance.


#2

You can see in this tutorial where the DK receives the data from the gateway shield: http://docs.bluz.io/tutorials/local_communication/#programming-bluz

The function is dataCallbackHandler, and the data that is handed into that function is the data the gateway shield sent. You can then parse this however you need for your use case. In the example in our docs, the data isn’t used for anything, but it is available.


#3

Does the Bluz need to be blinking white to connect to Gateway shield? If that is the case, how can one debug the Bluz code if I cannot connect to the Bluz board?


#4

Blinking white means that bluz is in local communication mode. It will connect to the gateway, but not the cloud. When it is in this state, the gateway and DK can send data back and forth to each other.

Before it gets to the blinking white state, it will be in the blinking green state until it connects to a gateway.