RTC time from wifi beacon, without connecting?

tpbedford
Posts: 31
Joined: Mon Feb 14, 2022 4:16 am

RTC time from wifi beacon, without connecting?

Postby tpbedford » Thu Sep 07, 2023 2:31 am

Hi, is it possible to get RTC time from performing a scan for visible wifi APs? I'm developing a low-power device and hoping I can wake, perform a wifi scan/discovery, and get RTC time then go back to sleep (without actually connecting to the AP)

Cheers

greg-dickson
Posts: 24
Joined: Sun Nov 01, 2020 1:51 am

Re: RTC time from wifi beacon, without connecting?

Postby greg-dickson » Thu Sep 07, 2023 11:06 am

I could be wrong but I don't think that information is actually available to a scan.
I see no reason why they would add it either.

martins
Posts: 51
Joined: Tue Aug 24, 2021 8:58 am

Re: RTC time from wifi beacon, without connecting?

Postby martins » Fri Sep 08, 2023 6:53 am

And even if it was available, how can you be sure it has correct time?

tpbedford
Posts: 31
Joined: Mon Feb 14, 2022 4:16 am

Re: RTC time from wifi beacon, without connecting?

Postby tpbedford » Mon Sep 11, 2023 9:37 pm

martins wrote:
Fri Sep 08, 2023 6:53 am
And even if it was available, how can you be sure it has correct time?
In my scenario, it's because we also control the AP.

But I haven't found that it's available, except perhaps as custom meta data? Perhaps I can look into that.

Thanks, all.

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: RTC time from wifi beacon, without connecting?

Postby ESP_Sprite » Tue Sep 12, 2023 3:50 am

I think you can use esp_wifi_set_vendor_ie_cb() to set a callback that gets called when a beacon comes in. The callback should give you access to the IE of the beacon, so if you can set up your AP to encode the current time in there, this should be able to pick it up.

Who is online

Users browsing this forum: No registered users and 109 guests