Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 1.54 KB

File metadata and controls

12 lines (9 loc) · 1.54 KB

MiApp_SearchConnection

|API|uint8_t MiApp_SearchConnection(uint8_t ScanDuartion, uint32_t ChannelMap,SearchConnectionConf_callback_t ConfCallback)| |Description|This is the primary user interface function for the application layer to perform an active scan. After this function call, all active scan response is stored in the global variable ActiveScanResults in the format of structure ACTIVE_SCAN_RESULT. The return value indicates the total number of valid active scan response in the active scan result array.| |Pre-Condition|Protocol initialization must be done.| |Parameters|uint8_t ScanDuration – maximum time to perform scan on single channel. The value is from5 to 14. The real time to perform scan can be calculated with the following formula from the IEEE802.15.4 specification:960 x (2^ScanDuration + 1) x 10^(-6) second.uint32_t ChannelMap – bit map of channels to perform noise scan. The 32-bit double wordparameter uses one bit to represent corresponding channels from 0 to 31. For instance,0x00000003 represents to scan channel 0 and channel 1.SearchConnectionConf_callback_t ConfCallback – callback routine which is called whenthe initiated connection procedure is performed.| |Returns|The number of valid active scan response stored in the global variable ActiveScanResults.| |Example|<code>// Perform an active scan on all possible channelsNumOfActiveScanResponse = MiApp_SearchConnection(10, 0xFFFFFFFF, callback);</code>| |Remarks|None|

Parent topic:MiApp API Description