Gateway shield & DK - strange behavior


#1

I have a Gateway shield with an Electron that is connected to two Bluz DK units. Each DK unit is connected to a sensor. Both Bluz units are running identical code. The two units are outdoors and separated by 3 feet and 15 feet from the Gateway shield.

After accumulation in the DK of 20 data-points from the sensor, the data from each sensor is sent to the Gateway shield by each DK. The system mostly works where each respective DK updates the Shield. BTW, data point accumulation for each DK is random (i.e. it is unlikely that both DKs are talking to the shield at the same time).

I am having a peculiar behavior where the farther DK is (sometimes) accumulating a much higher number of data-points (over 2000) before sending it to the Gateway shield. I know from counters inside that DK unit that it did not restart or reset.

As the code in the two Bluz units is identical, I am at a loss to understand what may be causing this?

I would appreciate any insights into what to look for as it is extremely hard to debug a gateway application especially a remote one.


#2

Hey @jimmie, I don’t have an answer, but I had a similar situation where two controllers running the same code behaved differently. That turned out to be a simple numerical comparison causing different results.
So, the fact that the same code should produce the same behavior is not always true.
I would check the kinds of data each Bluz is reporting and what decisions each one has to make, if any.
As always, a link to the code can speed up the debug.