Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor fixes to spelling, grammar
Info

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

  • 01-join_control

...

Info

This application is new to OCSDK 1.2.0


Energy to join a network when it is present is roughly constant - joining is either faster but at higher current, or slower but at lower current.  In some cases however, e.g. when there is the possibility that the network may not be present for long periods of time, it may be desirable to listen for a short period of time, then return to a low power mode for a longer period, waking periodically to listen for the network.  Normally, the mote uses the joinDutyCycle parameter stored in its persistent parameter settings (default = 64 or 25%), and will listen continuously at this duty cycle until it joins a network.  The 01-join_control sample application relies on the local module to handle joining, but modifies the joinDutyCycle while the mote remains searching for the network. 

...

The application is best used with the manager initially turned off. The application cycles through listing listening at 100%, 5%, and sitting in idle (burning a few µA).    

No Format
Join app, ver 1.2.0.1
SmartMeshIP stack, ver 1.4.1.6
Setting Join duty cycle to 100%
Setting Join Duty Cycle to 5%
Stop listening and return to idle state
Starting to try joining again...
Setting Join duty cycle to 100%
...

...

The 01-join_control sample application uses the Helper Modules to initialize the CLI Module and interaction interact with the local interface. In particular, it configures the loc_task helper module to join the network  - it tells stops the local module to not open from opening a socket by passing NULL in the port field. 

It uses a single task (joinTask) which, in a while(1) loop:

  • Sets the joinDutyCycle to 100% and pends on the joinedSem semaphore with a timeout HI_TIMEOUT
  • If the timeout is reached, it sets the joinDutyCycle to 5% and pends on the joinedSem semaphore with a timeout LOW_TIMEOUT
  • If the timeout is reached, it issues the dn_loc_stopSearchCmd() and waits for IDLE_TIMEOUT
  • It then issues dnm_loc_joinCmd() to start the mote listening for a network and repeats the loop
  • If the mote successfully joins, it prints a success message (repeatedly) and doesn't modify the join duty cycle further

...