Search found 16 matches

by mcmega
Thu Mar 17, 2022 1:36 pm
Forum: ESP-IDF
Topic: Blufi device name change?
Replies: 6
Views: 5967

Re: Blufi device name change?

I, too, faced such a need!
Any help!
How to change device name?
by mcmega
Mon Jan 04, 2021 11:47 am
Forum: ESP-IDF
Topic: WebSocket Client | How to get text data
Replies: 3
Views: 4604

Re: WebSocket Client | How to get text data

I figured it out, I had to remove the check. if (data->op_code == 0x08 && data->data_len == 2) { sendUART("OK!", "WS Received Closed Message", NULL); } else { parserWS(data->data_len, (char *)data->data_ptr); } And I installed this construction (checking for more than 8 because the shortest JSON obj...
by mcmega
Mon Jan 04, 2021 6:51 am
Forum: ESP-IDF
Topic: WebSocket Client | How to get text data
Replies: 3
Views: 4604

Re: WebSocket Client | How to get text data

I read it. Now another problem arose. I send 3-5 requests to the server and then get 3-5 responses at once. I need to receive responses for every request. My complete code: esp_err_t webSocketInit() { if (xTaskCreate(taskWebSocket, "taskWebSocket", 4096, NULL, 6, &xHandleWebSocket) != pdPASS) { send...
by mcmega
Mon Jan 04, 2021 5:26 am
Forum: ESP-IDF
Topic: WebSocket Client | How to get text data
Replies: 3
Views: 4604

WebSocket Client | How to get text data

Hello everyone! I am trying to use the Websocket Client example. I have no idea how to get a normal string. I see that I can get a pointer to a string and its size. But I am not getting anything. void parserWS(const char * data, int len) { char * buffer; buffer = (char *) malloc(len + 1); if (buffer...
by mcmega
Wed Dec 30, 2020 6:02 am
Forum: ESP-IDF
Topic: Building the right ESP32 based application
Replies: 4
Views: 4333

Re: Building the right ESP32 based application

Tell me how to work with UDP Client correctly? I want it to stop if it works like AP or APSTA. Delete the task FreeRTOS at night and then re-create it, or what's the right way? I am also interested in the operation of WebSocket, I cannot stop it (esp_websocket_client_destroy (client)) through the WE...
by mcmega
Mon Dec 28, 2020 5:19 pm
Forum: ESP-IDF
Topic: UDP Client | CORRUPT HEAP: multi_heap.c:540
Replies: 1
Views: 2262

Re: UDP Client | CORRUPT HEAP: multi_heap.c:540

Resolved!
Extra break; installed in the code.
by mcmega
Mon Dec 28, 2020 7:12 am
Forum: ESP-IDF
Topic: UDP Client | CORRUPT HEAP: multi_heap.c:540
Replies: 1
Views: 2262

UDP Client | CORRUPT HEAP: multi_heap.c:540

Faced strange application behavior. I send broadcasts to the network to find other devices. They are sent periodically by setting a timeout time for int len = recvfrom (sock, udpcBuffer, sizeof (udpcBuffer) - 1, 0, (struct sockaddr *) & source_addr, & socklen); The first time I send a request, every...
by mcmega
Mon Dec 28, 2020 7:05 am
Forum: ESP-IDF
Topic: Working UDP client on any version of IDF?
Replies: 10
Views: 13333

Re: Working UDP client on any version of IDF?

Thanks for the advice! But I still haven't figured out how to work with select () I used advanced settings struct timeval read_timeout; read_timeout.tv_sec = UDPC_RESPONSE_TIMEOUT; //... setsockopt (sock, SOL_SOCKET, SO_RCVTIMEO, & read_timeout, sizeof read_timeout); It works, but I don't know if it...
by mcmega
Mon Dec 28, 2020 5:20 am
Forum: ESP-IDF
Topic: Building the right ESP32 based application
Replies: 4
Views: 4333

Re: Building the right ESP32 based application

I repeat, I've already done almost all the modules. I used ready-made examples and created a task in FreeRTOS for each module. I just wanted to know if there are any other approaches to writing applications. This post is not specifically about my requirements, but as a general approach to writing a ...
by mcmega
Sat Dec 26, 2020 11:27 am
Forum: ESP-IDF
Topic: Building the right ESP32 based application
Replies: 4
Views: 4333

Building the right ESP32 based application

Hello everyone! I would like to get some tips on how to create a complete firmware for ESP32. It is the general concept and used approaches to programming using ESP-IDF. There is a lot of documentation and examples too, but they do not show the whole concept of building a correct application. Just b...