NB SCAN
最終更新
最終更新
NB SCAN (Neighbour Scan) is used to search for neighbouring nodes.
The node performing the search sends a broadcast request for a response. Surrounding nodes respond to this and report a list of nodes that have responded. The nodes are sorted by LQI.
Only available on .
Under relatively stable and low traffic conditions, the success rate of the search will be high, but if conditions deteriorate, the search may not be possible at all.
In poor conditions, the node that should announce its presence periodically sends beacon packets using broadcast communication, and the searcher receives these beacons and implements a check for the presence of neighbouring nodes.
The searcher should define ToCoNet_USE_MOD_NBSCAN
and the searched should define ToCoNet_USE_MOD_NBSCAN_SLAVE
.
Start the neighbourhood search.
uint32
u32ChMask
Channel mask to search (1UL<<16
for ch16 only, 1UL<<16|1UL<<17
for ch16,17)
uint16
u16Dur_ms
The search time for each channel. Roughly 50ms or more is recommended.
boot_t
If TRUE
the request was accepted, if FALSE
the request was not accepted.
A neighbourhood search is started with the aim of finding a node at a specific address.
uint32
u32ChMask
Channel mask to search (1UL<<16
for ch16 only, 1UL<<16|1UL<<17
for ch16,17)
uint32
u32Addr
The long address of the node to be searched.
boot_t
If TRUE
the request was accepted, if FALSE
the request was not accepted.
the value of pu8Result
[1]
Measured level of the channel with the youngest number.
[2]
Next youngest channel
... [N]
Continues up to N.
The level takes the value 0..255, with 0 being the weakest and 255 the strongest. The higher the value, the noisier the channel.
A structure to store the results of the neighbourhood search.
uint8
u8found
Count of found nodes
uint8
u8scanMode
Scan method.
uint8
u8IdxLqiSort
Index of the sScanResult
when ordered by LQI
tsToCoNet_NbScan_Entitiy
sScanResult[NBSCAN_MAXLIST]
Found node information
TOCONET_NBSCAN_NORMAL_MASK
by the ToCoNet_EnergyScan_bStart()
TOCONET_NBSCAN_QUICK_EXTADDR_MASK
by the ToCoNet_NbScan_bStartToFindAddr()
A structure containing information about each node found in the neighbourhood search.
uint32
u32addr
Long address of the node.
uint16
u16addr
Short address of the node.
uint8
u8ch
The channel of the node that was discovered.
uint8
u8lqi
LQI of the discovered node.
uint8
bFound
If the search succeeds, TRUE
, if it fails, FALSE
.
The result is reported by in the E_EVENT_TOCONET_NWK_SCAN_COMPLETE
event. The event argument is the address to the tsToCoNet_NbScan_Result
structure.