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

Merged
merged 22 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eaf9d00
WIP on adding PPP support through embassy-net-ppp using embassy-at-cmux
MathiasKoch Feb 16, 2024
ccaf547
Working naive ppp example
MathiasKoch Feb 16, 2024
80c4c8d
TCP working in PPP example
MathiasKoch Feb 20, 2024
942b93e
Simplify initialization of both ppp mode and ublox mode, by providing…
MathiasKoch Feb 21, 2024
67adb83
Change feature flag naming
MathiasKoch Feb 21, 2024
6a7a031
Remove old unused examples
MathiasKoch Feb 21, 2024
25e398a
Move ppp and internal-stack to separate modules
MathiasKoch Feb 21, 2024
89dfd1d
Remove async feature
MathiasKoch Feb 23, 2024
8206f13
Working PPP + CMUX implementation
MathiasKoch Mar 15, 2024
0f459d2
Before comparison with ubxlib
MathiasKoch Apr 3, 2024
049e462
Add registration management, meticulously derived from ubxlib
MathiasKoch Apr 22, 2024
584bc40
Change modelId to borrowed
MathiasKoch May 27, 2024
52f9c70
Bump embassy-sync to 0.6
MathiasKoch Jun 17, 2024
dd4328c
Use git dependencies
MathiasKoch Jun 17, 2024
c7a1ef4
Allow setting AT+UEMBPF when using PPP
MathiasKoch Jun 21, 2024
5a4572a
Rework pwr control and operation state logic. Also add AT command sup…
MathiasKoch Jul 17, 2024
dc3ca79
Allow control handle to query firmware version of device
MathiasKoch Jul 18, 2024
ad09bea
Use online dependency for embassy-at-cmux
MathiasKoch Jul 18, 2024
944d089
Fix logging when using log
MathiasKoch Aug 9, 2024
1053294
Make embassy-at-cmux non-optional
MathiasKoch Sep 4, 2024
a3890fd
Fix Control by adding ProxyClient, because only two AT/data channels …
MathiasKoch Sep 13, 2024
2a1eb07
Bump embassy
MathiasKoch Sep 24, 2024
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
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
134 changes: 97 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,125 @@ name = "ublox_cellular"
doctest = false

[dependencies]
atat = { version = "0.21.0", features = ["derive", "bytes"] }
atat = { version = "0.23", 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 = "c83b7a052" }
# embassy-at-cmux = { path = "../embassy/embassy-at-cmux" }

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 = []
# snr-reported = []
authentication-mode-automatic = []
# lwm2m = []
ucged = []
# http = []
ppp = ["dep:embassy-net-ppp", "dep:embassy-net"]


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

async = ["dep:embedded-nal-async", "dep:embassy-futures"]
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-at-cmux/defmt",
"embassy-futures/defmt",
"ublox-sockets?/defmt",
"embassy-net-ppp?/defmt",
"embassy-net?/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`
any-module = []
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 +144,18 @@ 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 = "84dba2941" }
embassy-sync = { git = "https://github.com/MathiasKoch/embassy", rev = "84dba2941" }
embassy-futures = { git = "https://github.com/MathiasKoch/embassy", rev = "84dba2941" }
embassy-net-ppp = { git = "https://github.com/MathiasKoch/embassy", rev = "84dba2941" }
embassy-net = { git = "https://github.com/MathiasKoch/embassy", rev = "84dba2941" }

#embassy-time = { path = "../embassy/embassy-time" }
#embassy-sync = { path = "../embassy/embassy-sync" }
#embassy-futures = { path = "../embassy/embassy-futures" }
atat = { git = "https://github.com/BlackbirdHQ/atat", rev = "a466836" }
# atat = { path = "../atat/atat" }

# [patch."https://github.com/MathiasKoch/embassy"]
# embassy-at-cmux = { path = "../embassy/embassy-at-cmux" }
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.

Loading
Loading