Search found 45 matches

by azz-zza
Fri Aug 07, 2020 2:40 pm
Forum: General Discussion
Topic: does esp_log_set_vprintf() work with arduino framework?
Replies: 2
Views: 4569

Re: does esp_log_set_vprintf() work with arduino framework?

Seems that you are not sending anything to the service! You call vprintf() which sends to stdout. Instead vsnprintf() and then send the string to both stdout and your network device. @Peter, thank you for your reply. I beleive hornbill.publish sends the data over. I also wanted to test if the doubl...
by azz-zza
Fri Aug 07, 2020 4:28 am
Forum: General Discussion
Topic: does esp_log_set_vprintf() work with arduino framework?
Replies: 2
Views: 4569

does esp_log_set_vprintf() work with arduino framework?

Hello, trying to leverage the esp_log_set_vprintf() to direct the output to network service. And having no luck with it. Is it because of the arduino framwork ? #include <AWS_IOT.h> #include <WiFi.h> ... int double_vprintf(const char *fmt, va_list args) { if (hornbill.publish(TOPIC_NAME,"Static payl...
by azz-zza
Mon Jul 20, 2020 10:29 pm
Forum: ESP32 Arduino
Topic: LOGX and esp_log_set_vprintf
Replies: 0
Views: 2744

LOGX and esp_log_set_vprintf

Hello, with idf esp_log.h in order to post a message on some log level, all i need to do is to set the default log level for the etire app by CONFIG_LOG_DEFAULT_LEVEL . And regulate the level on file/component level by esp_log_level_set() with TAGs. Simple enough. how do i achieve the same functiona...
by azz-zza
Fri Jul 17, 2020 3:20 am
Forum: General Discussion
Topic: best practices- logging framework with cloud integration
Replies: 2
Views: 4570

Re: best practices- logging framework with cloud integration

You could use esp_log_set_vprintf to set a custom vprintf function. This function could look like this : /* * vprintf-like function to replace the logging output method */ int dual_vprintf(const char *fmt, va_list ap) { // 1. Log to a custom handler (could be a MQTT queue, UDP socket etc) char str[...
by azz-zza
Wed Jul 15, 2020 5:14 pm
Forum: ESP32 Arduino
Topic: unstable WIFI connection
Replies: 3
Views: 6753

Re: unstable WIFI connection

not sure if "sleep" helped or not, but the chip has been running fine for a week. Must be some kind of issue with the router.
thank you for the help!
by azz-zza
Tue Jul 14, 2020 5:34 am
Forum: General Discussion
Topic: best practices- logging framework with cloud integration
Replies: 2
Views: 4570

best practices- logging framework with cloud integration

Hello, Serial.print with monitoring over usb was a good enough approach with a single prototype. but with several deployed units, my ability to babysit them over USB/serial is somewhat tasking. To avoid inventing the wheel, I would appreciate your advise on proper logging framework that can also be ...
by azz-zza
Wed Jul 08, 2020 6:36 pm
Forum: ESP32 Arduino
Topic: unstable WIFI connection
Replies: 3
Views: 6753

Re: unstable WIFI connection

esp32 uses power management features for WiFi, so it turns off the radio in between beacon adverts. TCP packets get held by the access point until the device checks in. Datagrams will be dropped. Turn off modem sleep with `WiFi.setSleep(false);` Thank you. I gave it a try. Will update the thread af...
by azz-zza
Wed Jul 08, 2020 1:01 pm
Forum: ESP32 Arduino
Topic: unstable WIFI connection
Replies: 3
Views: 6753

unstable WIFI connection

hello, i most likely doing something incorrect. Appreciate pointing out my mistakes. #include <WiFi.h> const char* ssid = "myssid"; const char* password = "very_big_secret"; void connectToNetwork() { WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println("Est...
by azz-zza
Tue Jul 07, 2020 10:09 pm
Forum: ESP32 Arduino
Topic: WIFI SOFTAP status
Replies: 0
Views: 2898

WIFI SOFTAP status

hello, how do I check that SoftAP is up and running? Case: my application attempts to connect to the existing network ( wifi.begin(ssid,pass) ). If it failes ( WiFi.status != WL_Connect) , the app will stand up a AP ( WiFi.softAP(ssid) ). to check that the module is still connected to the network i ...