Page 1 of 1

ESP-IDF V5: esp_websocket_client.h

Posted: Wed Mar 01, 2023 10:39 am
by adanayi
Hi to all!
The latest version where I could find "esp_websocket_client.h" was IDF@v4.4.
Is this component stopped in V5? Are there alternatives?
Bests

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Wed Mar 08, 2023 11:31 am
by rudi ;-)
adanayi wrote:
Wed Mar 01, 2023 10:39 am
Hi to all!
The latest version where I could find "esp_websocket_client.h" was IDF@v4.4.
Is this component stopped in V5? Are there alternatives?
Bests
According to the ESP-IDF documentation, the `esp_websocket_client.h` header file is still available in ESP-IDF v5. However, it's possible that the component has been updated or changed in some way since v4.4. To make sure that you're using the latest version of the component, you can refer to the ESP-IDF documentation or check the GitHub repository for updates.

If you're unable to find the `esp_websocket_client.h` header file in ESP-IDF v5, you may want to consider looking for alternative libraries or components that provide similar functionality for websockets. Some options you may consider include the `libwebsockets` library or the `WebSocketServer` component included in the Arduino core for ESP32.


"AskRudi"

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Thu Mar 09, 2023 12:21 am
by ESP_Sprite
What ChatGPT doesn't know is that we have started moving some components to our component registry, so you will need to add them to your project as such, and websocket-client is one of them. You can add it using

Code: Select all

idf.py add-dependency "espressif/esp_websocket_client^1.0.0" 

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Tue Jun 06, 2023 12:55 pm
by SirrCharles
ESP_Sprite wrote:
Thu Mar 09, 2023 12:21 am
What ChatGPT doesn't know is that we have started moving some components to our component registry, so you will need to add them to your project as such, and websocket-client is one of them. You can add it using

Code: Select all

idf.py add-dependency "espressif/esp_websocket_client^1.0.0" 
I'm on IDF v5.0.1 and i'm using Visual Studio code.

Running the command [Codebox]idf.py add-dependency "espressif/esp_websocket_client^1.0.0" [/Codebox]
will add the managend component however it will fail when building.



[Codebox]C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c: In function 'set_websocket_transport_optional_settings':
C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c:448:14: error: 'esp_transport_ws_config_t' has no member named 'auth'
448 | .auth = client->config->auth,
| ^~~~
C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c:449:41: warning: initialized field overwritten [-Woverride-init]
449 | .propagate_control_frames = true
| ^~~~
C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c:449:41: note: (near initialization for 'config.propagate_control_frames')
C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c: In function 'esp_websocket_client_task':
C:/Users/Charles/SOCKET_SUPER_SAMPLE/managed_components/espressif__esp_websocket_client/esp_websocket_client.c:849:70: error: implicit declaration of function 'esp_transport_ws_get_upgrade_request_status' [-Werror=implicit-function-declaration]
849 | client->error_handle.esp_ws_handshake_status_code = esp_transport_ws_get_upgrade_request_status(client->transport);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[/Codebox]

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Mon Jun 19, 2023 6:07 am
by adanayi
Dear all,
I think V5 is under update and also released at the same time. So that'll be normal if some components are "being added to the repository".
For my own project, I used V4.4 as mentioned before. However, for next major update of my project, I'll check V5 again after a while and I'll In-Sha-Allah inform you if WS had been added then!

Note:
@ESP_Sprite:
What does it do with ChatGPT?!

Bests,
Abolfazl

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Wed Jun 21, 2023 2:48 am
by ESP_Sprite
adanayi wrote:
Mon Jun 19, 2023 6:07 am
@ESP_Sprite:
What does it do with ChatGPT?!
Rudi's answer was generated using ChatGPT.

Re: ESP-IDF V5: esp_websocket_client.h

Posted: Wed Jun 21, 2023 12:08 pm
by adanayi
ESP_Sprite wrote:
Wed Jun 21, 2023 2:48 am
adanayi wrote:
Mon Jun 19, 2023 6:07 am
@ESP_Sprite:
What does it do with ChatGPT?!
Rudi's answer was generated using ChatGPT.
:P
ChatGPT subjects and issues are just to begin in all network communities like this one...
I wonder how did you catch it?!