Compare commits
147 commits
Author | SHA1 | Date | |
---|---|---|---|
ff4a7705d4 | |||
701ff50ec8 | |||
04e79dca2b | |||
b27da2155e | |||
32789a4546 | |||
c6c34462bb | |||
0a0f502410 | |||
e92b0522b8 | |||
1300e040d7 | |||
a59a3c590d | |||
c403dfa7c1 | |||
5d96f6cb2d | |||
108132ef9e | |||
5d42a34f16 | |||
41e1f8eda3 | |||
d4b47c109f | |||
f7b9da5086 | |||
dc697e9dfb | |||
c5bfbc9adb | |||
a198e7b101 | |||
820712ef4c | |||
31099ebdcb | |||
7294638681 | |||
9bd3fc067d | |||
7f8d0a8397 | |||
abc0c5fb54 | |||
f34356da10 | |||
f5ca4bd2f7 | |||
76f3599d24 | |||
c7b99764e1 | |||
b95fb2713a | |||
bde028d195 | |||
fcacee8fd7 | |||
982e17933c | |||
6855ef7ed7 | |||
8566de3f70 | |||
0430a37cd2 | |||
2a51417b80 | |||
b78e6bb278 | |||
260c166ce9 | |||
7aa23f4015 | |||
c0d13009a4 | |||
bb1dcbe4a1 | |||
0cc47955af | |||
9fe4197e52 | |||
ad887a536e | |||
877b8538eb | |||
5a7183b154 | |||
e0e8562d23 | |||
e63ea62512 | |||
0c3a7ed0d8 | |||
62995f8429 | |||
ed897d6ff7 | |||
e73dac51f5 | |||
c501f6c5e6 | |||
10606b14ed | |||
31a4da2773 | |||
b935fdf043 | |||
d522fac9b8 | |||
f1d8af8e3d | |||
6280603232 | |||
ab560b926a | |||
d24b0edcb0 | |||
94cbba27cf | |||
5773952538 | |||
ebda011bc7 | |||
3070e42945 | |||
9a7700dee4 | |||
9c1d2ad049 | |||
f1a4b4b251 | |||
57968c3167 | |||
7b28751871 | |||
8fb05a3010 | |||
35d9c7b6fb | |||
3b352472dc | |||
24e742e0a2 | |||
5182e4431b | |||
6f361644cd | |||
4a83509bf8 | |||
70da5adc2b | |||
f9f819d5fd | |||
823543ff03 | |||
c2ea32f2c9 | |||
c1e3efdb8c | |||
e666931d1a | |||
a2701de3a0 | |||
4bc8383016 | |||
714c198f54 | |||
fe7cd6d510 | |||
7a601ebc6e | |||
c1757ce169 | |||
5845642101 | |||
c38b476f9f | |||
7cf87ee58a | |||
6f1ac51630 | |||
b351228df4 | |||
b0dad705bc | |||
40c33a8d79 | |||
42944f2d3c | |||
37accb8a0f | |||
a235a84dad | |||
3cc2f05b82 | |||
980a8432e6 | |||
7f3e4326ea | |||
7b3e9c8900 | |||
ed348c03b8 | |||
23348bd175 | |||
4e0362d4ac | |||
d67e2de161 | |||
238acde937 | |||
1cdfb5ac6b | |||
9e270565cf | |||
4e1c6c992c | |||
0a5e335106 | |||
a8ac4c6acb | |||
573df9a8e3 | |||
3cc8ee75ce | |||
92601f6383 | |||
42c6442481 | |||
b3794a100f | |||
768c090462 | |||
9ef78cdbcb | |||
fd934576e7 | |||
ae281d24c0 | |||
3c8acca0fc | |||
a3fbd76957 | |||
69cd1ef86f | |||
a2001bc612 | |||
ded4ff6821 | |||
e5684c7555 | |||
8607d619d4 | |||
9ca7d89f4f | |||
02cc37a104 | |||
9e8b112de6 | |||
e968eb6223 | |||
e144dcfb13 | |||
20b9a3ddca | |||
3e925d17c8 | |||
ae8a50fc31 | |||
d170d240eb | |||
0f01d4c4be | |||
f26027c5bf | |||
a1ca94131f | |||
7fda440641 | |||
39a5feff0f | |||
c69ead6670 | |||
9b80808660 |
12 changed files with 1246 additions and 305 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[target.aarch64-unknown-linux-musl]
|
||||
linker = "lld"
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
/target
|
||||
/logs
|
||||
/output
|
||||
/output
|
||||
.cargo
|
||||
.rustup
|
||||
|
|
23
.woodpecker.yml
Normal file
23
.woodpecker.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
pipeline:
|
||||
build:
|
||||
image: nixos/nix:latest
|
||||
commands:
|
||||
- nix-shell --run 'cargo build --release --target aarch64-unknown-linux-musl'
|
||||
# publish:
|
||||
# when:
|
||||
# event: tag
|
||||
# image: woodpeckerci/plugin-gitea-release
|
||||
# settings:
|
||||
# base_url: https://git.blizzard.systems
|
||||
# files:
|
||||
# - "target/aarch64-unknown-linux-musl/release/seymour_life"
|
||||
# checksum:
|
||||
# - "target/aarch64-unknown-linux-musl/release/seymour_life"
|
||||
# api_key: ${FORGEJO_API}
|
||||
# secrets:
|
||||
# - source: forgejo_api
|
||||
# target: FORGEJO_API
|
||||
# target: ${CI_COMMIT_TAG}
|
||||
# draft: true
|
||||
# prerelease: true
|
||||
# title: .woodpecker/title.txt
|
1
.woodpecker/title.txt
Normal file
1
.woodpecker/title.txt
Normal file
|
@ -0,0 +1 @@
|
|||
v2.3.2
|
233
Cargo.lock
generated
233
Cargo.lock
generated
|
@ -41,6 +41,55 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is-terminal",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
|
@ -92,6 +141,48 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "401a4694d2bf92537b6867d94de48c4842089645fdcdf6c71865b175d836e9c2"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"bitflags",
|
||||
"clap_lex",
|
||||
"strsim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
|
||||
|
||||
[[package]]
|
||||
name = "codespan-reporting"
|
||||
version = "0.11.1"
|
||||
|
@ -102,6 +193,12 @@ dependencies = [
|
|||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
||||
|
||||
[[package]]
|
||||
name = "const_fn"
|
||||
version = "0.4.9"
|
||||
|
@ -175,6 +272,27 @@ version = "1.0.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
|
||||
dependencies = [
|
||||
"errno-dragonfly",
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno-dragonfly"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fern"
|
||||
version = "0.6.2"
|
||||
|
@ -184,6 +302,24 @@ dependencies = [
|
|||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.56"
|
||||
|
@ -208,6 +344,29 @@ dependencies = [
|
|||
"cxx-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is-terminal"
|
||||
version = "0.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"io-lifetimes",
|
||||
"rustix",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.6"
|
||||
|
@ -229,26 +388,6 @@ version = "0.2.142"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
|
||||
|
||||
[[package]]
|
||||
name = "libudev"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libudev-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libudev-sys"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "link-cplusplus"
|
||||
version = "1.0.8"
|
||||
|
@ -258,6 +397,12 @@ dependencies = [
|
|||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.17"
|
||||
|
@ -327,12 +472,6 @@ version = "1.17.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.20+deprecated"
|
||||
|
@ -392,6 +531,20 @@ dependencies = [
|
|||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.37.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.13"
|
||||
|
@ -457,7 +610,6 @@ dependencies = [
|
|||
"IOKit-sys",
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libudev",
|
||||
"mach 0.3.2",
|
||||
"nix",
|
||||
"regex",
|
||||
|
@ -465,12 +617,14 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "seymour_poc_rust"
|
||||
version = "2.0.1"
|
||||
name = "seymour_life"
|
||||
version = "2.3.3"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
"derivative",
|
||||
"fern",
|
||||
"glob",
|
||||
"log",
|
||||
"once_cell",
|
||||
"rppal",
|
||||
|
@ -551,6 +705,12 @@ version = "0.1.5"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
|
@ -643,6 +803,12 @@ version = "0.1.10"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
|
@ -749,6 +915,15 @@ dependencies = [
|
|||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.0"
|
||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -1,21 +1,26 @@
|
|||
#This feature is currently limited to nightly versions of cargo.
|
||||
#cargo-features = ["per-package-target"]
|
||||
|
||||
[package]
|
||||
name = "seymour_poc_rust"
|
||||
version = "2.0.1"
|
||||
name = "seymour_life"
|
||||
version = "2.3.3"
|
||||
edition = "2021"
|
||||
#This feature is currently limited to nightly versions of cargo.
|
||||
#forced-target="aarch64-unknown-linux-musl"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rppal = "0.14.1"
|
||||
serialport = "4.2.0"
|
||||
serialport = { version = "4.2.0", default-features = false }
|
||||
log = "0.4"
|
||||
fern = "0.6.2"
|
||||
chrono = "0.4.24"
|
||||
once_cell = "1.17.1"
|
||||
derivative = "2.2.0"
|
||||
time = "0.2.23"
|
||||
clap = { version = "4.3.2", features = ["derive"] }
|
||||
glob = "0.3.1"
|
||||
|
||||
[dev-dependencies]
|
||||
time = "0.2.23"
|
||||
|
|
61
README.md
Normal file
61
README.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
[](https://ci.blizzard.systems/blizzardfinnegan/seymourLifeRust)
|
||||
# Seymour Life
|
||||
|
||||
This is a personal/professional project, which makes use of serial communications (tty over USB via UART) and Raspberry Pi GPIO to simulate long term use of a Seymour device.
|
||||
|
||||
Note that this project will ONLY run properly on a Raspberry Pi. It is developed on, and tested for, the Raspberry Pi 400. This should also be compatible with the Raspberry Pi 4, and Raspberry Pi 3, although they have not been explicitly tested. Older models of Raspberry Pi may work properly, however as this project is originally intended for the `aarch64`/`ARM64` architecture, and older compatibility will not be tested.
|
||||
|
||||
## Install
|
||||
|
||||
### Precompiled Binary
|
||||
|
||||
Pre-compiled binaries can be found in the [releases tab](https://git.blizzard.systems/blizzardfinnegan/seymourLifeRust/releases/latest). Download the preferred version to your preferred directory, then run the following command to make the code executable:
|
||||
|
||||
```bash
|
||||
sudo chmod u+x ./seymour_life
|
||||
```
|
||||
|
||||
To run the binary, simply run:
|
||||
```bash
|
||||
sudo ./seymour_life
|
||||
```
|
||||
|
||||
Note that this command MUST be run as `sudo`/root, due to the way it interacts with GPIO. For more information, please see [the GPIO documentation](https://github.com/golemparts/rppal).
|
||||
|
||||
## Build From Source
|
||||
|
||||
To build this project from source *ON A RASPBERRY PI*, first, download the repository. This can be done by using the Download ZIP button, or running the following command in a terminal where `git` is installed:
|
||||
```bash
|
||||
git clone https://git.blizzard.systems/blizzardfinnegan/seymourLifeRust
|
||||
```
|
||||
|
||||
Once the repository has been downloaded, the project can be built with `cargo`. This can be done using any of the listed install methods on [the Rust install website](https://rustup.rs/).
|
||||
|
||||
Once cargo has been installed, run the following to build the project:
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The runnable command can then be run by the following:
|
||||
```bash
|
||||
sudo ./target/release/seymour_life
|
||||
```
|
||||
|
||||
You can also build without the `--release` flag, which wil take less time, but will be less optimised for the hardware. If you do this, substitue `./target/release/seymour_life` for `./target/debug/seymour_life` in the above command.
|
||||
|
||||
|
||||
## Cross-Compilation
|
||||
|
||||
Cross compilation is possible with this project, if you do not have a Raspberry Pi available specifically for compilation. Compilation directly on the Pi is rather intensive, and takes significantly longer than cross-compiling.
|
||||
|
||||
If you are compiling on Linux, cross-compilation has a dependency of `lld`. This can be found in your distribution's package manager, or directly distributed by LLVM. For Nix users, a predefined `shell.nix` file has been provided for your convenience.
|
||||
|
||||
If you are compiling on Windows, to safely cross-compile, you must modify the `.cargo/config.toml` file. Replace `lld` with `rust-lld`, then cross-compilation should work properly.
|
||||
|
||||
```bash
|
||||
cargo build --target aarch64-unknown-linux-musl
|
||||
# OR
|
||||
cargo build --release --target aarch64-unknown-linux-musl
|
||||
```
|
||||
|
||||
|
264
log-containing-uboot-prompt.txt
Normal file
264
log-containing-uboot-prompt.txt
Normal file
|
@ -0,0 +1,264 @@
|
|||
2023-06-16T13:24:21.325337369-04:00 - [INFO, seymour_life_rust] - Seymour Life Testing version: 2.2.0
|
||||
2023-06-16T13:24:21.332725203-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.334390641-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.334981706-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.334946688-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.338485005-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.339429546-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.342069340-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.345380402-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.346291314-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0...
|
||||
2023-06-16T13:24:21.348997033-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.348832313-04:00 - [INFO, seymour_life_rust] - Testing port /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0. This may take a moment...
|
||||
2023-06-16T13:24:21.350397252-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:21.354512283-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:21.354555227-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:21.356737602-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:21.356767268-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:21.361574936-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:21.361613528-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:21.363938697-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:21.364785888-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:22.353277040-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\0\nNormal Boot\r\nHit any key to stop autoboot: 0 \u{8}\u{8}\u{8} 0\r\nu-boot=> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:22.353534518-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.353576536-04:00 - [TRACE, seymour_life_rust::tty] - writing Quit to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0...
|
||||
2023-06-16T13:24:22.355662412-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of " \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.355762318-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.356654119-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.356813672-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.356864357-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.356906967-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.356945559-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.356985114-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.357024188-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.357063946-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.357107446-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:22.357165852-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of " \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.357251406-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.357305239-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.357424015-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.357472755-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.357512199-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.357549587-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.357588716-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.357627067-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.357666030-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.357706177-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:22.359582001-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.359679389-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.359732721-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.359928218-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.359981273-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.360021161-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.360059179-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.360148919-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.360190029-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.360229288-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.360269880-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:22.364684165-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\0 \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.364785719-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.364705535-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of " \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.364908847-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.364850218-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.364974291-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.365107992-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.365155510-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.365217472-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.365270027-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.365320730-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.365372803-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.365423673-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.365474709-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.365527412-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:22.365158269-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.365630614-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.365670484-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.365711243-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.365750909-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.365790612-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.365831037-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:22.369334447-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of " \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.369416280-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.369466834-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.369578981-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.369670591-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.369712349-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.369749978-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.369788663-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.369826477-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.369865143-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.369905143-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:22.370206823-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of " \r\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:22.370292637-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.370343729-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.370458560-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.370507078-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.370546448-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.370583688-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.370622465-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.370660613-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.370698964-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.370738741-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:22.553102264-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:22.553205374-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:22.553326650-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:22.553375871-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:22.553415871-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:22.553453741-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:22.553492777-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:22.553530240-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:22.553569239-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:22.553610090-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:23.356013718-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "q\r\nUnknown command 'q' - try 'help'\r\nu-boot=> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:23.356199919-04:00 - [TRACE, seymour_life_rust::tty] - writing Newline to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0...
|
||||
2023-06-16T13:24:23.936752728-04:00 - [DEBUG, seymour_life_rust] - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0 is valid port!
|
||||
2023-06-16T13:24:23.936934521-04:00 - [DEBUG, seymour_life_rust::device] - "uninitialised"
|
||||
2023-06-16T13:24:23.937176314-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0\nSuccessful BP tests: 0\nSuccessful temp tests: 0\n"
|
||||
2023-06-16T13:24:23.937228554-04:00 - [TRACE, seymour_life_rust::device] - "Reboots: 0"
|
||||
2023-06-16T13:24:23.937269794-04:00 - [TRACE, seymour_life_rust::device] - "Reboots" value: [0]
|
||||
2023-06-16T13:24:23.937308701-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests: 0"
|
||||
2023-06-16T13:24:23.937347719-04:00 - [TRACE, seymour_life_rust::device] - "Successful BP tests" value: [0]
|
||||
2023-06-16T13:24:23.937386107-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests: 0"
|
||||
2023-06-16T13:24:23.937425940-04:00 - [TRACE, seymour_life_rust::device] - "Successful temp tests" value: [0]
|
||||
2023-06-16T13:24:23.937470384-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:24.358985874-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\nUnknown command 'q' - try 'help'\r\nu-boot=> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:24.359177982-04:00 - [ERROR, seymour_life_rust::device] - Unknown state for TTY TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.3:1.0-port0" }!!! Consult logs immediately.
|
||||
2023-06-16T13:24:25.360298184-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Sun Jun 11 00:42:39 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.360489959-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.360586291-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.360663364-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:25.360741362-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Thu Jun 15 09:15:47 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.360839750-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.360978970-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.361114968-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:25.362313339-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Sun Jun 11 00:28:04 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.362484114-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.362575594-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.362652704-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:25.367849441-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Sun Jun 11 00:56:47 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.368084956-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.368174547-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.368269435-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:25.368280342-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Sun Jun 11 01:01:08 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.368363674-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.368432821-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.368550542-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:25.372596018-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Sun Jun 11 00:47:31 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.372769534-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.372858440-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.372934865-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:25.375055407-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Thu Jun 15 20:49:41 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:25.375237700-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.375334643-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.375411013-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:25.557097398-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:25.557296913-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:25.557379616-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:26.568658516-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:26.610508925-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8python3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:26.610670997-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:26.610823513-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:26.610902919-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:26.635031576-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8ython3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:26.635233406-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:26.635330349-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:26.635402885-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:27.069456557-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:27.188577455-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8python3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:27.188883358-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.188974579-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.189053614-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:27.210484478-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8ython3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:27.210824158-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.210907972-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.210970026-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:27.231532384-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8ython3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:27.231821806-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.231910323-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.231979193-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:27.232081413-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8ython3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:27.232402112-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.232481111-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.232543628-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:27.237853808-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\u{1b}8ython3 -m debugmenu; shutdown -r now\r\nroot@imx8mplus-seymour-mel:~# python3 -m debugmenu; shutdown -r now\r\nLoading App-Framework from: libapp-framework.so.0.01.00\r\n\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:27.238178618-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.238273191-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.238340579-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:27.499435661-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:27.499701990-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:27.499787489-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:27.570194729-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:27.772097088-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> \r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:27.772521156-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:27.962626155-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> \r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:27.962938539-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:28.070936955-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:28.191593793-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.191799808-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:28.214286786-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.214407414-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:28.234680906-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.234810478-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:28.235528337-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.235729483-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:28.241015237-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.241136050-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:28.571600591-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:28.767729907-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:28.767923015-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:28.768003866-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:28.775642881-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.775835045-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0...
|
||||
2023-06-16T13:24:28.965444866-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:28.965630567-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0...
|
||||
2023-06-16T13:24:29.072294448-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:29.194344987-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.194530725-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0...
|
||||
2023-06-16T13:24:29.217018795-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.217122145-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0...
|
||||
2023-06-16T13:24:29.237575949-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.237682688-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0...
|
||||
2023-06-16T13:24:29.238352863-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.238449325-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0...
|
||||
2023-06-16T13:24:29.243788745-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.243882484-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0...
|
||||
2023-06-16T13:24:29.573068322-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:29.769913868-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:29.778399111-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:29.968241114-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.073820511-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:30.197146679-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.219818172-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.240324253-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.241143352-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.3.2:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.246195221-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.1:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:30.574508720-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:30.772775781-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:30.772934297-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0...
|
||||
2023-06-16T13:24:31.075258075-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:31.575960987-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:31.775642249-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.1.4:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:32.076730194-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:32.577459105-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:33.078236348-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:33.578938852-04:00 - [DEBUG, seymour_life_rust::tty] - Read an empty string from device TTY { Serial port name: "platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0" }. Possible read error.
|
||||
2023-06-16T13:24:34.513333606-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\r\nimx8mplus-seymour-mel ttymxc2\r\n\r\nHillrom Front Line Care Embedded Linux for mel 12 imx8mplus-seymour-mel ttymxc2\r\n\r\nimx8mplus-seymour-mel login: " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern LoginPrompt
|
||||
2023-06-16T13:24:34.513549158-04:00 - [TRACE, seymour_life_rust::tty] - writing Login to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:37.516918467-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root\r\r\nLast login: Fri Jun 16 13:04:18 UTC 2023\r\n\u{1b}7\u{1b}[r\u{1b}[999;999H\u{1b}[6n" from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern PreShellPrompt
|
||||
2023-06-16T13:24:38.255944578-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "root@imx8mplus-seymour-mel:~# " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern ShellPrompt
|
||||
2023-06-16T13:24:38.256092890-04:00 - [TRACE, seymour_life_rust::tty] - writing DebugMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:39.503439425-04:00 - [ERROR, seymour_life_rust::device] - Unexpected response from device uninitialised!
|
||||
2023-06-16T13:24:39.503664681-04:00 - [ERROR, seymour_life_rust::device] - Unsure how to continue. Expect data from device uninitialised to be erratic until next cycle.
|
||||
2023-06-16T13:24:39.503739235-04:00 - [TRACE, seymour_life_rust::tty] - writing LifecycleMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:40.739795958-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nDebug Menu\r\n========================================\r\nThis menu is defined in debugmenu.xml. Add submenu tags to this file to add new\r\ncategories for your debug programs and scripts.\r\n----------------------------------------\r\na) Menu Demo\r\nb) Alarms Manager Menu\r\nB) Barcode Manager Menu\r\nc) Connectivity Manager Menu\r\nC) SCRM Menu\r\nd) Software Update Menu\r\nD) Pulse Rate Menu\r\ne) Events Menu\r\nE) Respiration Menu\r\nf) Configuration Application Menu\r\nh) HostProxy Menu\r\nH) HL7Proxy Menu\r\nl) LDAP/Active Directory Menu\r\nL) Life Cycle Testing Menu\r\nm) ModManager Menu\r\nM) Manual Set Parameters Menu\r\nn) NIBP Menu\r\nP) Power Manager Menu\r\np) PDM Menu\r\nr) Radio Menu\r\nR) Braun Menu\r\ns) SpO2 Menu\r\nS) SvcMonProxy Menu\r\nT) NTPProxy Menu\r\nu) UI Menu\r\nU) SureTemp Menu\r\nv) Connector Test\r\nx) Proxy Events Menu\r\ny) SysCtrl Menu\r\nw) Weight App Manager Menu\r\nW) BEST menu\r\nz) Print Manager Debug Menu\r\nZ) LCD Test Menu\r\nv) Debug Menu Verbosity\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> \r\n\r\nLife Cycle Testing Menu\r\n========================================\r\na) EEPROM Data\r\nB) Screen Brightness Menu\r\nb) Power Down Device\r\nc) Reboot Device\r\nd) Check UI Started\r\ne) Read Battery Charge Level\r\nf) Nurse Call On\r\ng) Nurse Call Off\r\nh) Display Current Readings\r\nH) Display Cycle Counts\r\ni) Force Log Rotation\r\nj) Display Patient ID\r\nk) Activate Wireless Networking\r\nl) Deactivate Wireless Networking\r\nN) Start NIBP Reading\r\nn) Check NIBP In Progress\r\np) Bluetooth Info\r\nr) WiFi Radio Info\r\ns) Enable and Start SSH\r\nt) Disable and Stop SSH\r\nu) Check WACP USB Connection\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:40.740159952-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessMenu to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:41.742733809-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n\r\nSet Screen Brightness\r\n****************************************\r\n1) 10%\r\n2) 20%\r\n3) 30%\r\n4) 40%\r\n5) 50%\r\n6) 60%\r\n7) 70%\r\n8) 80%\r\n9) 90%\r\n0) 100%\r\n----------------------------------------\r\n\\) Back\r\nq) Quit\r\n?) Redraw menu\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:41.742998323-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessLow to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:42.745470643-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern DebugMenu
|
||||
2023-06-16T13:24:42.745983006-04:00 - [INFO, seymour_life_rust] - --------------------------------------
|
||||
2023-06-16T13:24:42.746109393-04:00 - [INFO, seymour_life_rust] - Number of devices detected: 9
|
||||
2023-06-16T13:24:42.746264298-04:00 - [INFO, seymour_life_rust] - --------------------------------------
|
||||
|
||||
|
||||
2023-06-16T13:24:42.746362074-04:00 - [TRACE, seymour_life_rust::tty] - writing BrightnessHigh to tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0...
|
||||
2023-06-16T13:24:43.748400808-04:00 - [TRACE, seymour_life_rust::tty] - Successful read of "\r\n> " from tty /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2.2.3:1.0-port0, which matches pattern DebugMenu
|
15
shell.nix
Normal file
15
shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [ lld rustup ];
|
||||
RUSTUP_HOME = toString ./.rustup;
|
||||
CARGO_HOME = toString ./.cargo;
|
||||
RUSTUP_TOOLCHAIN = "stable";
|
||||
HOST_ARCH = "x86_64-unknown-linux-gnu";
|
||||
CARGO_BUILD_TARGET = "aarch64-unknown-linux-musl";
|
||||
shellHook = ''
|
||||
export PATH=$PATH:${CARGO_HOME}/bin
|
||||
export PATH=$PATH:${RUSTUP_HOME}/toolchains/${RUSTUP_TOOLCHAIN}-${HOST_ARCH}/bin/
|
||||
|
||||
rustup target add "${CARGO_BUILD_TARGET}"
|
||||
'';
|
||||
}
|
469
src/device.rs
469
src/device.rs
|
@ -2,19 +2,22 @@ use std::{fs::{self, File}, path::Path, io::Write, thread, time::Duration};
|
|||
use crate::tty::{TTY, Response,Command};
|
||||
use rppal::gpio::{Gpio,OutputPin};
|
||||
|
||||
const BOOT_TIME:Duration = Duration::new(60, 0);
|
||||
const BP_RUN:Duration = Duration::new(75, 0);
|
||||
const REBOOTS_SECTION: &str = "Reboots: ";
|
||||
const BP_SECTION: &str = "Successful BP tests: ";
|
||||
const TEMP_SECTION: &str = "Successful temp tests: ";
|
||||
const TEMP_WAIT:Duration = Duration::from_secs(3);
|
||||
const REBOOTS_SECTION: &str = "Reboots";
|
||||
const BP_SECTION: &str = "Successful BP tests";
|
||||
const TEMP_SECTION: &str = "Successful temp tests";
|
||||
const OUTPUT_FOLDER: &str = "output/";
|
||||
const SECTION_SEPARATOR: &str = ": ";
|
||||
const UNINITIALISED_SERIAL: &str = "uninitialised";
|
||||
const SERIAL_HEADER: &str = "DtCtrlCfgDeviceSerialNum";
|
||||
#[derive(PartialEq,Debug)]
|
||||
pub enum State{
|
||||
Shutdown,
|
||||
LoginPrompt,
|
||||
DebugMenu,
|
||||
LifecycleMenu,
|
||||
BrightnessMenu
|
||||
BrightnessMenu,
|
||||
ShellPrompt
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -28,6 +31,8 @@ pub struct Device{
|
|||
current_state: State,
|
||||
reboots: u64,
|
||||
temps: u64,
|
||||
init_temps: u64,
|
||||
temp_offset: u64,
|
||||
bps: u64
|
||||
}
|
||||
|
||||
|
@ -36,11 +41,11 @@ impl Device{
|
|||
if ! Path::new(&OUTPUT_FOLDER).is_dir(){
|
||||
_ = fs::create_dir(&OUTPUT_FOLDER);
|
||||
};
|
||||
log::debug!("{:?}",&self.serial);
|
||||
let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt";
|
||||
//log::debug!("{:?}",&self.serial);
|
||||
let output_path:String = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt";
|
||||
if ! Path::new(&output_path).exists(){
|
||||
log::debug!("Creating file {}",output_path);
|
||||
let temp = fs::File::create(&output_path);
|
||||
log::debug!("Creating file {}",&output_path);
|
||||
let temp:Result<File, std::io::Error> = fs::File::create(&output_path);
|
||||
match temp{
|
||||
Ok(file) => {
|
||||
self.output_file = Some(file);
|
||||
|
@ -52,35 +57,40 @@ impl Device{
|
|||
}
|
||||
}
|
||||
else {
|
||||
let temp = std::fs::read_to_string(output_path);
|
||||
let temp:Result<String, std::io::Error> = std::fs::read_to_string(output_path);
|
||||
match temp{
|
||||
Ok(file_contents) =>{
|
||||
let file_lines = file_contents.split("\n");
|
||||
let file_lines:Vec<&str> = file_contents.split("\n").collect();
|
||||
log::trace!("{:?}",file_contents);
|
||||
for line in file_lines {
|
||||
if line.len() > 0{
|
||||
log::trace!("{:?}",line);
|
||||
let section_and_data:Vec<&str> = line.split(": ").collect();
|
||||
let section = section_and_data[0];
|
||||
let possible_value = section_and_data[1].trim().parse::<u64>();
|
||||
//log::trace!("{:?}",line);
|
||||
let section_and_data:Vec<&str> = line.split(SECTION_SEPARATOR).collect();
|
||||
let section:&str = section_and_data[0];
|
||||
let possible_value:Result<u64, std::num::ParseIntError> = section_and_data[1].trim().parse::<u64>();
|
||||
match possible_value{
|
||||
Ok(value) => {
|
||||
log::trace!("{:?} value: [{:?}]",section,value);
|
||||
//log::trace!("{:?} value: [{:?}]",section,value);
|
||||
match section {
|
||||
REBOOTS_SECTION => {
|
||||
self.reboots = value;
|
||||
//log::trace!("Reboots set to {:?}",self.reboots);
|
||||
},
|
||||
BP_SECTION => {
|
||||
self.bps = value;
|
||||
self.bps = value.clone();
|
||||
//log::trace!("BPS set to {:?}",self.bps);
|
||||
},
|
||||
TEMP_SECTION => {
|
||||
self.temps = value;
|
||||
self.temp_offset = value;
|
||||
//log::trace!("Temp offset set to {:?}",self.temp_offset);
|
||||
},
|
||||
_ => ()
|
||||
_ => {
|
||||
log::warn!("Invalid import value: [{:?}]. Please ensure that the output directory is clean.",section_and_data);
|
||||
}
|
||||
};
|
||||
}
|
||||
Err(_) => {
|
||||
log::warn!("Unable to parse value [{}] into integer",section_and_data[1]);
|
||||
log::warn!("Unable to parse value [{:?}] into integer",section_and_data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -104,15 +114,55 @@ impl Device{
|
|||
_ = usb_port.read_from_device(None);
|
||||
initial_state = State::LoginPrompt;
|
||||
},
|
||||
Response::Other | Response::Empty | Response::ShellPrompt
|
||||
| Response::LoginPrompt | Response::Rebooting =>
|
||||
initial_state = State::LoginPrompt,
|
||||
Response::BPOn | Response::BPOff | Response::TempFailed
|
||||
| Response::TempSuccess =>
|
||||
initial_state = State::LifecycleMenu,
|
||||
Response::DebugMenuReady | Response::DebugMenuWithContinuedMessage=>
|
||||
initial_state = State::DebugMenu,
|
||||
}
|
||||
Response::UBoot=>{
|
||||
usb_port.write_to_device(Command::Boot);
|
||||
while usb_port.read_from_device(None) != Response::LoginPrompt {}
|
||||
initial_state = State::LoginPrompt;
|
||||
},
|
||||
//Response::Empty parsing here is potentially in bad faith
|
||||
Response::Other | Response::Empty | Response::ShellPrompt | Response::FailedDebugMenu | Response::DebugInit |
|
||||
Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting | Response::PreShellPrompt =>
|
||||
initial_state = State::LoginPrompt,
|
||||
Response::BPOn | Response::BPOff | Response::TempCount(_) |
|
||||
Response::DebugMenu=>{
|
||||
usb_port.write_to_device(Command::Quit);
|
||||
match usb_port.read_from_device(None){
|
||||
Response::ShuttingDown | Response::Rebooting => {
|
||||
while usb_port.read_from_device(None) != Response::LoginPrompt {}
|
||||
initial_state = State::LoginPrompt;
|
||||
},
|
||||
Response::ShellPrompt => {
|
||||
initial_state = State::ShellPrompt;
|
||||
},
|
||||
Response::DebugMenu => {
|
||||
usb_port.write_to_device(Command::Newline);
|
||||
match usb_port.read_from_device(None) {
|
||||
Response::DebugMenu | Response::ShellPrompt => {
|
||||
initial_state = State::ShellPrompt;
|
||||
},
|
||||
_ => {
|
||||
log::error!("Unknown state for TTY {:?}!!! Consult logs immediately.",usb_port);
|
||||
log::debug!("Last known state: DebugMenu.");
|
||||
log::debug!("Assumed but incorrect current state: successfully exited debug menu");
|
||||
return Err("Failed TTY init. Unknown state, cannot trust.".to_string());
|
||||
}
|
||||
};
|
||||
},
|
||||
_ => {
|
||||
log::error!("Unknown state for TTY {:?}!!! Consult logs immediately.",usb_port);
|
||||
log::debug!("Last known state: DebugMenu.");
|
||||
log::debug!("Assumed but incorrect current state: attempted to exit debug menu");
|
||||
return Err("Failed TTY init. Unknown state, cannot trust.".to_string());
|
||||
}
|
||||
};
|
||||
},
|
||||
//Serial response shouldn't exist, emptynewline is already filtered in main
|
||||
Response::Serial(_) | Response::EmptyNewline => {
|
||||
log::error!("Unknown state for TTY {:?}!!! Consult logs immediately.",usb_port);
|
||||
log::debug!("How did I get here???");
|
||||
return Err("Failed TTY init. Unknown state, cannot trust.".to_string());
|
||||
},
|
||||
};
|
||||
},
|
||||
None => initial_state = State::LoginPrompt
|
||||
};
|
||||
|
@ -129,6 +179,8 @@ impl Device{
|
|||
current_state: initial_state,
|
||||
reboots: 0,
|
||||
temps: 0,
|
||||
temp_offset: 0,
|
||||
init_temps: 0,
|
||||
bps: 0
|
||||
};
|
||||
if !output.load_values(){
|
||||
|
@ -144,22 +196,6 @@ impl Device{
|
|||
}
|
||||
}
|
||||
|
||||
fn go_to_login_prompt(&mut self) -> &mut Self{
|
||||
while !(self.current_state == State::LoginPrompt){
|
||||
match self.current_state {
|
||||
State::LoginPrompt => return self,
|
||||
State::DebugMenu | State::LifecycleMenu | State::BrightnessMenu => {
|
||||
self.usb_tty.write_to_device(Command::Quit);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::LoginPrompt;
|
||||
self.reboots+=1;
|
||||
return self;
|
||||
},
|
||||
};
|
||||
};
|
||||
return self;
|
||||
}
|
||||
|
||||
fn go_to_brightness_menu(&mut self) -> &mut Self{
|
||||
while !(self.current_state == State::BrightnessMenu){
|
||||
match self.current_state {
|
||||
|
@ -177,42 +213,58 @@ impl Device{
|
|||
},
|
||||
State::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::Login);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
loop {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
||||
Response::FailedDebugMenu | Response::ShellPrompt => break,
|
||||
_ => {
|
||||
log::error!("Unexpected response from device {}!",self.serial);
|
||||
log::debug!("brightness menu, catch-all, login loop, {}, {:?}",self.serial,self.usb_tty);
|
||||
log::error!("Unsure how to continue. Expect data from device {} to be erratic until next cycle.",self.serial);
|
||||
//break;
|
||||
},
|
||||
};
|
||||
};
|
||||
self.current_state = State::ShellPrompt;
|
||||
},
|
||||
State::ShellPrompt => {
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
loop {
|
||||
match self.usb_tty.read_from_device(None) {
|
||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||
Response::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::Login);
|
||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
},
|
||||
Response::DebugMenu =>
|
||||
break,
|
||||
Response::FailedDebugMenu => {
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
},
|
||||
_ => {
|
||||
log::error!("Unexpected response from device {}!", self.serial);
|
||||
log::debug!("brightness menu, catch-all, shell prompt loop, {}, {:?}",self.serial,self.usb_tty);
|
||||
log::error!("Unsure how to continue. Expect data from device {} to be erratic until next cycle.",self.serial);
|
||||
//break;
|
||||
},
|
||||
};
|
||||
};
|
||||
//_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::DebugMenu;
|
||||
},
|
||||
State::Shutdown => {
|
||||
while self.usb_tty.read_from_device(None) != Response::LoginPrompt{}
|
||||
self.current_state = State::LoginPrompt;
|
||||
},
|
||||
};
|
||||
};
|
||||
return self;
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
fn go_to_debug_menu(&mut self) -> &mut Self{
|
||||
while !(self.current_state == State::DebugMenu){
|
||||
match self.current_state {
|
||||
State::DebugMenu => return self,
|
||||
State::BrightnessMenu => {
|
||||
self.usb_tty.write_to_device(Command::UpMenuLevel);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::LifecycleMenu;
|
||||
},
|
||||
State::LifecycleMenu =>{
|
||||
self.usb_tty.write_to_device(Command::UpMenuLevel);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::BrightnessMenu;
|
||||
},
|
||||
State::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::Login);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::DebugMenu;
|
||||
return self;
|
||||
},
|
||||
};
|
||||
};
|
||||
return self;
|
||||
}
|
||||
|
||||
fn go_to_lifecycle_menu(&mut self) -> &mut Self{
|
||||
while !(self.current_state == State::LifecycleMenu){
|
||||
match self.current_state {
|
||||
|
@ -231,37 +283,81 @@ impl Device{
|
|||
},
|
||||
State::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::Login);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
loop {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
||||
Response::FailedDebugMenu | Response::ShellPrompt => break,
|
||||
_ => {
|
||||
log::error!("Unexpected response from device {}!",self.serial);
|
||||
log::debug!("lifecycle menu, catch-all, first loop, {}, {:?}",self.serial,self.usb_tty);
|
||||
log::error!("Unsure how to continue. Expect data from device {} to be erratic until next cycle.",self.serial);
|
||||
//break;
|
||||
},
|
||||
};
|
||||
};
|
||||
self.current_state = State::ShellPrompt;
|
||||
},
|
||||
State::ShellPrompt => {
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
loop {
|
||||
let read_in = self.usb_tty.read_from_device(None);
|
||||
match read_in {
|
||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||
Response::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
},
|
||||
Response::DebugMenu =>
|
||||
break,
|
||||
Response::FailedDebugMenu => {
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
},
|
||||
_ => {
|
||||
log::error!("Unexpected response from device {}! {:?}", self.serial, read_in);
|
||||
log::debug!("lifecycle menu, catch-all, second loop, {}, {:?}",self.serial,self.usb_tty);
|
||||
log::error!("Unsure how to continue. Expect data from device {} to be erratic until next cycle.",self.serial);
|
||||
//break;
|
||||
},
|
||||
};
|
||||
};
|
||||
self.current_state = State::DebugMenu;
|
||||
},
|
||||
State::Shutdown => {
|
||||
while self.usb_tty.read_from_device(None) != Response::LoginPrompt {}
|
||||
self.current_state = State::LoginPrompt;
|
||||
},
|
||||
};
|
||||
};
|
||||
return self;
|
||||
}
|
||||
|
||||
fn save_values(&mut self) -> bool{
|
||||
let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt";
|
||||
let temp = fs::OpenOptions::new().write(true).truncate(true).open(output_path);
|
||||
let temp = fs::OpenOptions::new().write(true).truncate(true).open(&output_path);
|
||||
match temp{
|
||||
Ok(opened_file) => self.output_file = Some(opened_file),
|
||||
Err(_) => {
|
||||
log::warn!("Could not open file to write! Potential permissions error.");
|
||||
log::warn!("Could not open file [{}] to write! Potential permissions error.",&output_path);
|
||||
return false
|
||||
}
|
||||
}
|
||||
log::trace!("{:?}",self.output_file);
|
||||
if let Some(ref mut file_name) = self.output_file{
|
||||
log::debug!("Writing to file!");
|
||||
let mut output_data = REBOOTS_SECTION.to_string();
|
||||
output_data.push_str(SECTION_SEPARATOR);
|
||||
output_data.push_str(&self.reboots.to_string());
|
||||
output_data.push_str("\n");
|
||||
output_data.push_str(BP_SECTION);
|
||||
output_data.push_str(SECTION_SEPARATOR);
|
||||
output_data.push_str(&self.bps.to_string());
|
||||
output_data.push_str("\n");
|
||||
output_data.push_str(TEMP_SECTION);
|
||||
output_data.push_str(&self.temps.to_string());
|
||||
output_data.push_str(SECTION_SEPARATOR);
|
||||
let saved_temps = (self.temps - self.init_temps) + self.temp_offset;
|
||||
output_data.push_str(&saved_temps.to_string());
|
||||
output_data.push_str("\n");
|
||||
log::debug!("final data to write to '{:?}': [{:?}]",file_name,output_data);
|
||||
let temp = file_name.write_all(output_data.as_bytes());
|
||||
match temp{
|
||||
Err(error) => {
|
||||
|
@ -275,15 +371,69 @@ impl Device{
|
|||
}
|
||||
return true
|
||||
}
|
||||
pub fn set_serial(&mut self, serial:&str) -> &mut Self{
|
||||
pub fn auto_set_serial(&mut self) -> bool{
|
||||
loop {
|
||||
match self.current_state {
|
||||
State::LoginPrompt => {
|
||||
self.usb_tty.write_to_device(Command::Login);
|
||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
||||
self.current_state = State::ShellPrompt;
|
||||
},
|
||||
State::Shutdown => {
|
||||
while self.usb_tty.read_from_device(None) != Response::LoginPrompt{};
|
||||
self.current_state = State::LoginPrompt;
|
||||
},
|
||||
State::DebugMenu | State::LifecycleMenu | State::BrightnessMenu => {
|
||||
self.usb_tty.write_to_device(Command::Quit);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
self.current_state = State::ShellPrompt;
|
||||
},
|
||||
State::ShellPrompt => {
|
||||
self.usb_tty.write_to_device(Command::GetSerial);
|
||||
loop{
|
||||
let return_value = self.usb_tty.read_from_device(None);
|
||||
match return_value{
|
||||
Response::Serial(Some(contains_serial)) =>{
|
||||
for line in contains_serial.split("\n").collect::<Vec<&str>>(){
|
||||
if !line.contains(':') { continue; }
|
||||
let (section,value) = line.split_once(':').unwrap();
|
||||
if section.contains(SERIAL_HEADER){
|
||||
self.serial = value.trim().replace("\"","");
|
||||
}
|
||||
}
|
||||
log::info!("Serial found for device {}",self.serial);
|
||||
break;
|
||||
},
|
||||
Response::DebugInit | Response::Empty | Response::EmptyNewline => { continue; }
|
||||
_ => {
|
||||
log::error!("Bad value: {:?}",return_value);
|
||||
return false
|
||||
},
|
||||
}
|
||||
}
|
||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||
while self.usb_tty.read_from_device(None) != Response::DebugMenu {}
|
||||
self.current_state = State::DebugMenu;
|
||||
self.load_values();
|
||||
self.save_values();
|
||||
return true
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn manual_set_serial(&mut self, serial:&str) -> &mut Self{
|
||||
self.serial = serial.to_string();
|
||||
self.load_values();
|
||||
self.save_values();
|
||||
return self;
|
||||
}
|
||||
pub fn get_serial(&mut self) -> &str{
|
||||
pub fn get_serial(&self) -> &str{
|
||||
&self.serial
|
||||
}
|
||||
pub fn get_location(&mut self) -> String{
|
||||
std::format!("{:?}",self.usb_tty)
|
||||
}
|
||||
pub fn set_pin_address(&mut self, address:u8) -> &mut Self{
|
||||
self.address = Some(address.clone());
|
||||
let temp = self.gpio.get(address);
|
||||
|
@ -308,7 +458,7 @@ impl Device{
|
|||
}
|
||||
return self;
|
||||
}
|
||||
pub fn start_bp(&mut self) -> &mut Self {
|
||||
fn start_bp(&mut self) -> &mut Self {
|
||||
self.go_to_lifecycle_menu();
|
||||
self.usb_tty.write_to_device(Command::StartBP);
|
||||
_ = self.usb_tty.read_from_device(None);
|
||||
|
@ -326,78 +476,151 @@ impl Device{
|
|||
_ = self.usb_tty.read_from_device(None);
|
||||
return self;
|
||||
}
|
||||
pub fn is_temp_running(&mut self) -> bool {
|
||||
|
||||
pub fn is_temp_running(&mut self) -> bool{
|
||||
self.go_to_lifecycle_menu();
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
loop {
|
||||
for _ in 0..10 {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempSuccess => return true,
|
||||
Response::TempFailed => return false,
|
||||
Response::TempCount(Some(count)) => return count != self.init_temps ,
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
for _ in 0..10{
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempCount(Some(count)) => return count != self.init_temps ,
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
log::error!("Temp read failed!!!");
|
||||
return false
|
||||
}
|
||||
pub fn is_bp_running(&mut self) -> bool {
|
||||
|
||||
pub fn update_temp_count(&mut self) -> u64 {
|
||||
self.go_to_lifecycle_menu();
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
for _ in 0..10 {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempCount(Some(count)) => {
|
||||
log::trace!("Count for device {} updated to {}",self.serial,count);
|
||||
self.temps = count;
|
||||
return count
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
for _ in 0..10{
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempCount(Some(count)) => {
|
||||
log::trace!("Count for device {} updated to {}",self.serial,count);
|
||||
self.temps = count;
|
||||
return count
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
log::error!("Update temp count on device {} failed!!!",self.serial);
|
||||
return 0;
|
||||
}
|
||||
|
||||
pub fn init_temp_count(&mut self){
|
||||
self.go_to_lifecycle_menu();
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
for _ in 0..10 {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempCount(Some(count)) => {
|
||||
log::trace!("init temp count set to {} on device {}",count,self.serial);
|
||||
self.init_temps = count;
|
||||
return
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
};
|
||||
self.usb_tty.write_to_device(Command::ReadTemp);
|
||||
for _ in 0..10{
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::TempCount(Some(count)) => {
|
||||
log::trace!("init temp count set to {} on device {}",count,self.serial);
|
||||
self.init_temps = count;
|
||||
return
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
};
|
||||
log::error!("init temp count failed on device {}!!!",self.serial);
|
||||
}
|
||||
|
||||
fn is_bp_running(&mut self) -> bool {
|
||||
self.go_to_lifecycle_menu();
|
||||
self.usb_tty.write_to_device(Command::CheckBPState);
|
||||
loop {
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::BPOn => return true,
|
||||
Response::BPOff => return false,
|
||||
Response::DebugMenuWithContinuedMessage =>{},
|
||||
_ => return false,
|
||||
}
|
||||
}
|
||||
}
|
||||
pub fn reboot(&mut self) -> () {
|
||||
self.go_to_login_prompt();
|
||||
self.usb_tty.write_to_device(Command::Quit);
|
||||
self.usb_tty.write_to_device(Command::Reboot);
|
||||
let mut successful_reboot:bool = false;
|
||||
//let mut exited_menu:bool = false;
|
||||
loop{
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::LoginPrompt => break,
|
||||
Response::Rebooting => {
|
||||
log::trace!("Successful reboot detected for device {}.",self.serial);
|
||||
successful_reboot = true;
|
||||
//This error message is turning out to be more false positive than anything
|
||||
//else. Reboots can sometimes dump both reboot flag and shutdown flag at once.
|
||||
//if !exited_menu { log::info!("Unusual reboot detected for device {}. Please check logs.",self.serial); }
|
||||
},
|
||||
Response::ShuttingDown => {
|
||||
log::trace!("Exiting debug menu on device {}.",self.serial);
|
||||
//exited_menu = true;
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
};
|
||||
if successful_reboot { self.reboots += 1; }
|
||||
self.current_state = State::LoginPrompt;
|
||||
}
|
||||
pub fn is_rebooted(&mut self) -> bool {
|
||||
if self.current_state == State::LoginPrompt{
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
self.go_to_login_prompt();
|
||||
self.reboots +=1;
|
||||
self.save_values();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
pub fn test_cycle(&mut self, bp_cycles: Option<u64>, temp_cycles: Option<u64>) -> () {
|
||||
|
||||
pub fn test_cycle(&mut self, bp_cycles: Option<u64>) -> () {
|
||||
let local_bp_cycles: u64 = bp_cycles.unwrap_or(3);
|
||||
let local_temp_cycles: u64 = temp_cycles.unwrap_or(2);
|
||||
self.go_to_login_prompt();
|
||||
thread::sleep(BOOT_TIME);
|
||||
if self.current_state != State::LoginPrompt { self.reboot(); }
|
||||
self.go_to_lifecycle_menu();
|
||||
_ = self.usb_tty.read_from_device(Some("["));
|
||||
self.update_temp_count();
|
||||
for _bp_count in 1..=local_bp_cycles{
|
||||
log::info!("Running bp {} on device {} ...",(self.bps+1),self.serial);
|
||||
self.start_bp();
|
||||
let bp_start = self.is_bp_running();
|
||||
log::trace!("{:?}",bp_start);
|
||||
thread::sleep(BP_RUN);
|
||||
let bp_start:bool = self.is_bp_running();
|
||||
log::trace!("Has bp started on device {}? : {:?}",self.serial,bp_start);
|
||||
|
||||
if bp_start{
|
||||
log::trace!("Starting temp on device {}",self.serial);
|
||||
self.start_temp();
|
||||
thread::sleep(TEMP_WAIT);
|
||||
log::trace!("Stopping temp on device {}",self.serial);
|
||||
self.stop_temp();
|
||||
};
|
||||
|
||||
while self.is_bp_running() {};
|
||||
|
||||
let bp_end = self.is_bp_running();
|
||||
log::trace!("{:?}",bp_end);
|
||||
log::trace!("Has bp ended on device {}? : {:?}",self.serial,bp_end);
|
||||
if bp_start != bp_end {
|
||||
self.bps +=1;
|
||||
log::debug!("Increasing bp count to {}",self.bps);
|
||||
self.save_values();
|
||||
}
|
||||
}
|
||||
for _temp_count in 1..=local_temp_cycles{
|
||||
log::info!("Running temp {} on device {} ...",(self.temps+1),self.serial);
|
||||
let temp_start = self.start_temp().is_temp_running();
|
||||
let temp_end = self.stop_temp().is_temp_running();
|
||||
if temp_start != temp_end {
|
||||
self.temps +=1;
|
||||
log::debug!("Increasing temp count to {}",self.temps);
|
||||
log::trace!("Increasing bp count for device {} to {}",self.serial,self.bps);
|
||||
self.save_values();
|
||||
}
|
||||
}
|
||||
log::info!("Rebooting {} for the {}th time",self.serial, self.reboots);
|
||||
self.reboot();
|
||||
self.reboots += 1;
|
||||
self.save_values();
|
||||
}
|
||||
}
|
||||
|
|
315
src/main.rs
315
src/main.rs
|
@ -1,8 +1,32 @@
|
|||
use seymour_poc_rust::{device::Device, tty::{self,TTY,Response},gpio_facade::GpioPins};
|
||||
use std::{io::{stdin,stdout,Write},thread::{self, JoinHandle},path::Path,fs};
|
||||
use seymour_life::{device::Device,
|
||||
tty::{self,TTY,Response},
|
||||
gpio_facade::GpioPins};
|
||||
use std::{io::{stdin,stdout,Write},
|
||||
thread::{self, JoinHandle},
|
||||
path::Path,
|
||||
fs};
|
||||
use chrono::{DateTime,Local};
|
||||
use clap::Parser;
|
||||
|
||||
const VERSION:&str="2.0.1";
|
||||
#[derive(Parser,Debug)]
|
||||
#[command(author,version,about)]
|
||||
struct Args{
|
||||
/// Print all logs to screen, improves log verbosity. Sets iteration count to 50000
|
||||
#[arg(short,long,action)]
|
||||
debug:bool,
|
||||
|
||||
/// Force manually setting serial numbers
|
||||
#[arg(short,long,action)]
|
||||
manual:bool,
|
||||
|
||||
/// Set iteration count from command line. Overrides debug iteration count.
|
||||
#[arg(short,long)]
|
||||
iterations:Option<u64>
|
||||
|
||||
}
|
||||
|
||||
const VERSION:&str="2.3.3";
|
||||
const DEBUG_ITERATION_COUNT:u64=50000;
|
||||
|
||||
fn int_input_filtering(prompt:Option<&str>) -> u64{
|
||||
let internal_prompt = prompt.unwrap_or(">>>");
|
||||
|
@ -34,113 +58,175 @@ fn input_filtering(prompt:Option<&str>) -> String{
|
|||
log::debug!("{}:{}",internal_prompt,user_input);
|
||||
return user_input;
|
||||
}
|
||||
|
||||
//Path::new(&&str).is_dir() -> bool
|
||||
fn main(){
|
||||
setup_logs();
|
||||
let args = Args::parse();
|
||||
setup_logs(&args.debug);
|
||||
log::info!("Seymour Life Testing version: {}",VERSION);
|
||||
let gpio = &mut GpioPins::new();
|
||||
match std::fs::read_dir("/dev/serial/by-path"){
|
||||
Ok(available_ttys)=>{
|
||||
let mut possible_devices:Vec<Option<Device>> = Vec::new();
|
||||
let mut tty_test_threads:Vec<JoinHandle<Option<Device>>> = Vec::new();
|
||||
for possible_tty in available_ttys.into_iter(){
|
||||
tty_test_threads.push(
|
||||
thread::spawn(move ||{
|
||||
let tty_ref = possible_tty.as_ref();
|
||||
match tty_ref{
|
||||
Ok(tty_real_ref)=>{
|
||||
let tty_path = tty_real_ref.path();
|
||||
let tty_name = tty_path.to_string_lossy();
|
||||
log::info!("Testing port {}. This may take a moment...",&tty_name);
|
||||
let possible_port = TTY::new(&tty_name);
|
||||
match possible_port{
|
||||
Some(mut port) =>{
|
||||
port.write_to_device(tty::Command::Newline);
|
||||
let response = port.read_from_device(Some(":"));
|
||||
if response != Response::Empty{
|
||||
log::debug!("{} is valid port!",tty_name);
|
||||
let new_device = Device::new(port,Some(response));
|
||||
match new_device{
|
||||
Ok(device) => Some(device),
|
||||
Err(_) => None
|
||||
}
|
||||
}
|
||||
else { None }
|
||||
},
|
||||
None=>{None}
|
||||
}
|
||||
},
|
||||
Err(error)=>{
|
||||
//log::warn!("Invalid TTY location");
|
||||
log::debug!("{}",error);
|
||||
None
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
for thread in tty_test_threads{
|
||||
let output = thread.join().unwrap_or_else(|x|{log::trace!("{:?}",x); None});
|
||||
possible_devices.push(output);
|
||||
}
|
||||
|
||||
let mut devices:Vec<Device> = Vec::new();
|
||||
for possible_device in possible_devices.into_iter(){
|
||||
if let Some(device) = possible_device{
|
||||
devices.push(device);
|
||||
}
|
||||
}
|
||||
|
||||
log::info!("Number of devices detected: {}",devices.len());
|
||||
|
||||
log::info!("Dimming all screens...");
|
||||
for device in devices.iter_mut(){
|
||||
device.darken_screen();
|
||||
}
|
||||
|
||||
for device in devices.iter_mut(){
|
||||
device.brighten_screen()
|
||||
.set_serial(&input_filtering(Some("Enter the serial of the device with the bright screen: ")).to_string())
|
||||
.darken_screen();
|
||||
log::debug!("Number of unassigned addresses: {}",gpio.get_unassigned_addresses().len());
|
||||
for &address in gpio.get_unassigned_addresses(){
|
||||
device.set_pin_address(address).start_temp();
|
||||
if device.is_temp_running(){
|
||||
device.stop_temp();
|
||||
gpio.remove_address(address);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
device.stop_temp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mut iteration_count:u64 = 0;
|
||||
log::trace!("Debug enabled!");
|
||||
loop{
|
||||
let mut iteration_count:u64 = 0;
|
||||
if let Some(value) = args.iterations{
|
||||
iteration_count = value;
|
||||
}
|
||||
else if args.debug {
|
||||
iteration_count = DEBUG_ITERATION_COUNT;
|
||||
}
|
||||
else {
|
||||
while iteration_count < 1{
|
||||
iteration_count = int_input_filtering(Some("Enter the number of iterations to complete: "));
|
||||
}
|
||||
}
|
||||
|
||||
let mut iteration_threads = Vec::new();
|
||||
while let Some(mut device) = devices.pop(){
|
||||
iteration_threads.push(thread::spawn(move||{
|
||||
for i in 1..=iteration_count{
|
||||
log::info!("Starting iteration {} of {} for device {}...",
|
||||
i,iteration_count,device.get_serial());
|
||||
device.test_cycle(None, None);
|
||||
log::info!("Testing all available USB ports for connected devices. This may take several minutes, and devices may reboot several times.");
|
||||
let gpio = &mut GpioPins::new();
|
||||
let mut available_ttys:Vec<Box<Path>> = Vec::new();
|
||||
for entry in glob::glob("/dev/serial/*").expect("Failed to read glob pattern"){
|
||||
match entry{
|
||||
Ok(real_path) =>{
|
||||
match fs::read_dir::<&Path>(real_path.as_ref()){
|
||||
Ok(possible_ttys) =>{
|
||||
possible_ttys.into_iter().for_each(|tty| {
|
||||
if let Ok(single_tty) = tty {
|
||||
available_ttys.push(single_tty.path().into());
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
Err(error) =>{
|
||||
log::error!("Invalid permissions to /dev directory... did you run with sudo?");
|
||||
log::error!("{}",error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
for thread in iteration_threads{
|
||||
thread.join().unwrap();
|
||||
}
|
||||
Err(error) =>{
|
||||
log::error!("{}",error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(_)=>{
|
||||
log::error!("Invalid serial location! Please make sure that /dev/serial/by-path exists.");
|
||||
if available_ttys.is_empty(){
|
||||
for entry in glob::glob("/dev/ttyUSB*").expect("Unable to read glob"){
|
||||
match entry{
|
||||
Ok(possible_tty) => available_ttys.push(Path::new(&possible_tty).into()),
|
||||
Err(error) => {
|
||||
log::error!("Invalid permissions to /dev directory... did you run with sudo?");
|
||||
log::error!("{}",error);
|
||||
return;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if available_ttys.is_empty(){
|
||||
log::error!("No serial devices detected! Please ensure all connections.");
|
||||
return;
|
||||
}
|
||||
let mut possible_devices:Vec<Option<Device>> = Vec::new();
|
||||
let mut tty_test_threads:Vec<JoinHandle<Option<Device>>> = Vec::new();
|
||||
for possible_tty in available_ttys.into_iter(){
|
||||
tty_test_threads.push(
|
||||
thread::spawn(move ||{
|
||||
let tty_name = possible_tty.to_string_lossy();
|
||||
log::debug!("Testing port {}",&tty_name);
|
||||
let possible_port = TTY::new(&tty_name);
|
||||
match possible_port{
|
||||
Some(mut port) =>{
|
||||
port.write_to_device(tty::Command::Newline);
|
||||
let response = port.read_from_device(Some(":"));
|
||||
if response != Response::Empty{
|
||||
log::debug!("{} is valid port!",tty_name);
|
||||
let new_device = Device::new(port,Some(response));
|
||||
match new_device{
|
||||
Ok(mut device) => {
|
||||
device.darken_screen();
|
||||
if !args.manual {
|
||||
device.auto_set_serial();
|
||||
}
|
||||
Some(device)
|
||||
},
|
||||
Err(_) => None
|
||||
}
|
||||
}
|
||||
else { None }
|
||||
},
|
||||
None=>{None}
|
||||
}
|
||||
}));
|
||||
}
|
||||
for thread in tty_test_threads{
|
||||
let output = thread.join().unwrap_or_else(|x|{log::trace!("{:?}",x); None});
|
||||
possible_devices.push(output);
|
||||
}
|
||||
|
||||
let mut serials_set:bool = true;
|
||||
let mut devices:Vec<Device> = Vec::new();
|
||||
for possible_device in possible_devices.into_iter(){
|
||||
if let Some(device) = possible_device{
|
||||
if device.get_serial().eq("uninitialised"){
|
||||
serials_set = false;
|
||||
}
|
||||
devices.push(device);
|
||||
}
|
||||
}
|
||||
|
||||
log::info!("--------------------------------------");
|
||||
log::info!("Number of devices detected: {}",devices.len());
|
||||
log::info!("--------------------------------------\n\n");
|
||||
|
||||
log::info!("Setting up probe wells for all devices. This may take several minutes...");
|
||||
for device in devices.iter_mut(){
|
||||
if !serials_set || args.manual {
|
||||
device.brighten_screen();
|
||||
device.manual_set_serial(&input_filtering(Some("Enter the serial of the device with the bright screen: ")).to_string());
|
||||
device.darken_screen();
|
||||
}
|
||||
log::info!("Checking probe well of device {}",device.get_serial());
|
||||
log::debug!("Number of unassigned addresses: {}",gpio.get_unassigned_addresses().len());
|
||||
if !find_gpio(device, gpio){
|
||||
device.set_pin_address(21);
|
||||
log::error!("Unable to find probe-well for device {}. Please ensure that the probe well is installed properly, and the calibration key is plugged in.",device.get_serial());
|
||||
device.brighten_screen();
|
||||
panic!();
|
||||
}
|
||||
}
|
||||
|
||||
let mut iteration_threads = Vec::new();
|
||||
while let Some(mut device) = devices.pop(){
|
||||
iteration_threads.push(thread::spawn(move||{
|
||||
device.init_temp_count();
|
||||
for i in 1..=iteration_count{
|
||||
log::info!("Starting iteration {} of {} for device {}...",
|
||||
i,iteration_count,device.get_serial());
|
||||
device.test_cycle(None);
|
||||
}
|
||||
}));
|
||||
}
|
||||
for thread in iteration_threads{
|
||||
thread.join().unwrap();
|
||||
}
|
||||
if input_filtering(Some("Would you like to run the tests again? (y/N): ")).to_string().contains("y") {}
|
||||
else { break; }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn setup_logs(){
|
||||
fn find_gpio(device:&mut Device,gpio:&mut GpioPins) -> bool{
|
||||
device.init_temp_count();
|
||||
for &address in gpio.get_unassigned_addresses(){
|
||||
device.set_pin_address(address).start_temp();
|
||||
if device.is_temp_running(){
|
||||
device.stop_temp();
|
||||
gpio.remove_address(address);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
device.stop_temp();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
pub fn setup_logs(debug:&bool){
|
||||
let chrono_now: DateTime<Local> = Local::now();
|
||||
if ! Path::new("logs").is_dir(){
|
||||
_ = fs::create_dir("logs");
|
||||
|
@ -155,18 +241,27 @@ pub fn setup_logs(){
|
|||
message
|
||||
))
|
||||
})
|
||||
.chain(
|
||||
fern::Dispatch::new()
|
||||
.level(log::LevelFilter::Trace)
|
||||
.chain(fern::log_file(
|
||||
format!("logs/{0}.log",
|
||||
chrono_now.format("%Y-%m-%d_%H.%M").to_string()
|
||||
)).unwrap()),
|
||||
)
|
||||
.chain(
|
||||
fern::Dispatch::new()
|
||||
.level(log::LevelFilter::Info)
|
||||
.chain(std::io::stdout())
|
||||
)
|
||||
.chain({
|
||||
let mut file_logger = fern::Dispatch::new();
|
||||
let date_format = chrono_now.format("%Y-%m-%d_%H.%M").to_string();
|
||||
let local_log_file = fern::log_file(format!("logs/{}.log",date_format)).unwrap();
|
||||
if *debug{
|
||||
file_logger = file_logger.level(log::LevelFilter::Trace);
|
||||
}
|
||||
else {
|
||||
file_logger = file_logger.level(log::LevelFilter::Debug);
|
||||
}
|
||||
file_logger.chain(local_log_file)
|
||||
})
|
||||
.chain({
|
||||
let mut stdout_logger = fern::Dispatch::new();
|
||||
if *debug {
|
||||
stdout_logger = stdout_logger.level(log::LevelFilter::Trace);
|
||||
}
|
||||
else {
|
||||
stdout_logger = stdout_logger.level(log::LevelFilter::Info);
|
||||
}
|
||||
stdout_logger.chain(std::io::stdout())
|
||||
})
|
||||
.apply();
|
||||
}
|
||||
|
|
153
src/tty.rs
153
src/tty.rs
|
@ -1,10 +1,13 @@
|
|||
use std::{collections::HashMap, io::{BufReader, Write, Read}, time::Duration};
|
||||
use std::{collections::HashMap,
|
||||
io::{BufReader, Write, Read},
|
||||
boxed::Box,
|
||||
time::Duration};
|
||||
use once_cell::sync::Lazy;
|
||||
use serialport::SerialPort;
|
||||
use derivative::Derivative;
|
||||
|
||||
const BAUD_RATE:u32 = 115200;
|
||||
const SERIAL_READ_TIMEOUT: std::time::Duration = Duration::from_millis(500);
|
||||
const SERIAL_TIMEOUT: std::time::Duration = Duration::from_millis(500);
|
||||
|
||||
|
||||
#[derive(Eq,Derivative,Debug)]
|
||||
|
@ -23,23 +26,31 @@ pub enum Command{
|
|||
Login,
|
||||
DebugMenu,
|
||||
Newline,
|
||||
Reboot,
|
||||
GetSerial,
|
||||
Boot,
|
||||
}
|
||||
|
||||
#[derive(Clone,Eq,Derivative,Debug)]
|
||||
#[derivative(Copy,PartialEq, Hash)]
|
||||
#[derivative(PartialEq, Hash)]
|
||||
pub enum Response{
|
||||
PasswordPrompt,
|
||||
ShellPrompt,
|
||||
BPOn,
|
||||
BPOff,
|
||||
TempFailed,
|
||||
TempSuccess,
|
||||
TempCount(Option<u64>),
|
||||
LoginPrompt,
|
||||
DebugMenuReady,
|
||||
DebugMenuWithContinuedMessage,
|
||||
DebugMenu,
|
||||
Rebooting,
|
||||
Other,
|
||||
Empty,
|
||||
ShuttingDown,
|
||||
FailedDebugMenu,
|
||||
PreShellPrompt,
|
||||
EmptyNewline,
|
||||
DebugInit,
|
||||
Serial(Option<String>),
|
||||
UBoot,
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,57 +62,84 @@ const COMMAND_MAP:Lazy<HashMap<Command,&str>> = Lazy::new(||HashMap::from([
|
|||
(Command::BrightnessMenu, "B"),
|
||||
(Command::BrightnessHigh, "0"),
|
||||
(Command::BrightnessLow, "1"),
|
||||
(Command::ReadTemp, "h"),
|
||||
(Command::ReadTemp, "H"),
|
||||
(Command::UpMenuLevel, "\\"),
|
||||
(Command::Login,"root\n"),
|
||||
(Command::RedrawMenu,"?"),
|
||||
(Command::DebugMenu," python3 -m debugmenu; shutdown -r now\n"),
|
||||
(Command::DebugMenu,"python3 -m debugmenu\n"),
|
||||
(Command::Newline,"\n"),
|
||||
(Command::Reboot,"shutdown -r now\n"),
|
||||
(Command::Boot,"boot\n"),
|
||||
(Command::GetSerial,"echo 'y1q' | python3 -m debugmenu\n"),
|
||||
]));
|
||||
|
||||
const RESPONSES:[(&str,Response);10] = [
|
||||
const COMMAND_RESPONSES: [&str;3] = [
|
||||
"python3 -m debugmenu",
|
||||
"q",
|
||||
"root",
|
||||
];
|
||||
|
||||
const RESPONSES:[(&str,Response);14] = [
|
||||
("uboot=>",Response::UBoot),
|
||||
("Last login:",Response::PreShellPrompt),
|
||||
("reboot: Restarting",Response::Rebooting),
|
||||
("command not found",Response::FailedDebugMenu),
|
||||
("login:",Response::LoginPrompt),
|
||||
("Password:",Response::PasswordPrompt),
|
||||
("root@",Response::ShellPrompt),
|
||||
("DtCtrlCfgDeviceSerialNum",Response::Serial(None)),
|
||||
("Check NIBP In Progress: True",Response::BPOn),
|
||||
("Check NIBP In Progress: False",Response::BPOff),
|
||||
("Temp: 0",Response::TempFailed),
|
||||
("Temp:",Response::TempSuccess),
|
||||
("> ",Response::DebugMenuWithContinuedMessage),
|
||||
(">",Response::DebugMenuReady),
|
||||
("[",Response::Rebooting),
|
||||
("SureTemp Probe Pulls:",Response::TempCount(None)),
|
||||
(">",Response::DebugMenu),
|
||||
("Loading App-Framework",Response::DebugInit),
|
||||
("root@",Response::ShellPrompt),
|
||||
("EXIT Debug menu",Response::ShuttingDown),
|
||||
];
|
||||
|
||||
pub struct TTY{
|
||||
tty: Box<dyn SerialPort>,
|
||||
failed_read_count: u8
|
||||
last: Command,
|
||||
}
|
||||
impl std::fmt::Debug for TTY{
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result{
|
||||
let absolute_location = self.tty.name();
|
||||
let relative_location:String;
|
||||
match absolute_location{
|
||||
Some(abs_location_string) => {
|
||||
let sectioned_abs_location = abs_location_string.rsplit_once('/');
|
||||
match sectioned_abs_location{
|
||||
Some((_,serial_device_name)) => relative_location = serial_device_name.to_string(),
|
||||
None => relative_location = "unknown".to_string()
|
||||
}
|
||||
},
|
||||
None => relative_location = "unknown".to_string()
|
||||
};
|
||||
f.debug_struct("TTY")
|
||||
.field("Serial port name",&self.tty.name().unwrap_or("Unknown".to_string()))
|
||||
.field("Serial port name",&relative_location)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl TTY{
|
||||
pub fn new(serial_location:&str) -> Option<Self>{
|
||||
let possible_tty = serialport::new(serial_location,BAUD_RATE).timeout(SERIAL_READ_TIMEOUT).open();
|
||||
let possible_tty = serialport::new(serial_location,BAUD_RATE).timeout(SERIAL_TIMEOUT).open();
|
||||
if let Ok(tty) = possible_tty{
|
||||
Some(TTY {
|
||||
tty,
|
||||
failed_read_count: 0
|
||||
})
|
||||
Some(TTY{tty,last:Command::Quit})
|
||||
} else{
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn write_to_device(&mut self,command:Command) -> bool {
|
||||
log::debug!("writing {:?} to tty {}...", command, self.tty.name().unwrap_or("unknown".to_string()));
|
||||
if command == self.last{
|
||||
log::trace!("retry send {}",self.tty.name().unwrap_or("unknown".to_string()));
|
||||
}else{
|
||||
log::debug!("writing {:?} to tty {}...", command, self.tty.name().unwrap_or("unknown".to_string()));
|
||||
};
|
||||
let output = self.tty.write_all(COMMAND_MAP.get(&command).unwrap().as_bytes()).is_ok();
|
||||
self.last = command;
|
||||
_ = self.tty.flush();
|
||||
std::thread::sleep(std::time::Duration::from_millis(500));
|
||||
std::thread::sleep(SERIAL_TIMEOUT);
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -111,27 +149,64 @@ impl TTY{
|
|||
_ = reader.read_to_end(&mut read_buffer);
|
||||
if read_buffer.len() > 0 {
|
||||
let read_line:String = String::from_utf8_lossy(read_buffer.as_slice()).to_string();
|
||||
if read_line.eq("\r\n") {
|
||||
return Response::EmptyNewline;
|
||||
}
|
||||
for command in COMMAND_RESPONSES{
|
||||
if read_line.trim().eq(command.trim()){
|
||||
return self.read_from_device(None);
|
||||
}
|
||||
};
|
||||
for (string,enum_value) in RESPONSES{
|
||||
if read_line.contains(string){
|
||||
log::debug!("Successful read of {:?} from tty {}, which matches pattern {:?}",read_line,self.tty.name().unwrap_or("unknown shell".to_string()),enum_value);
|
||||
self.failed_read_count = 0;
|
||||
return enum_value;
|
||||
if(enum_value == Response::BPOn) || (enum_value == Response::BPOff) {
|
||||
//Don't log BPOn or BPOff, we're gonna see a LOT of those and we don't want
|
||||
//to overfill the SD card
|
||||
}
|
||||
else{
|
||||
log::trace!("Successful read of {:?} from tty {}, which matches pattern {:?}",read_line,self.tty.name().unwrap_or("unknown shell".to_string()),enum_value);
|
||||
};
|
||||
if enum_value == Response::TempCount(None){
|
||||
let mut lines = read_line.lines();
|
||||
while let Some(single_line) = lines.next(){
|
||||
if single_line.contains(string){
|
||||
let trimmed_line = single_line.trim();
|
||||
match trimmed_line.rsplit_once(' '){
|
||||
None => return enum_value,
|
||||
Some((_header,temp_count)) => {
|
||||
match temp_count.trim().parse::<u64>(){
|
||||
Err(_) => {
|
||||
log::error!("String {} from device {} unable to be parsed!",temp_count,self.tty.name().unwrap_or("unknown shell".to_string()));
|
||||
return Response::TempCount(None)
|
||||
},
|
||||
Ok(parsed_temp_count) => {
|
||||
log::trace!("parsed temp count for device {}: {}",self.tty.name().unwrap_or("unknown shell".to_string()),temp_count);
|
||||
return Response::TempCount(Some(parsed_temp_count))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if enum_value == Response::Serial(None) {
|
||||
return Response::Serial(Some(read_line));
|
||||
}
|
||||
else if enum_value == Response::PasswordPrompt {
|
||||
log::error!("Recieved password prompt on device {}! Something fell apart here. Check preceeding log lines.",self.tty.name().unwrap_or("unknown shell".to_string()));
|
||||
self.write_to_device(Command::Newline);
|
||||
_ = self.read_from_device(None);
|
||||
}
|
||||
else{
|
||||
return enum_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
log::trace!("Unable to determine response. Response string is: [{:?}]",read_line);
|
||||
return Response::Other;
|
||||
}
|
||||
else {
|
||||
log::debug!("Read an empty string. Possible read error.");
|
||||
//Due to a linux kernel power-saving setting that is overly complicated to fix,
|
||||
//Serial connections will drop for a moment before re-opening, at seemingly-random
|
||||
//intervals. The below is an attempt to catch and recover from this behaviour.
|
||||
self.failed_read_count += 1;
|
||||
if self.failed_read_count >= 15{
|
||||
self.failed_read_count = 0;
|
||||
let tty_location = self.tty.name().expect("Unable to read tty name!");
|
||||
self.tty = serialport::new(tty_location,BAUD_RATE).timeout(SERIAL_READ_TIMEOUT).open().expect("Unable to open serial connection!");
|
||||
return self.read_from_device(_break_char);
|
||||
}
|
||||
log::trace!("Read an empty string from device {:?}. Possible read error.", self);
|
||||
return Response::Empty;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue