Replies: 3 comments 9 replies
-
Hello @Hieromon
so you mean that autoconnect and edgedriver can work from core 1 or core 0 with a single option or API? each independent? or is it that autoconnect aux and menus can work on one core and the process driver on another? this last case would solve the previous problem of blocking http requests to custom autoconnect menu pages notice at the time of your ping example when i ask to configure new ap as it hangs the process of led_ping for about 3 seconds until it loads the webpage the behavior is that if I request the personalized web page the led or led process stops with the http request.... this is an expected behavior I imagine because I cannot respond to a request and at the same time send another ping
On the other hand, your example as a single file has loaded well in my program as a single (ping.h) but when trying to separate them into .cpp and .h I could not. I have a mistake. I think we should open another discussion for the realization of a standard for the creation of the EdgeDriver programs because I am going crazy sometimes with small things that I don't even know where to put them example: or in examples but define a standard to always use of good practices such as not putting only gpio. and rather use ping_gpio or led_ping Last but not least. The question is how to separate custom pages from processes so that processes such as database requests do not paralyze the loading of custom web pages or menus. in case the separation is very difficult. there is the possibility to stop processes with !ping as we do now. although for good practices we must stop them anyway |
Beta Was this translation helpful? Give feedback.
-
@FRANAIRBUS Regarding the following question you posted:
The ESP-IDF Ping service is itself a session. Refs: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/protocols/icmp_echo.html#create-a-new-ping-session
Therefore, the following code is the best way to check Internet transparency in the fastest possible time. If you are measuring the success rate of a ping, it makes no sense to poll the ping. If even one ping fails, it is sufficient to cancel the transmission of that outgoing turn. Otherwise it will be slower than WiFiClient::connect with an adjusted timeout value. static void pingOnSuccess(esp_ping_handle_t hdl, void* args) {
(void)(hdl);
(void)(args);
ping.data.hasTimeout = false;
} |
Beta Was this translation helpful? Give feedback.
-
They are all operations using the IPAddress class member functions provided by the ESP32 or ESP8266 Arduino core. The codes to interconvert the type of IP address instance held by the IPAddress class are as follows: String to IPAddress: IPAddress ip;
ip.fromString("8.8.8.8"); IPAddress to uint32_t IPAddress ip(8, 8, 8, 8);
uint32_t ipAddress = (uint32_t)ip; Convert IP address in String format to uint32_t String ipStr("8.8.8.8");
IPAddress ip;
ip.fromString(ipStr);
uint32_t ipAddress = (uint32_t)ip; or reduction coded String ipStr("8.8.8.8");
uint32_t ipAddress = [&ipStr]() -> uint32_t { IPAddress _ip; _ip.fromString(ipStr); return (uint32_t)_ip; }(); |
Beta Was this translation helpful? Give feedback.
-
This topic is derived from the Internet Transparency checks that have been discussed in this thread.
@FRANAIRBUS Your trial inspired me to do the following:
Wouldn't it be useful to be able to poll using a ping loop on a different core? But this technique can only be used with ESP32 with multiple cores.
So I coded a simple evaluation sketch. If this idea is really useful, I'm ready to enhance EdgeUnifed so that EdgeDriver can run on a different core. It would take the place of semaphore control and task creation in the following evaluation sketch.
Beta Was this translation helpful? Give feedback.
All reactions