Search found 49 matches

by axellin
Fri Jan 17, 2020 3:03 am
Forum: ESP32 IDF
Topic: How to decide which network interface a socket is listen on?
Replies: 0
Views: 447

How to decide which network interface a socket is listen on?

Hi, My device is running as an AP (mainly for configuration) and also running pppos to reach internet. I'm wondering when start a tcp server listen on a given port, which interface the socket is listen on? Can I decide which interface to listen on? It does not make sense to listen on the ppp interfa...
by axellin
Tue Jan 07, 2020 7:18 am
Forum: ESP32 IDF
Topic: What is the recommend way to customize lwIP settings using ESP-IDF?
Replies: 2
Views: 296

Re: What is the recommend way to customize lwIP settings using ESP-IDF?

Hi Angus, I think modify the lwip source in IDF is not a good way. I have different applications to build but just some of the applications need to add additional changes of lwIP settings. I think it's better if the build system can take a optional lwipopts.h from application to override the default...
by axellin
Tue Jan 07, 2020 6:34 am
Forum: ESP32 IDF
Topic: What is the recommend way to customize lwIP settings using ESP-IDF?
Replies: 2
Views: 296

What is the recommend way to customize lwIP settings using ESP-IDF?

The idf.py menuconfig does not expose all lwIP settings. I'd like to enable some settings that are not display on menuconfig. e.g. To set LCP_ECHOINTERVAL, LCP_MAXECHOFAILS, etc. I'd prefer to customize the lwipopts.h in my application rather than modify esp-idf directly. But I'm not sure how to do ...
by axellin
Mon Jan 06, 2020 7:52 am
Forum: General Discussion
Topic: How to get and sync time with sntp?
Replies: 3
Views: 441

Re: How to get and sync time with sntp?

So apparently only after wifi is connected the sntp was initialized. I check the code where wifi is started, there is no sntp call. It calls to start azure client, which calls a function to start connection to azure server. I bet that is where sntp got started. I did some digging but the azure stuf...
by axellin
Thu Jan 02, 2020 5:19 am
Forum: ESP32 IDF
Topic: Is there any APIs to get ethernet mac address?
Replies: 1
Views: 204

Is there any APIs to get ethernet mac address?

For WiFi network interface, there is a esp_wifi_get_mac() to get MAC address.
But seems no API to get ethernet mac address?
by axellin
Tue Dec 10, 2019 5:39 am
Forum: ESP32 IDF
Topic: Why not make esp_wifi_set_country take only the cc code?
Replies: 3
Views: 345

Re: Why not make esp_wifi_set_country take only the cc code?

Is there any good reference for the settings of each count code?
i.e. cc/schan/nchan/max_tx_power fields
by axellin
Mon Dec 09, 2019 9:10 am
Forum: ESP32 IDF
Topic: Why not make esp_wifi_set_country take only the cc code?
Replies: 3
Views: 345

Why not make esp_wifi_set_country take only the cc code?

Hi, The esp_wifi_set_country takes const wifi_country_t *country as argument. This seems a little bit odd because the caller needs to set all fields of wifi_country_t. I thought the schan/nchan/max_tx_power fields are fixed and determinate by the cc fields. Why not just take cc fields as argument. (...
by axellin
Sat Nov 16, 2019 3:24 am
Forum: ESP32 IDF
Topic: Is it possible to change NTP sync interval at run time?
Replies: 1
Views: 335

Is it possible to change NTP sync interval at run time?

Hi,
Currently the NTP sync is determinate by CONFIG_LWIP_SNTP_UPDATE_DELAY at compile time.
I'm wondering if it's possible to make the NTP sync interval to be run time configurable?
Is there any API to change the NTP sync interval at run time?
by axellin
Thu Nov 07, 2019 8:15 am
Forum: ESP32 IDF
Topic: mdns does not work in AP mode
Replies: 0
Views: 256

mdns does not work in AP mode

Hi,
I'm testing mdns in ESP-IDF v4.0-beta2.

I add initialise_mdns() in my application.
The initialise_mdns() implementation is similar to the one in mdns_example_main.c.

The mdns works fine in STA mode, but it seems does not work in AP mode.
Is this a known issue?
by axellin
Thu Oct 31, 2019 12:40 am
Forum: Report Bugs
Topic: pingResult callback is called one too many
Replies: 2
Views: 3046

Re: pingResult callback is called one too many

I think it would be helpful if pingResult callback got a different msgType in latest call (for PING_RES_FINISH case). The benefit: 1. Can avoid print a duplicate print in latest pingResult callback 2. The application can easily know the ping is done And the change is pretty simple: diff --git a/comp...