什么是设备到 AP RTT

What is Device-to-AP RTT

我在浏览 Android Wifimanager class 时发现了这个方法: public boolean isDeviceToApRttSupported ()

Returns true if this adapter supports Device-to-AP RTT

但是什么是设备到 AP RTT?

RTT = 往返时间 = 信号从一台设备到另一台设备再返回的时间

仅从方法的名称来看,这应该可以回答是否可以(支持)测量 rtt 的问题。

推测: 这个答案更有可能是针对您的 android 设备及其 wifi-hotspot 功能给出的,而不是针对已连接的任何远程设备。

WiFi RTT (round-trip-time) 用于室内定位,包含在 Android P 预览中:https://developer.android.com/preview/features.html

Android P adds platform support for the IEEE 802.11mc Wi-Fi protocol—also known as Wi-Fi Round-Trip-Time (RTT)—to let you take advantage of indoor positioning in your apps.

On Android P devices with hardware support, your apps can use the new RTT APIs to measure the distance to nearby Wi-Fi Access Points (APs). The device must have location enabled and Wi-Fi turned on, and your app must have the ACCESS_FINE_LOCATION permission. The device doesn't need to connect to the APs to use RTT. To maintain privacy, only the phone is able to determine the distance to the AP; the APs do not have this information.

If your device knows the distance to 3 or more APs, the API uses a multilateration algorithm to estimate the device position that best fits those measurements. The result is typically accurate within 1 to 2 meters.

With this accuracy, you can build new experiences like in-building navigation, fine- grained location-based services such as disambiguated voice control (for example, "Turn on this light"), and location-based information (such as "Are there special offers for this product?").