私が取り組んでいるアプリには、ユーザーが終了するまで長期間通信する2つのiOSデバイスが含まれます(VoIPにほぼ匹敵します)。最終的にデバイスの1つが断続的にwifiを失うため、2つのデバイス間の接続を維持するのに非常に苦労しています。アプリはUDPソケットを使用して通信します。
私が試し、確認したが機能していないもののリストは次のとおりです。
- アプリケーションはwifiキーを使用しますYESに設定されています
- Reachability APIを使用してwifiの損失を検出し、後でwifiが回復したときに再起動します-wifiが失われ、オーディオが再生されなくなるとアプリがバックグラウンドに送信されるため、これは機能しません
私は今、他のそのようなアプリ、特に一晩実行する必要があるかもしれないアプリが接続を維持するためにどのように管理するのか疑問に思っています。
どんな助けでも大歓迎です。私はこの問題で壁に立ち向かっています。
ありがとう!
関連する可能性のあるコンソールログの抜粋を次に示します。
Aug 28 23:12:10 unknown wifid[13] <Error>: WiFi:[367913530.830882]: Processing link event DOWN
Aug 28 23:12:11 unknown kernel[0] <Debug>: Removing any beacons matching: @ 0xc140a400, BSSID = 90:84:0d:dc:46:53, rssi = -64, rate = 54 (100%), channel = 10, encryption = 0x8, ap = 1, failures = 0, age = 7529, ssid[12] = "Studio"
Aug 28 23:12:11 unknown kernel[0] <Debug>: Also removing matching beacon: @ 0xc140a400, BSSID = 90:84:0d:dc:46:53, rssi = -64, rate = 54 (100%), channel = 10, encryption = 0x8, ap = 1, failures = 0, age = 7529, ssid[12] = "Studio"
Aug 28 23:12:11 unknown kernel[0] <Debug>: AppleBCMWLAN Left BSS: @ 0xc140a400, BSSID = 90:84:0d:dc:46:53, rssi = -64, rate = 54 (100%), channel = 10, encryption = 0x8, ap = 1, failures = 0, age = 7529, ssid[12] = "Studio"
Aug 28 23:12:11 unknown kernel[0] <Debug>: AirPort: Link Down on en0. Reason 1 (Unspecified).
Aug 28 23:12:12 unknown configd[45] <Notice>: network configuration changed.
Aug 28 23:12:12 unknown UserEventAgent[12] <Warning>: DEBUG: Changing WiFi state: 0
Aug 28 23:12:12 unknown CommCenter[57] <Notice>: Client [com.apple.persistentconnection[apsd,50]] is telling PDP context 0 to go active.
Aug 28 23:12:12 unknown CommCenter[57] <Notice>: No more assertions for PDP context 0. Returning it back to normal.
Aug 28 23:12:12 unknown CommCenter[57] <Notice>: Scheduling PDP tear down timer for (367913832.324872) (current time == 367913532.324882)
Aug 28 23:12:13 unknown mDNSResponder[34] <Error>: mDNS_Execute: SendResponses didn't send all its responses; will try again in one second
Aug 28 23:12:14 unknown wifid[13] <Error>: WiFi:[367913534.115957]: Processing link event UP
Aug 28 23:12:14 unknown kernel[0] <Debug>: AppleBCMWLANCore::setASSOCIATE() [wifid]: lowerAuth = AUTHTYPE_OPEN, upperAuth = AUTHTYPE_WPA2_PSK, key = CIPHER_PMK , don't disassociate .
Aug 28 23:12:14 unknown kernel[0] <Debug>: [31834.320185375]: AppleBCMWLANNetManager::prepareToBringUpLink(): Delaying powersave entry in order to get an IP address
Aug 28 23:12:14 unknown kernel[0] <Debug>: AppleBCMWLAN Joined BSS: @ 0xc22d4400, BSSID = 90:84:0d:dc:46:53, rssi = -67, rate = 54 (100%), channel = 10, encryption = 0x8, ap = 1, failures = 0, age = 1, ssid[12] = "Studio"
Aug 28 23:12:14 unknown kernel[0] <Debug>: AirPort: Link Up on en0
Aug 28 23:12:14 unknown kernel[0] <Debug>: en0: BSSID changed to 90:84:0d:dc:46:53
Aug 28 23:12:14 unknown kernel[0] <Debug>: AppleBCMWLANJoinManager::handleSupplicantEvent(): status = 6, reason = 0, flags = 0x0, authtype = 0, addr = 90:84:0d:dc:46:53
Aug 28 23:12:14 unknown mDNSResponder[34] <Error>: mDNS_Execute: SendResponses didn't send all its responses; will try again in one second
Aug 28 23:12:15 unknown configd[45] <Notice>: Captive: en0: Not probing 'Studio' (protected network)
Aug 28 23:12:15 unknown kernel[0] <Debug>: [31835.475445625]: AppleBCMWLANNetManager::receivedIPv4Address(): Received address 10.0.1.3, entering powersave mode 2
Aug 28 23:12:15 unknown configd[45] <Notice>: network configuration changed.
Aug 28 23:12:15 unknown configd[45] <Notice>: network configuration changed.
Aug 28 23:12:15 unknown UserEventAgent[12] <Warning>: DEBUG: Changing WiFi state: 1
Message was edited by studiosutara on 8/31/12 at 12:21 PM