PreviousNext
Discovery
Help > Peripherals > Coordinator > Discovery

[comdown] Runs IQMESH discovery process. The time when the response is delivered depends highly on the number of network devices, the network topology created using specified TxPower, and RF mode, thus, it is not predictable. It can take from a few seconds to many minutes.

 

Request

 

NADR

PNUM

PCMD

HWPID

0

1

NADR

0x00

0x07

?

TxPower

MaxAddr

 

TxPower           TX Power used for discovery.

MaxAddr          Zero-value specifies, that all bonded [Ns] will take part in the discovery process.

The nonzero value specifies the maximum [N] address to be part of the discovery process. This feature allows splitting all [Ns] into two parts: [1] devices having an address from 1 to MaxAddr will be part of the discovery process thus they become routers, [2] devices having an address from MaxAddr+1 to 239 will not be routers. See IQRF OS documentation for more information.

 

Response

 

NADR

PNUM

PCMD

HWPID

ErrN

DpaValue

0

NADR

0x00

0x87

?

0

?

DiscNr

 

DiscNr              Number of discovered network Nodes

 

Error codes

ERROR_FAIL      When the internal call of discovery fails.

The following video depicts a discovery process.


 3.2.8.1               Source code support

typedef struct

{

  uns8 TxPower;

  uns8 MaxAddr;

} TPerCoordinatorDiscovery_Request;

 

TPerCoordinatorDiscovery_Request _DpaMessage.PerCoordinatorDiscovery_Request;

 

typedef struct

{

  uns8 DiscNr;

} TPerCoordinatorDiscovery_Response;

 

TPerCoordinatorDiscovery_Response _DpaMessage.PerCoordinatorDiscovery_Response;