You can chat about native SDK questions and issues here.

User avatar
By Nikolay
#82484 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.
User avatar
By lucasromeiro
#82556
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?
User avatar
By davydnorris
#82616 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.
User avatar
By lucasromeiro
#82770
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!