File tree Expand file tree Collapse file tree 6 files changed +552
-0
lines changed Expand file tree Collapse file tree 6 files changed +552
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.20.0)
2+
3+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
4+ project (websocket_client)
5+
6+ FILE (GLOB app_sources src/*.c)
7+ target_sources (app PRIVATE ${app_sources} )
Original file line number Diff line number Diff line change 1+ # Wi-Fi Configuration
2+ CONFIG_WIFI=y
3+
4+ # Network Configuration
5+ CONFIG_NET_CONFIG_AUTO_INIT=n
6+ CONFIG_NET_CONNECTION_MANAGER=y
7+ CONFIG_NET_DHCPV4=y
8+ CONFIG_NET_DHCPV4_SERVER=y
9+ CONFIG_NET_IF_MAX_IPV4_COUNT=2
10+ CONFIG_NET_IF_MAX_IPV6_COUNT=2
11+ CONFIG_NET_IPV4=y
12+ CONFIG_NET_L2_ETHERNET=y
13+ CONFIG_NET_L2_WIFI_MGMT=y
14+ CONFIG_NET_MGMT=y
15+ CONFIG_NET_MGMT_EVENT=y
16+ CONFIG_NET_MGMT_EVENT_INFO=y
17+ CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=10
18+ CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096
19+ CONFIG_NET_PKT_RX_COUNT=16
20+ CONFIG_NET_PKT_TX_COUNT=16
21+ CONFIG_NET_SOCKETS_SERVICE_STACK_SIZE=4096
22+ CONFIG_NET_TCP=y
23+ CONFIG_NET_UDP=y
24+ CONFIG_NETWORKING=y
25+ CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4=y
26+
27+ CONFIG_REQUIRES_FULL_LIBC=y
28+ CONFIG_NET_IPV6=y
29+ CONFIG_NET_SOCKETS=y
30+ CONFIG_ZVFS_POLL_MAX=4
31+ CONFIG_POSIX_API=y
32+ CONFIG_CBPRINTF_FP_SUPPORT=y
33+
34+ CONFIG_HTTP_CLIENT=y
35+ CONFIG_WEBSOCKET_CLIENT=y
36+
37+ # LOG Configuration
38+ CONFIG_NET_LOG=y
39+ CONFIG_NET_DHCPV4_SERVER_LOG_LEVEL_DBG=y
Original file line number Diff line number Diff line change 1+ #ifndef CONFIG_H
2+ #define CONFIG_H
3+
4+ /* STA Mode Configuration */
5+ #define WIFI_SSID "SSID" // Replace `SSID` with WiFi ssid
6+ #define WIFI_PSK "PASSWORD" // Replace `PASSWORD` with Router password
7+
8+ /* Magistrala Configuration */
9+ #define MAGISTRALA_IP \
10+ "MAGISTRALA_IP" // Replace with your Magistrala instance IP
11+ #define MAGISTRALA_WS_PORT 8186
12+ #define DOMAIN_ID "DOMAIN_ID" // Replace with your Domain ID
13+ #define CLIENT_ID "CLIENT_ID" // Replace with your Client ID
14+ #define CLIENT_SECRET "CLIENT_SECRET" // Replace with your Client secret
15+ #define CHANNEL_ID "CHANNEL_ID" // Replace with your Channel ID
16+
17+ #endif
You can’t perform that action at this time.
0 commit comments