ESP-IDF V5: esp_websocket_client.h

adanayi
Posts: 3
Joined: Wed Mar 01, 2023 10:34 am

ESP-IDF V5: esp_websocket_client.h

Postby adanayi » 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
Bests,
Abolfazl Danayi

PhD student in communication systems / Tehran University
Focused on "IoT" and "BCI"

"Knowledge is the root of all goods." :idea:

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP-IDF V5: esp_websocket_client.h

Postby rudi ;-) » Wed Mar 08, 2023 11:31 am

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"
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP-IDF V5: esp_websocket_client.h

Postby ESP_Sprite » 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" 

SirrCharles
Posts: 2
Joined: Sun Jun 04, 2017 4:39 am

Re: ESP-IDF V5: esp_websocket_client.h

Postby SirrCharles » Tue Jun 06, 2023 12:55 pm

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]

adanayi
Posts: 3
Joined: Wed Mar 01, 2023 10:34 am

Re: ESP-IDF V5: esp_websocket_client.h

Postby adanayi » Mon Jun 19, 2023 6:07 am

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
Bests,
Abolfazl Danayi

PhD student in communication systems / Tehran University
Focused on "IoT" and "BCI"

"Knowledge is the root of all goods." :idea:

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP-IDF V5: esp_websocket_client.h

Postby ESP_Sprite » 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.

adanayi
Posts: 3
Joined: Wed Mar 01, 2023 10:34 am

Re: ESP-IDF V5: esp_websocket_client.h

Postby adanayi » Wed Jun 21, 2023 12:08 pm

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?!
Bests,
Abolfazl Danayi

PhD student in communication systems / Tehran University
Focused on "IoT" and "BCI"

"Knowledge is the root of all goods." :idea:

Who is online

Users browsing this forum: Bing [Bot] and 50 guests