Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ This should work together with `esp-wifi`. It currently won't work without. Howe

See the examples for how to use it. A key thing is to enable the feature `big-heap` in esp-wifi since more heap memory is needed to get this working.

In general this is heavy in terms of heap memory used and code size. If you can, you should prefer using something like `embedded-tls`.

For now it's missing advanced configuration options which will be added step-by-step.

Currently this won't work on ESP32-S2 - getting it to work will require tweaking the memory usage a lot!

The examples use one hard-coded address of `www.google.com` which might not always work.
Also the examples include hard-coded certificates which will expire some day.

## License

Licensed under either of:
Expand Down
6 changes: 2 additions & 4 deletions examples-esp32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ embassy-time = { version = "0.1.0", features = ["nightly"], optional = true }
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"], optional = true }
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "26474ce6eb759e5add1c137f3417845e0797df3a", features = ["nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"], optional = true }

esp-wifi = { git = "https://github.com/esp-rs/esp-wifi.git", features = ["big-heap", "phy-enable-usb", "esp32", "embedded-svc", "wifi"], rev = "f79819d49d5dbb6899ef3e4de0fce837cac672ba" }
esp-wifi = { git = "https://github.com/esp-rs/esp-wifi.git", features = ["big-heap", "phy-enable-usb", "esp32", "embedded-svc", "wifi"], rev = "cce6738220f4f12ab4db92f74295e762f5425e99" }
smoltcp = { version = "0.9.1", default-features=false, features = ["proto-igmp", "proto-ipv4", "socket-tcp", "socket-icmp", "socket-udp", "medium-ethernet", "proto-dhcpv4", "socket-raw", "socket-dhcpv4"] }
embedded-svc = { version = "0.23.1", default-features = false}
log = "0.4.16"
embedded-hal = "0.2"
embedded-storage = "0.3.0"
crc = "3.0.0"
embedded-io = "0.4.0"
heapless = "0.7.16"
critical-section = "1.0.1"

esp-mbedtls = { path = "/projects/esp/esp-mbedtls/esp-mbedtls", features = ["async"] }
esp-mbedtls = { path = "../esp-mbedtls", features = ["async"] }

[[example]]
name = "async"
Expand Down
9 changes: 2 additions & 7 deletions examples-esp32c3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ embassy-time = { version = "0.1.0", features = ["nightly"], optional = true }
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"], optional = true }
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "26474ce6eb759e5add1c137f3417845e0797df3a", features = ["nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"], optional = true }

esp-wifi = { git = "https://github.com/esp-rs/esp-wifi.git", features = ["big-heap", "phy-enable-usb", "esp32c3", "embedded-svc", "wifi"], rev = "f79819d49d5dbb6899ef3e4de0fce837cac672ba" }
esp-wifi = { git = "https://github.com/esp-rs/esp-wifi.git", features = ["big-heap", "phy-enable-usb", "esp32c3", "embedded-svc", "wifi"], rev = "cce6738220f4f12ab4db92f74295e762f5425e99" }
smoltcp = { version = "0.9.1", default-features=false, features = ["proto-igmp", "proto-ipv4", "socket-tcp", "socket-icmp", "socket-udp", "medium-ethernet", "proto-dhcpv4", "socket-raw", "socket-dhcpv4"] }
embedded-svc = { version = "0.23.1", default-features = false}
log = "0.4.16"
embedded-hal = "0.2"
embedded-storage = "0.3.0"
crc = "3.0.0"
embedded-io = "0.4.0"
heapless = "0.7.16"
critical-section = "1.0.1"

esp-mbedtls = { path = "/projects/esp/esp-mbedtls/esp-mbedtls", features = ["async"] }
esp-mbedtls = { path = "../esp-mbedtls", features = ["async"] }

[[example]]
name = "async"
Expand All @@ -40,6 +38,3 @@ async = ["esp-wifi/esp32c3-async", "esp-wifi/embassy-net", "embassy-executor", "
[patch.crates-io]
esp32c3-hal = { git = "https://github.com/esp-rs/esp-hal", package = "esp32c3-hal", rev = "e5d1c603b0d4833632c2358ad3fad36964bf0ed5"}
esp-hal-common = { git = "https://github.com/esp-rs/esp-hal", package = "esp-hal-common", rev = "e5d1c603b0d4833632c2358ad3fad36964bf0ed5"}

[patch.'https://github.com/esp-rs/esp-wifi.git']
esp-wifi = { path = "/projects/esp/esp-wifi/esp-wifi" }
15 changes: 15 additions & 0 deletions examples-esp32s3/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[target.xtensa-esp32s3-none-elf]
runner = "espflash flash --monitor"

[build]
rustflags = [
"-C", "link-arg=-Tlinkall.x",
"-C", "link-arg=-nostartfiles",
"-C", "link-arg=-Trom_functions.x",
"-C", "target-feature=-loop",
]

target = "xtensa-esp32s3-none-elf"

[unstable]
build-std = ["core"]
10 changes: 10 additions & 0 deletions examples-esp32s3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
40 changes: 40 additions & 0 deletions examples-esp32s3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[package]
name = "examples"
version = "0.1.0"
authors = ["bjoernQ <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"

[profile.release]
debug = true

[dependencies]
hal = { package = "esp32s3-hal", version = "0.8.0" }
esp-backtrace = { version = "0.6.0", features = ["esp32s3", "panic-handler", "print-uart", "exception-handler"] }
esp-println = { version = "0.4.0", features = ["esp32s3","log"] }

embassy-time = { version = "0.1.0", features = ["nightly"], optional = true }
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"], optional = true }
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "26474ce6eb759e5add1c137f3417845e0797df3a", features = ["nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"], optional = true }

esp-wifi = { git = "https://github.com/esp-rs/esp-wifi.git", features = ["big-heap", "phy-enable-usb", "esp32s3", "embedded-svc", "wifi"], rev = "cce6738220f4f12ab4db92f74295e762f5425e99" }
smoltcp = { version = "0.9.1", default-features=false, features = ["proto-igmp", "proto-ipv4", "socket-tcp", "socket-icmp", "socket-udp", "medium-ethernet", "proto-dhcpv4", "socket-raw", "socket-dhcpv4"] }
embedded-svc = { version = "0.23.1", default-features = false}
log = "0.4.16"
embedded-hal = "0.2"
embedded-io = "0.4.0"
heapless = "0.7.16"
critical-section = "1.0.1"

esp-mbedtls = { path = "../esp-mbedtls", features = ["async"] }

[[example]]
name = "async"
required-features = ["async"]

[features]
async = ["esp-wifi/esp32s3-async", "esp-wifi/embassy-net", "embassy-executor", "embassy-net", "embassy-time", "embedded-io/async"]

[patch.crates-io]
esp32s3-hal = { git = "https://github.com/esp-rs/esp-hal", package = "esp32s3-hal", rev = "e5d1c603b0d4833632c2358ad3fad36964bf0ed5"}
esp-hal-common = { git = "https://github.com/esp-rs/esp-hal", package = "esp-hal-common", rev = "e5d1c603b0d4833632c2358ad3fad36964bf0ed5"}
Loading