Skip to content

Commit b57a13c

Browse files
committed
wip
1 parent 57cd884 commit b57a13c

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "esp32s3_out.ld",
5+
"partitions": "large_littlefs_32MB.csv",
6+
"memory_type": "opi_opi"
7+
},
8+
"core": "esp32",
9+
"extra_flags": [
10+
"-DARDUINO_ESP32S3_DEV",
11+
"-DARDUINO_USB_MODE=0",
12+
"-DARDUINO_RUNNING_CORE=1",
13+
"-DARDUINO_EVENT_RUNNING_CORE=1",
14+
"-DBOARD_HAS_PSRAM"
15+
],
16+
"f_cpu": "240000000L",
17+
"f_flash": "80000000L",
18+
"flash_mode": "dio",
19+
"boot": "opi",
20+
"hwids": [
21+
[
22+
"0X303A",
23+
"0x1001"
24+
]
25+
],
26+
"mcu": "esp32s3",
27+
"variant": "esp32s3"
28+
},
29+
"connectivity": [
30+
"wifi"
31+
],
32+
"debug": {
33+
"default_tool": "esp-builtin",
34+
"onboard_tools": [
35+
"esp-builtin"
36+
],
37+
"openocd_target": "esp32s3.cfg"
38+
},
39+
"frameworks": [
40+
"arduino",
41+
"espidf"
42+
],
43+
"name": "Espressif ESP32-S3-DevKitC-2-opi",
44+
"upload": {
45+
"flash_size": "32MB",
46+
"maximum_ram_size": 327680,
47+
"maximum_size": 33554432,
48+
"require_upload_port": true,
49+
"speed": 460800
50+
},
51+
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html",
52+
"vendor": "Espressif"
53+
}

examples/Websocket-Chat/Websocket-Chat.ino renamed to examples/Websocket-Chat/Websocket-Chat.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
#include <sstream>
1818

1919
// TODO: Configure your WiFi here
20+
#ifndef WIFI_SSID
2021
#define WIFI_SSID "<your ssid goes here>"
2122
#define WIFI_PSK "<your pre-shared key goes here>"
23+
#endif
2224

2325
// Max clients to be connected to the chat
2426
#define MAX_CLIENTS 4

platformio.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[platformio]
2-
src_dir = examples/Websocket-Chat
2+
33

44
[env]
55
framework = arduino
@@ -8,16 +8,21 @@ upload_speed = 460800
88
build_type = debug
99
monitor_filters = esp32_exception_decoder
1010
upload_port = /dev/cu.usbmodem11201
11+
build_src_filter =
12+
+<*.cpp>
13+
+<../examples/Websocket-Chat/*.cpp>
1114

1215
[credentials]
1316
wifi_ssids =
1417
-DWIFI_SSID=\"${sysenv.WIFI_SSID}\"
15-
-DWIFI_PASSWORD=\"${sysenv.WIFI_PASSWORD}\"
18+
-DWIFI_PSK=\"${sysenv.WIFI_PASSWORD}\"
1619

1720
[env:custom-server]
1821
1922

20-
board = m5stack-cores3
23+
; board = m5stack-cores3
24+
board = esp32-s3-devkitc-1-32MB-8MB
25+
2126
upload_protocol = esptool
2227
debug_tool = esp-builtin
2328
debug_init_break = tbreak app_main
@@ -26,7 +31,6 @@ build_flags =
2631
-Isrc
2732
-ggdb3 -O0
2833
-DCORE_DEBUG_LEVEL=5
29-
-DM5UNIFIED
3034
${credentials.wifi_ssids}
3135

3236
lib_deps =

src/HTTPConnection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "HTTPConnection.hpp"
2-
2+
#include "mbedtls/base64.h"
3+
#include "mbedtls/sha1.h"
34
namespace httpsserver {
45

56
HTTPConnection::HTTPConnection(ResourceResolver * resResolver):

0 commit comments

Comments
 (0)