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]