Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

teishim
Posts: 4
Joined: Mon Mar 15, 2021 2:44 am

Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby teishim » Mon Mar 15, 2021 3:13 am

I've already tested Wi-Fi FTM(Fine Timing Measurement) with two ESP32-S2 in which one AP and the other STA mode. And, I successfully checked the result of FTM RTT(Round Trip Time) measurement and distance between AP and STA equipped with ESP32-S2 chipset.

However, when I tested FTM RTT ESP32-S2 with Android Smartphone, I can catch the FTM Responder message on the Android phone, but can NOT catch the results of RTT from ESP32-S2 AP. This Android phone already tested with another Wi-Fi RTT capable APs.

Could you help me how to successfully test the FTM RTT measurement between Android phone and ESP32-S2 AP?

BRs,
Taehyoung Shim

teishim
Posts: 4
Joined: Mon Mar 15, 2021 2:44 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby teishim » Mon Mar 15, 2021 11:40 am

If you checked the code of rtt.h in Android, there are several different structures; wifi_rtt_config, wifi_rtt_result, etc. as below:
https://android.googlesource.com/platfo ... gacy/rtt.h

Do you have a plan to update the FTM Example code (ftm_main.c) of ESP-IDF in order to enable measuring FTM RTT with Android Phone (over ver.9) ?

Please let me know. :)
BRs,
Taehyoung Shim

teishim
Posts: 4
Joined: Mon Mar 15, 2021 2:44 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby teishim » Tue Mar 16, 2021 1:09 pm

When I checked the codes in "esp_wifi_types.h", available the num of "frm_count" are only 16, 24, 32, 64 and allowed burst_period are within [-p <2-255 (x 100 mSec)>] as below:

/**
* @brief FTM Initiator configuration
*
*/
typedef struct {
uint8_t resp_mac[6]; /**< MAC address of the FTM Responder */
uint8_t channel; /**< Primary channel of the FTM Responder */
uint8_t frm_count; /**< No. of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0(No pref), 16, 24, 32, 64) */
uint16_t burst_period; /**< Requested time period between consecutive FTM bursts in 100's of milliseconds (0 - No pref) */
} wifi_ftm_initiator_cfg_t;

However, when I tested Android phone, the default FTM set value is 24 FTM frames every 5333 uSec.

I (594383) wifi:Responding to FTM initiator f6:25:f6:58:f2:e2 with 24 FTM frames every 5333 uSec!
I (601243) wifi:Responding to FTM initiator 52:7a:ac:2a:4a:09 with 24 FTM frames every 5333 uSec!
I (602193) wifi:Responding to FTM initiator 86:23:5d:b1:e9:dc with 24 FTM frames every 5333 uSec!
I (603133) wifi:Responding to FTM initiator 82:69:73:39:11:5e with 24 FTM frames every 5333 uSec!
I (604153) wifi:Responding to FTM initiator ce:cc:58:44:05:09 with 24 FTM frames every 5333 uSec!
I (605153) wifi:Responding to FTM initiator ee:22:bd:74:ea:5d with 24 FTM frames every 5333 uSec!
I (606153) wifi:Responding to FTM initiator b2:95:81:a3:a6:d9 with 24 FTM frames every 5333 uSec!
I (607163) wifi:Responding to FTM initiator 6e:e7:d0:ac:0b:5f with 24 FTM frames every 5333 uSec!
I (608233) wifi:Responding to FTM initiator 2a:c7:2d:83:65:a6 with 24 FTM frames every 5333 uSec!
I (609163) wifi:Responding to FTM initiator fa:70:79:c8:40:56 with 24 FTM frames every 5333 uSec!

At ESP32-S2 chipset, is it possible to run FTM RTT test in 24 frames every 5333 uSec?

BRs,
Taehyoung Shim

ESP_nachiket_kukade
Posts: 1
Joined: Mon May 20, 2019 7:12 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby ESP_nachiket_kukade » Mon Apr 05, 2021 2:03 pm

Hi Taehyoung Shim,
However, when I tested FTM RTT ESP32-S2 with Android Smartphone
Are you using Google's official WifiRttScan App for testing? If so, then it won't work for now since it uses ASAP mode and we don't support that mode yet. If it is another App or method, do let us know, so that we can use it in our testing.
Do you have a plan to update the FTM Example code (ftm_main.c) of ESP-IDF in order to enable measuring FTM RTT with Android Phone (over ver.9) ?
Yes, from update v4.3.1 of ESP-IDF, FTM will work with the WifiRttScan App on an Android smartphone.
Important Note: improving RTT/Distance accuracy with third party devices is still being worked on & will take more time.
At ESP32-S2 chipset, is it possible to run FTM RTT test in 24 frames every 5333 uSec?
Yes, this is possible since 5333 uSec duration is still large enough. The allowed frm_count choices in FTM example are limited so that our FTM Requests are not rejected or overwritten frequently by other devices.
Is it possible for you to do a sniffer capture of this exchange? That will give a lot more information to us. Thanks.

teishim
Posts: 4
Joined: Mon Mar 15, 2021 2:44 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby teishim » Mon Apr 12, 2021 12:07 pm

Hi Nachiket Kukade,

1) Yes, I tested it on WifiRttScan App and Android API as follows:
https://developer.android.com/guide/top ... y/wifi-rtt
https://developer.android.com/reference ... ge-summary
Please let me know if you successfully tested operating FTM RTT with Android needs ASAP mode.

2) Good news! I look forward to testing v4.3.1 of ESP-IDF, FTM work with the WifiRttScan App on my Android smartphone.
I have question. Is there setting offset for improving RTT/Distance accuracy is included in next ESP-IDF version?
Please let me know issuing date v4.3.1 of ESP-IDF. :)

3)5333 uSec duration is enough? good news! Thank you.
How can I send you the sniffer capture file (Wireshark file)? Your email address, or another route?

BRs,
Taehyoung Shim

crackwitz
Posts: 10
Joined: Fri Oct 22, 2021 11:15 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby crackwitz » Fri Oct 22, 2021 11:23 am

I've tried the WifiRttScan app on a Pixel 4a with some ESP32-S2 on ESP-IDF v4.3.1 and it still doesn't quite work.

The app shows "Requesting..." all across the board.

When I try to connect to the ftm example running in AP mode, the app manages to show some values. The values even update... sometimes (but that might be an issue with Google's app).

I would have expected this to work without having to connect to the AP, since that works among ESP32. Or maybe it's requesting too much and the ESP32 bans my phone from FTM requests

crackwitz
Posts: 10
Joined: Fri Oct 22, 2021 11:15 am

Re: Fail test Wi-Fi FTM RTT with ESP32-S2 and Android Smartphone (over 9)

Postby crackwitz » Fri Oct 22, 2021 11:26 am

I'm trying this on v4.3.1 and it still doesn't work right.

The app says "Requesting...".

I can only get it to show any values when my phone tries to connect to the ESP32-S2 running the ftm example.

I've experienced some kind of rate limit even between ESP32. Maybe it's that.

Who is online

Users browsing this forum: Google [Bot] and 124 guests