No way to distinguish between BT PAN, Wi-Fi, WWAN network interfaces on iPhone

Originator:millenomi
Number:rdar://7298169 Date Originated:13-Oct-2009 12:55 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:3.1.2
Classification:Serious Bug Reproducible:Always
 
The OS manages a number of network interfaces at the BSD level that correspond to different transmission mediums (Wi-Fi, WWAN [EDGE, 3G] and, while GameKit has been enabled, Bluetooth PAN). Applications that want to use a specific transmission medium have no way to know which is which.

For example, the Mover application sends files between iPhones on local connections. It offers a "Wi-Fi" mode and a "Bluetooth" mode. A serious performance bug was reported where "Wi-Fi" mode would exhibit much lower performance after Bluetooth was turned on and off (that is, after GameKit had enabled the BT PAN network interface).

The bug was that "Wi-Fi mode" advertises the device's presence via Bonjour on all available interfaces, including the BT PAN one, and that the addresses array in the Bonjour service includes the BT PAN interface address. Occasionally connections would be made through that address, thus using the much slower, smaller-bandwidth BT PAN connection rather than a high-speed Wi-Fi connection.

The next version of Mover includes a heuristic that tries to avoid local link addresses, but this does not fix the problem (on a Wi-Fi network without DHCP, the BT PAN interface might be selected instead of the Wi-Fi local-link interface since the heuristic cannot distinguish between the two). There is currently no way to know whether an address of a particular interface on the system actually belongs to BT, Wi-Fi or any other sort of medium.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!