Lines Matching +full:auto +full:- +full:scan

4  * SPDX-License-Identifier: Apache-2.0
38 #define RSSI_TH_MAX (-95)
64 /* Scan results table: */
91 int32_t retval = -1; in configure_simplelink()
92 int32_t mode = -1; in configure_simplelink()
125 return -1; in configure_simplelink()
134 /* Disable Auto Provisioning*/ in configure_simplelink()
147 return -1; in configure_simplelink()
159 return -1; in configure_simplelink()
173 return -1; in configure_simplelink()
205 /* Configure scan parameters to default */ in configure_simplelink()
214 /* Disable scans: In other words, use "one-shot" scanning */ in configure_simplelink()
256 retval = -1; in configure_simplelink()
283 switch (wlan_event->Id) { in SimpleLinkWlanEventHandler()
288 memcpy(sl_conn.ssid, wlan_event->Data.Connect.SsidName, in SimpleLinkWlanEventHandler()
289 wlan_event->Data.Connect.SsidLen); in SimpleLinkWlanEventHandler()
290 memcpy(sl_conn.bssid, wlan_event->Data.Connect.Bssid, in SimpleLinkWlanEventHandler()
310 event_data = &wlan_event->Data.Disconnect; in SimpleLinkWlanEventHandler()
316 event_data->ReasonCode) { in SimpleLinkWlanEventHandler()
319 event_data->SsidName); in SimpleLinkWlanEventHandler()
321 " request", event_data->Bssid[0], in SimpleLinkWlanEventHandler()
322 event_data->Bssid[1], event_data->Bssid[2], in SimpleLinkWlanEventHandler()
323 event_data->Bssid[3], event_data->Bssid[4], in SimpleLinkWlanEventHandler()
324 event_data->Bssid[5]); in SimpleLinkWlanEventHandler()
329 event_data->SsidName); in SimpleLinkWlanEventHandler()
331 event_data->Bssid[0], in SimpleLinkWlanEventHandler()
332 event_data->Bssid[1], event_data->Bssid[2], in SimpleLinkWlanEventHandler()
333 event_data->Bssid[3], event_data->Bssid[4], in SimpleLinkWlanEventHandler()
334 event_data->Bssid[5], in SimpleLinkWlanEventHandler()
335 event_data->ReasonCode); in SimpleLinkWlanEventHandler()
336 sl_conn.error = event_data->ReasonCode; in SimpleLinkWlanEventHandler()
347 memcpy(&(sl_conn.bssid), wlan_event->Data.STAAdded.Mac, in SimpleLinkWlanEventHandler()
356 memcpy(&(sl_conn.bssid), wlan_event->Data.STAAdded.Mac, in SimpleLinkWlanEventHandler()
368 wlan_event->Id); in SimpleLinkWlanEventHandler()
391 switch (netapp_event->Id) { in SimpleLinkNetAppEventHandler()
396 event_data = &netapp_event->Data.IpAcquiredV4; in SimpleLinkNetAppEventHandler()
397 sl_conn.ip_addr = event_data->Ip; in SimpleLinkNetAppEventHandler()
400 sl_conn.gateway_ip = event_data->Gateway; in SimpleLinkNetAppEventHandler()
422 netapp_event->Data.IpAcquiredV6.Ip[i]; in SimpleLinkNetAppEventHandler()
446 sl_conn.sta_ip = netapp_event->Data.IpLeased.IpAddress; in SimpleLinkNetAppEventHandler()
462 netapp_event->Id); in SimpleLinkNetAppEventHandler()
466 if ((netapp_event->Id == SL_NETAPP_EVENT_IPV4_ACQUIRED) || in SimpleLinkNetAppEventHandler()
467 (netapp_event->Id == SL_NETAPP_EVENT_IPV6_ACQUIRED)) { in SimpleLinkNetAppEventHandler()
500 LOG_INF("[GENERAL EVENT] - ID=[%d] Sender=[%d]", in SimpleLinkGeneralEventHandler()
501 dev_event->Data.Error.Code, in SimpleLinkGeneralEventHandler()
502 dev_event->Data.Error.Source); in SimpleLinkGeneralEventHandler()
514 switch (fatal_err_event->Id) { in SimpleLinkFatalErrorEventHandler()
516 LOG_ERR("[ERROR] - FATAL ERROR: " in SimpleLinkFatalErrorEventHandler()
519 fatal_err_event->Data.DeviceAssert.Code, in SimpleLinkFatalErrorEventHandler()
520 fatal_err_event->Data.DeviceAssert.Value); in SimpleLinkFatalErrorEventHandler()
524 LOG_ERR("[ERROR] - FATAL ERROR: Driver Abort detected."); in SimpleLinkFatalErrorEventHandler()
528 LOG_ERR("[ERROR] - FATAL ERROR: No Cmd Ack detected " in SimpleLinkFatalErrorEventHandler()
530 fatal_err_event->Data.NoCmdAck.Code); in SimpleLinkFatalErrorEventHandler()
534 LOG_ERR("[ERROR] - FATAL ERROR: Sync loss detected"); in SimpleLinkFatalErrorEventHandler()
538 LOG_ERR("[ERROR] - FATAL ERROR: " in SimpleLinkFatalErrorEventHandler()
541 fatal_err_event->Data.CmdTimeout.Code); in SimpleLinkFatalErrorEventHandler()
545 LOG_ERR("[ERROR] - FATAL ERROR: " in SimpleLinkFatalErrorEventHandler()
580 /* Note: SimpleLink WiFi scan also can return the following:
581 * - BSSID
582 * - Whether network hidden or visible
583 * - Other types of security
596 __ASSERT_NO_MSG(net_entry->SsidLen <= WIFI_SSID_MAX_LEN); in z_simplelink_get_scan_result()
597 memcpy(scan_result->ssid, net_entry->Ssid, net_entry->SsidLen); in z_simplelink_get_scan_result()
598 scan_result->ssid_length = net_entry->SsidLen; in z_simplelink_get_scan_result()
599 scan_result->channel = net_entry->Channel; in z_simplelink_get_scan_result()
602 sec_bmp = net_entry->SecurityInfo; in z_simplelink_get_scan_result()
604 scan_result->security = WIFI_SECURITY_TYPE_PSK; in z_simplelink_get_scan_result()
606 scan_result->security = WIFI_SECURITY_TYPE_NONE; in z_simplelink_get_scan_result()
609 scan_result->rssi = net_entry->Rssi; in z_simplelink_get_scan_result()
619 /* Attempt to get scan results from NWP in z_simplelink_start_scan()
620 * Note: If scan policy isn't set, invoking 'sl_WlanGetNetworkList()' in z_simplelink_start_scan()
621 * for the first time triggers 'one shot' scan. in z_simplelink_start_scan()
644 if (params->security == WIFI_SECURITY_TYPE_PSK) { in z_simplelink_connect()
645 secParams.Key = (signed char *)params->psk; in z_simplelink_connect()
646 secParams.KeyLen = params->psk_length; in z_simplelink_connect()
655 lretval = sl_WlanConnect((signed char *)params->ssid, in z_simplelink_connect()
656 params->ssid_length, 0, &secParams, 0); in z_simplelink_connect()