Info |
---|
This section refers to the following sample application(s):
|
...
Info |
---|
This application is new to OCSDK 1.2.0 |
A mote needs to send a keepalive keep-alive 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.
...
Note |
---|
To see blink data notifications on the embedded manager (>= 1.34.01) or VManager (>= 1.0.1), a mote must be on the manager's ACL. |
The 01-blink Sample Application
The application is requires an active network with the same network ID as the mote. The application will blink a packet every 30 s30s, alternating between packets with and without discovered neighbors.
No Format |
---|
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 If no advertisement is heard within a specified the application's timeout, the part application will reset the mote. 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:
...
It uses a single task (blinkTask
) which:
- Generates a dummy packet. The same packet data is used for every blink.
- In a while(1) loop, the applicaition application pends on the
blinkSem
semaphore with timeout ofBLINK_PERIOD ms.
- If the previous packet fails failed due to no advertisements being heard in
BLINK_TIMEOUT
ms, the application resets the mote resets. If it succeeds the blink operation succeeded (or this is the first packetattempt), the application queues a blink packet using thednm_loc_blinkPayload()
command. - Loops indefinitely, alternating between packets containing neighbors, and packets without neighbors.
...