Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(async): ppp support using embassy-net-ppp & embassy-at-cmux #101

Open
wants to merge 14 commits into
base: feature/async
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"rust-analyzer.cargo.features": [
"lara-r6",
"embassy-embedded-hal"
],
"rust-analyzer.cargo.target": "thumbv7em-none-eabihf",
"rust-analyzer.diagnostics.disabled": [
Expand Down
128 changes: 91 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,123 @@ name = "ublox_cellular"
doctest = false

[dependencies]
atat = { version = "0.21.0", features = ["derive", "bytes"] }
atat = { version = "0.22", features = ["derive", "bytes"] }
heapless = { version = "^0.8", features = ["serde"] }
nb = "^1"
serde = { version = "^1", default-features = false, features = ["derive"] }
#ublox-sockets = { version = "0.5", optional = true }
ublox-sockets = { git = "https://github.com/BlackbirdHQ/ublox-sockets", branch = "feature/async-borrowed-sockets", optional = true }
embassy-time = "0.3"
embassy-sync = "0.5"
embassy-sync = "0.6"

no-std-net = { version = "^0.6", features = ["serde"] }

log = { version = "^0.4", default-features = false, optional = true }
defmt = { version = "^0.3", optional = true }

futures-util = { version = "0.3.29", default-features = false }
#futures = { version = "0.3.17", default-features = false, features = [
# "async-await",
#] }

embassy-futures = { version = "0.1", optional = true }
embassy-futures = { version = "0.1" }

embedded-hal = "1.0.0"
embedded-nal = "0.8"
embedded-nal-async = { version = "0.7", optional = true }
embedded-nal-async = { version = "0.7" }

embassy-at-cmux = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a", optional = true }
embassy-net-ppp = { version = "0.1", optional = true }
embassy-net = { version = "0.4", features = [
"proto-ipv4",
"medium-ip",
], optional = true }
embassy-embedded-hal = { version = "0.1", optional = true }

embedded-io = "0.6"
embedded-io-async = "0.6"

[features]
default = ["socket-udp", "socket-tcp", "async", "ublox-sockets"]
default = ["socket-udp", "socket-tcp", "ppp"]


### Cellular feature list from ubxlib:
use-upsd-context-activation = []
# mno-profile = []
# cscon = []
# root-of-trust = []
# async-sock-close = []
# data-counters = []
# security-tls-iana-numbering = []
# security-tls-server-name-indication = []
# security-tls-psk-as-hex = []
# mqtt = []
# mqtt-sara-r4-old-syntax = []
# mqtt-set-local-port = []
# mqtt-session-retain = []
# mqtt-binary-publish = []
# mqtt-will = []
# mqtt-keep-alive = []
# mqtt-security = []
ucged5 = []
context-mapping-required = []
# security-tls-cipher-list = []
# auto-bauding = []
# at-profiles = []
# security-ztp = []
# file-system-tag = []
# dtr-power-saving = []
# 3gpp-power-saving = []
# 3gpp-power-saving-paging-window-set = []
# deep-sleep-urc = []
# edrx = []
# mqttsn = []
# mqttsn-security = []
# cts-control = []
# sock-set-local-port = []
# fota = []
# uart-power-saving = []
cmux = ["dep:embassy-at-cmux"]
# snr-reported = []
authentication-mode-automatic = []
# lwm2m = []
ucged = []
# http = []
ppp = ["cmux", "dep:embassy-net-ppp", "dep:embassy-net"]

async = ["dep:embedded-nal-async", "dep:embassy-futures"]

automatic-apn = []
internal-network-stack = ["dep:ublox-sockets"]

socket-tcp = ["ublox-sockets?/socket-tcp", "embassy-net?/tcp"]
socket-udp = ["ublox-sockets?/socket-udp", "embassy-net?/udp"]

defmt = [
"dep:defmt",
"ublox-sockets?/defmt",
"atat/defmt",
"heapless/defmt-03",
"embassy-time/defmt",
"embassy-sync/defmt",
"embassy-futures?/defmt",
"embassy-futures/defmt",
"ublox-sockets?/defmt",
"embassy-net-ppp?/defmt",
"embassy-net?/defmt",
"embassy-at-cmux?/defmt",
]

log = ["dep:log", "ublox-sockets?/log", "atat/log"]

automatic-apn = []

lara-r2 = []
lara-r6 = []
leon-g1 = []
lisa-u2 = []
mpci-l2 = []
sara-g3 = []
sara-g4 = []
sara-r5 = ["upsd-context-activation"]
sara-u1 = []
sara-u2 = ["upsd-context-activation"]
toby-l2 = []
# The supported list of cellular modules.
#
# Note: if you add a new module type here, you also need to add it in
# `modules.rs`
lara-r6 = ["ucged"]
lena-r8 = []
sara-r410m = ["ucged", "ucged5"]
sara-r412m = ["ucged", "ucged5"]
sara-r422 = ["context-mapping-required", "ucged"]
sara-r5 = ["context-mapping-required", "ucged", "authentication-mode-automatic"]
sara-u201 = [
"use-upsd-context-activation",
"context-mapping-required",
"ucged",
"authentication-mode-automatic",
]
toby-r2 = []
toby-l4 = []

upsd-context-activation = []

socket-tcp = ["ublox-sockets?/socket-tcp"]
socket-udp = ["ublox-sockets?/socket-udp"]

[workspace]
members = []
Expand All @@ -91,11 +142,14 @@ exclude = ["examples"]
#ublox-sockets = { git = "https://github.com/BlackbirdHQ/ublox-sockets", branch = "feature/async-borrowed-sockets" }
no-std-net = { git = "https://github.com/rushmorem/no-std-net", branch = "issue-15" }
#ublox-sockets = { path = "../ublox-sockets" }
atat = { git = "https://github.com/BlackbirdHQ/atat", branch = "master" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", branch = "main" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", branch = "main" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy", branch = "main" }
embassy-time = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a" }
embassy-sync = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a" }
embassy-futures = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a" }
embassy-net-ppp = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a" }
embassy-net = { git = "https://github.com/MathiasKoch/embassy", rev = "5fa7b8f4a" }

#embassy-time = { path = "../embassy/embassy-time" }
#embassy-sync = { path = "../embassy/embassy-sync" }
#embassy-futures = { path = "../embassy/embassy-futures" }

atat = { path = "../atat/atat" }
6 changes: 0 additions & 6 deletions examples/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions examples/common_lib/Cargo.toml

This file was deleted.

83 changes: 0 additions & 83 deletions examples/common_lib/src/gpio.rs

This file was deleted.

3 changes: 0 additions & 3 deletions examples/common_lib/src/lib.rs

This file was deleted.

42 changes: 0 additions & 42 deletions examples/common_lib/src/serial.rs

This file was deleted.