Skip to content

Baloo debugging

Romain Jacob edited this page Mar 11, 2019 · 4 revisions

Objective

This page contains common problems you may encounter while using Baloo. And how to solve them (hopefully).

Shall you face other specific issues, do not hesitate to write us about it!


Nodes never bootstrap

Situation
The implementation of the NET layer looks good, yet source nodes never bootstrap.

What do to?
The problem might be that you don't have any "host" in your network. The host ID is defined by the

#define HOST_ID

in the project-conf.h file. Make sure that the defined ID matches the ID of one of your nodes.


The host does not start sending

Situation
When the host starts, nothing seems to happen, with no failure message.

What do to?
The problem might be that you have misconstructed the control packet. Typically, the schedule section is overwriting the config section (see Baloo control packet description). As a result, the middleware does not find any valid configuration and stops.

Verify that you are setting the correct size for your control schedule section. This is controlled with the following define (set to 10 by default):

#define GMW_CONF_MAX_SLOTS

Slot starts but packets are not sent

Situation
The schedule and config section of the control packet look fine, but packets are not transmitted by the radio. For example, when using Glossy, Glossy is started, but the initiator never starts to TX.

What to do?
Likely, the problem is with the radio configuration. The packet you are trying to send might be bigger than the maximal packet size your radio is configured to send.

This configuration is controlled by the following define, which refers to the maximal payload size in Bytes of the data packets - see more details here.

#define GMW_CONF_MAX_DATA_PKT_LEN

Make sure to set a correct value for your application. The middleware takes care to correctly set the radio based on this parameter.


On the desk, nodes fail to bootstrap

Situation
When testing on the desk, nodes fail to receive the control packet and exit the Bootstrapping state.

What to do?
If nodes are too close to each other, the receive power at the radio might be too high to offer a reliable reception. Reduce the TX power (e.g., using the GMW_CONF_RF_TX_POWER define - see this page for more details) or increase the distance between nodes.


Buggy payload received from Glossy (sky mote only)

Situation
There is currently an issue in the case glossy_stop() is called during the first TX phase of a receiving node. It may happen that the received payload is not copied into the packet buffer, while the packet was received correctly in the preceding RX phase.
As a consequence, the middleware returns GMW_EVT_PKT_OK in the on_slot_plot() callback since the receive counter is not zero, but the payload is garbage (either the previous packet, or 0 if GMW_CONF_USE_AUTOCLEAN is set).

What to do? As a workaround, check whether the received payload is valid at the NET layer (which is anyway a reasonable thing to do). Another possibility is to increase the length of the time slots, to leave some time for at least one TX for each node to complete.


This concludes the overview of how to program with Baloo. Advanced functionalities are described in the Advanced features pages.