PreviousNext
Smart Connect
Help > Peripherals > Coordinator > Smart Connect

This command bonds [N] using the Smart Connect process. For details please see IQRF OS User's Guide. The command must not be used inside Batch or Selective Batch. The Smart Connect parameters can be effectively stored at IQRF Code to automate the bonding process.

 

Request

 

NADR

PNUM

PCMD

HWPID

0

1

2 17

18 21

22

NADR

0x00

0x12

?

ReqAddr

BondingTestRetries

IBK

MID

res0

 

23

24 27

28 37

VirtualDeviceAddress

UserData

res1

 

ReqAddr                    A requested address for the bonded [N]. The address must not be used (bonded) yet. If this parameter equals 0, then the 1st free address is assigned to the [N].

                                

If this parameter equals 0xFE (IQMESH temporary address) and MID equals 0x00000000 then all unbonded Nodes within the RF reach of the current network and having the same Access Password as existing members of the network will be prebonded with the address 0xFE. When the 0xFE parameter is used please make sure all other command parameters are zeroed.

 

If this parameter equals 0xFE and MID is nonzero then only [Ns] whose remainder by dividing their MID by MID[1] (i.e. PData[19])  equals MID[0] (i.e. PData[18]) will be prebonded to the network. This feature is intended for building so-called overlapping networks based on the Law of large numbers. Again, the same Access Password is required.

                                

BondingTestRetries    Maximum number of FRCs used to test whether the [N] was successfully bonded. If the [N] does not respond, it is unbonded at the Coordinator’s side. If the value is 0, then no test is performed and the command always succeeds.

IBK                            Individual Bonding Key of the [N] to bond. Must be zeroed if ReqAddr equals 0xFE.

MID                           MID of the [N] to bond. Must be zeroed if ReqAddr equals 0xFE.

res0                           Reserved. Must be zero.

VirtualDeviceAddress Virtual device address. Must equal 0xFF if not used.

UserData                   Reserved for future optional data passed to the bonded [N].

res1                           Reserved. It must be filled with zeros.

 

Response

NADR

PNUM

PCMD

HWPID

ErrN

DpaValue

0

1

NADR

0x00

0x92

?

0

?

BondAddr

DevNr

 

 

 

BondAddr         Address of the [N] newly bonded to the network.

DevNr               The number of bonded Nodes in the network.

 

Error codes

ERROR_FAIL      a. Nonzero ReqAddr is already used.
b. No free address is available when ReqAddr equals 0.
c. ReqAddr is out of range of valid addresses.
d. Internal call to smartConnect failed.
e. None of the testing FRCs used to test the connection to the bonded [N] succeeded.