-->
Page 1 of 1

Super fast WiFi UDP

PostPosted: Sat May 25, 2019 10:15 pm
by Nikolay
When exiting depp-sleep,
there are three options for connecting to WiFi and sending messages via UDP.
--------------------
1) login and password - new values.
The connection and transmission time is 4 seconds.
------------------------
2) login, password and IP save in the RTC.
The connection and message transfer time is 1 second.
-----------------------
3) login, password, IP save in the RTC and disable dhcpc.
The connection and message transfer time is 0.3 seconds.

Re: Super fast WiFi UDP

PostPosted: Thu May 30, 2019 7:08 am
by lucasromeiro
Nikolay wrote:When exiting depp-sleep,
there are three options for connecting to WiFi and sending messages via UDP.
--------------------
1) login and password - new values.
The connection and transmission time is 4 seconds.
------------------------
2) login, password and IP save in the RTC.
The connection and message transfer time is 1 second.
-----------------------
3) login, password, IP save in the RTC and disable dhcpc.
The connection and message transfer time is 0.3 seconds.


I do not understand your post You can explain?

Re: Super fast WiFi UDP

PostPosted: Mon Jun 03, 2019 6:21 pm
by davydnorris
The post is talking about how to speed up connection to a wifi AP - it's not just UDP but all wifi in general.

If you're trying to save as much power as possible then you want to spend as short a time as you can in connecting to your wifi AP, and there are numerous things you can do to speed it up. In this post they talk about explicitly setting the IP address during connection, but there are a number of other things you can do to speed up connection too:
- saving the BSSID and channel of the last known AP removes a channel and AP scan which saves a lot of time.
- using a static IP address saves time negotiating DHCP

In this case, the poster has also identified that disabling the DHCP client significantly improves wifi connection time.

I posted some code in the Advanced section showing how I try to save time. Unfortunately I can't use a static IP address, and the SDK doesn't give access to the DHCP lease time - if I had this then I would also cache the last known IP address and reuse it.

Re: Super fast WiFi UDP

PostPosted: Tue Jun 11, 2019 8:34 am
by lucasromeiro
davydnorris wrote:The post is talking about how to speed up connection to a wifi AP - it's not just UDP but all wifi in general.

If you're trying to save as much power as possible then you want to spend as short a time as you can in connecting to your wifi AP, and there are numerous things you can do to speed it up. In this post they talk about explicitly setting the IP address during connection, but there are a number of other things you can do to speed up connection too:
- saving the BSSID and channel of the last known AP removes a channel and AP scan which saves a lot of time.
- using a static IP address saves time negotiating DHCP

In this case, the poster has also identified that disabling the DHCP client significantly improves wifi connection time.

I posted some code in the Advanced section showing how I try to save time. Unfortunately I can't use a static IP address, and the SDK doesn't give access to the DHCP lease time - if I had this then I would also cache the last known IP address and reuse it.


Interesting.
I'll even need to use that in a project I'm developing.
I'll need to save as much of a battery as I can.
It was good to know!