Post

Replies

Boosts

Views

Activity

Failed to perform Wi-Fi scan, returned error code 16
I developed a program to connect to Wi-Fi using the CoreWLAN API. First, I need to scan for SSIDs. However, when I call the scanning function, the scan fails occasionally. Failed to perform Wi-Fi scan, returned error code 16, will try again in 200 ms took 2.0468 seconds, returned error [16, com.apple.wifi.apple80211API.error, 'Resource busy'] I need to retry several times to succeed, which makes the process of connecting to Wi-Fi relatively slow. I want to know the reason of this error. 2024-08-06 18:24:13.090634+0800 0x86f393 Default 0x0 158 0 airportd: (IO80211) [com.apple.WiFiManager:] Info: <airport[158]> -[CWXPCSubsystem performScanWithChannelList:ssidList:legacyScanSSID:dwellTimeOverride:interfaceName:scanParametersOverride:allowDuringAWDLRealTimeMode:connection:scannedChannels:error:]: Failed to perform Wi-Fi scan, returned error code 16, will try again in 200 ms 2024-08-06 18:24:13.295896+0800 0x86f393 Default 0x0 158 0 airportd: (IO80211) Apple80211IOCTLSetWrapper:5093 @[3748838.819485] ifname['en0'] IOUC type 10/'APPLE80211_IOC_SCAN_REQ', len[5456] return 16/0x00000010 2024-08-06 18:24:13.295929+0800 0x86f393 Default 0x0 158 0 airportd: (IO80211) [com.apple.WiFiManager:] Info: <airport[158]> -[CWXPCSubsystem performScanWithChannelList:ssidList:legacyScanSSID:dwellTimeOverride:interfaceName:scanParametersOverride:allowDuringAWDLRealTimeMode:connection:scannedChannels:error:]: Failed to perform Wi-Fi scan, returned error code 16, will try again in 200 ms 2024-08-06 18:24:13.498811+0800 0x86f393 Default 0x0 158 0 airportd: (IO80211) [com.apple.WiFiManager:] Info: <airport[158]> -[CWXPCSubsystem performScanWithChannelList:ssidList:legacyScanSSID:dwellTimeOverride:interfaceName:scanParametersOverride:allowDuringAWDLRealTimeMode:connection:scannedChannels:error:]: Failed to perform Wi-Fi scan, returned error code 16 2024-08-06 18:24:13.499112+0800 0x86f393 Default 0x0 158 0 airportd: (IO80211) [com.apple.WiFiManager:] Scan: <airport[158]> -[CWXPCConnection __performScanWithChannelSubset:ssidList:legacyScanSSID:includeHiddenNetworks:mergeScanResults:maxAge:maxMissCount:maxWakeCount:maxAutoJoinCount:interfaceName:waitForWiFi:waitForBluetooth:token:priority:scanParametersOverride:allowDuringAWDLRealTimeMode:reply:]_block_invoke: [575EE] WIFI_REQ_SCAN (exit) 2024-08-06 18:24:13.499318+0800 0x86f7a7 Default 0x0 158 0 airportd: (IO80211) [com.apple.WiFiManager:] AutoJoin: <airport[158]> Failed cache-assisted scan request for wifihelper with channels {( <CWChannel: 0x138b236f0> [channelNumber=1(2GHz), channelWidth={20MHz}, active], <CWChannel: 0x138b8f880> [channelNumber=6(2GHz), channelWidth={20MHz}, active], <CWChannel: 0x138bee730> [channelNumber=11(2GHz), channelWidth={20MHz}, active], <CWChannel: 0x138b77590> [channelNumber=2(2GHz), channelWidth={20MHz}, active], <CWChannel: 0x138bb7e40> [channelNumber=3(2GHz), channelWidth={20MHz}, active], <CWChannel: 0x138b51290> [channelNumber=4(2GHz), channelWidth={20MHz}, active] )}, took 2.0468 seconds, returned error [16, com.apple.wifi.apple80211API.error, 'Resource busy'] wifi.log
1
0
406
Aug ’24
CoreWLAN associateToEnterpriseNetwork doesn't remember network after macOS 12.5
I use CoreWLAN for Wi-Fi connection, since macOS 12.5, Wi-Fi can't connect automatically after restarting the computer. rememberJoinedNetworks is set to true. Same problem with EAP-PEAP, EAP-TLS. Can't find "com.apple.network.eap.user.item.wlan.ssid" item in keychain.  Here is my code: BOOL success = [interface associateToEnterpriseNetwork:selectedNetwork                            identity:nil                            username:username                            password:password                             error:&err];
5
0
1.7k
Nov ’22
Set DHCP causes macOS to display that the network is not connected
The computer is connected to a wired network. I want to update the DHCP information. I use this command: ipconfig set en6 DHCP which indeed triggers the DHCP update, but causes the network preference to show that the network is not connected, but in fact the network is normal. But when I use the ifconfig command, I find that the IP is normal, and the network is normal, I can access the page on the browser. I had to switch the IP allocation method on the GUI to recover.
0
0
745
Dec ’22
iOS 16 network request failed on PacketTunnel
Hi, We have developed a VPN app, we recently received feedback from some iOS 16 users that VPN connections cannot be established, We found that PacketTunnel's network request fails, but requesting the same site in the main app works fine, the Wireless Data settings for the application are set to allow WLAN &amp; Cellular Data. Network requests use NSURLSession. After analysis, we think this may be a problem caused by network permissions on the App extension, and it returns to normal after restarting the phone. Seems to only appear on Chinese version devices, iOS 16.0, iOS 16.0.2 versions have similar feedback. Error log: Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" unsatisfied (Path was denied by NECP policy), interface: pdp_ip0[lte], ipv4, ipv6, expensive ERROR: &lt;PacketTunnelProvider:(454)&gt; API request failed: Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x1047674c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Path was denied by NECP policy), interface: pdp_ip0[lte], ipv4, ipv6, expensive, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;6602B486-A9E4-4B73-9D56-5BC4F49F5495&gt;.&lt;1&gt;, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask &lt;6602B486-A9E4-4B73-9D56-5BC4F49F5495&gt;.&lt;1&gt;" ), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=***, NSErrorFailingURLKey=***, _kCFStreamErrorDomainKey=1}
3
0
2.2k
Oct ’22