MiApp_ResyncConnection Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiApp_ResyncConnection Function
C
BOOL MiApp_ResyncConnection(
    BYTE ConnectionIndex, 
    DWORD ChannelMap
);
Description

This is the primary user interface function for the application to resynchronize a lost connection. For a RFD device that goes to sleep periodically, it may not receive the channel hopping command that is sent when it is sleep. The sleeping RFD device depends on this function to hop to the channel that the rest of the PAN has jumped to. This function call is usually triggered by continously communication failure with the peers.

Preconditions

Transceiver has been initialized

Parameters
Parameters 
Description 
DWORD ChannelMap 
The bit map of channels to perform noise scan. The 32-bit double word parameter use one bit to represent corresponding channels from 0 to 31. For instance, 0x00000003 represent to scan channel 0 and channel 1. 
Returns

a boolean to indicate if resynchronization of connection is successful

Example
// Sleeping RFD device resync with its associated device, usually the first peer
// in the connection table
MiApp_ResyncConnection(0, 0xFFFFFFFF);

 

Remark: If operation is successful, the wireless node will be hopped to the channel that the rest of the PAN is operating on.

Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.