Microchip® Advanced Software Framework

atmel_rf4ce/lib/inc/pb_pairing.h File Reference
#include "rf4ce.h"

Functions

bool pbp_allow_pairing (nwk_enum_t Status, uint64_t SrcIEEEAddr, uint16_t OrgVendorId, uint8_t OrgVendorString[7], uint8_t OrgUserString[15], uint8_t KeyExTransferCount)
 Allow pairing from application; target use. More...
 
void pbp_pair_confirm (nwk_enum_t Status, uint8_t PairingRef)
 Originator push pairing request; controller use. More...
 
bool pbp_rec_pair_request (uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3], profile_id_t RecProfileIdList[7])
 Recipient pair request; target use. More...
 

bool pbp_allow_pairing ( nwk_enum_t  Status,
uint64_t  SrcIEEEAddr,
uint16_t  OrgVendorId,
uint8_t  OrgVendorString[7],
uint8_t  OrgUserString[15],
uint8_t  KeyExTransferCount 
)

Allow pairing from application; target use.

The allow pairing function provides information about the incoming pairing request. It is a hook to handle application specific requirements during the pairing procedure.

Parameters
StatusStatus of the pair indication; here NWK_SUCCESS or NWK_DUPLICATE_PAIRING
SrcIEEEAddrIEEE address of the device requesting the pair
OrgVendorIdVendor id of the device requesting the pair
OrgVendorStringVendor string of the device requesting the pair
OrgUserStringUser string of the device requesting the pair
KeyExTransferCountKey exchange transfer count of the incoming pair request
Returns
true if pairing is granted; else false

Allow pairing from application; target use.

Decision could be based on one of the parameter.

Parameters
Statusnwk status
SrcIEEEAddrIEEE Address of the source requesting the pair.
OrgVendorIdVendor Id of the source requesting the pair.
OrgVendorStringVendor string of the source requesting the pair.
OrgUserStringUser string of the source requesting the pair.
KeyExTransferCountNumber of key seeds to establish key.
Returns
true if pairing is granted; else false
void pbp_pair_confirm ( nwk_enum_t  Status,
uint8_t  PairingRef 
)

Originator push pairing request; controller use.

The push button pairing request allows a controller to start the push pairing procedure; discovery and pair request handling.

Parameters
OrgAppCapabilitiesApplication capabilities of the device issuing the request
OrgDevTypeListSupported device type list
OrgProfileIdListSupported profile id list
SearchDevTypeDevice type that should be searched for
DiscProfileIdListSizeProfile id list size
DiscProfileIdListProfile id list
Returns
true if command could be handled; else false Push button pairing confirm; target and controller use

The push button pairing confirm is a callback that provides the status of the push pairing request.

Parameters
StatusStatus of the last pairing transaction
PairingRefIf pairing was successful, PairingRef contains assigned pairing reference.

Originator push pairing request; controller use.

Parameters
Statusnwk status
PairingRefPairing Ref of the new entry.

Originator push pairing request; controller use.

The push button pairing confirm is a callback that provides the status of the push pairing request.

Parameters
StatusStatus of the last pairing transaction
PairingRefIf pairing was successful, PairingRef contains assigned pairing reference.

References aplcMinTargetBlackoutPeriod_us, CMD_DISCOVERING, FUNC_PTR, IDLE, indicate_fault_behavior(), LED_NWK_SETUP, LED_OFF, node_status, NULL, NWK_SUCCESS, pairing_ref, pal_led(), pal_timer_start(), start_cmd_disc_cb(), T_LED_TIMER, target_auto_start, TIMEOUT_RELATIVE, and zrc_cmd_disc_request().

bool pbp_rec_pair_request ( uint8_t  RecAppCapabilities,
dev_type_t  RecDevTypeList[3],
profile_id_t  RecProfileIdList[7] 
)

Recipient pair request; target use.

The push button pairing recipient pair request allows a target to start the push button pairing procedure; auto-discovery and incoming pairing handling.

Parameters
RecAppCapabilitiesApplication capabilities of the device issuing the request
RecDevTypeListSupported device type list
RecProfileIdListSupported profile id list
Returns
true if command could be handled; else false

Referenced by handle_incoming_msg(), handle_input(), and nlme_set_confirm().