Info |
---|
This section refers to the following sample application(s):
|
...
Info |
---|
This application is new to OCSDK 1.2.0 |
Network ID is used to separate overlapping networks - devices reject packets with a mismatching network ID early in the packet receiving process. This necessitates configuring the correct network ID on a mote before placing it in the field.
...
The application is best used with mutliple networks on different network IDs within range of the mote being tested. The application listens for a preferred network (PREFERRED_NET
), and then joins it or the loudest network heard after a timeout (SEARCH_TIME
).
No Format |
---|
Search app, ver 1.2.0.1 SmartMeshIP stack, ver 1.4.1.6 Searching for preferred network 2931230 for 30 s... Heard network 118 at -82 dBm (louder than previous best) Heard network 103 at -85 dBm Heard network 95 at -86 dBm Heard network 102 at -81 dBm (louder than previous best) ... Joining network 102... |
...
The 01-search
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 joining will be handled by the application. It also installs a callback function advNotifCb()
to handle advertisement notifications. It has a helper function operationalCheck()
that polls the mote's status to determine if the mote is in Operational mode (i.e. ready to send data).
It uses a single task (searcTask
searchTask
) which:
- Issues the
dnm_loc_searchCmd()
and waits forSEARCH_TIME
ms. - Issue the
dnm_loc_joinCmd()
to join either the preferred networkPREFERRED_NET
or the loudest network heard during the search. - Loops indefinitely, printing out a status message if the mote is operational.
...