Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This section refers to the following sample application(s):

  • 01-blink

A mote needs to send a keepalive packet to each of its parents every 15s in the absence of a data packet being sent. This places a lower bound on the energy a mote consumes while in the network.  Blink replaces the contents of a normal join packet with user data, allowing the mote to stay in low power mode out of the network for long periods (typically hours), and only synchronizing to the network briefly when data is sent.  

Because the mote never joins the network, it cannot receive data downstream from the manager while blinking, but the user can switch between blink and proper joining at any time.  The mote does however synchronize to the network in order to blink, so precise network time is available to the user application after a blink packet is sent, however this synchronization drifts as time passes.

A more detailed explanation of Blink is found in the SmartMesh IP User's Guide.

To see blink data notifications on the embedded manager (>= 1.3.0) or VManager (>= 1.0.1), a mote must be on the manager's ACL.

The application is requires an active network with the same network ID as the mote. The application will blink a packet every 30 s, alternating between packets with and without discovered neighbors.

Blink app, ver 1.2.0.1
SmartMeshIP stack, ver 1.4.1.6
Blink packet queued...packet send with status 0
Blink packet queued...packet send with status 0
...

Should no advertisement heard within a specified timeout, the part will reset.  If the mote hears an advertisement, but cannot get an acknowledgement for the blink packet, then the packet will timeout and a txDone notification will be generated with an error:

Blink packet queued...Blink timed out - resetting
Blink app, ver 1.2.0.1
SmartMeshIP stack, ver 1.4.1.6
...
Blink packet queued...847139 : MAC pdu tout d=1 grId=1 pr=1 jnLk=0 txInfo=0 (0.0
.0) forw=0 asn=8362 tout=2826327 mic=8cfe007e
packet timed out at link layer
...

Implementation Details

The 01-blink sample application uses the Helper Modules to initialize the CLI Module and for interaction with the local interface. It passes JOIN_NO in the fJoin flag when initializing the local module in the loc_task_init() to prevent the local module from attempting to join, since the application will use the blink API instead. It also installs a callback function txDoneNotifCb() to handle txDone (i.e. the indicated packet has been sent) notifications.  

It uses a single task (blinkTask) which:

  • Generates a dummy packet
  • In a while(1) loop, the applicaition pends on the blinkSem semaphore with timeout of BLINK_PERIOD ms.
  • If the previous packet fails due to no advertisements being heard in BLINK_TIMEOUT ms, the mote resets.  If it succeeds (or this is the first packet), the application queues a blink packet using the dnm_loc_blinkPayload() command.
  • Loops indefinitely, alternating between packets containing neighbors, and packets without neighbors.
  • No labels