From 980a8432e625d61bf203b6af0079391bfba55be2 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 9 Jun 2023 10:46:00 -0400 Subject: [PATCH 01/31] Resolve init file write error Was originally trying to create a text file in the /dev path, which is not possible. Have now used string parsing to resolve this issue. --- Cargo.lock | 2 +- src/tty.rs | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d120f61..475c9f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "seymour_poc_rust" -version = "2.0.1" +version = "2.1.0" dependencies = [ "chrono", "clap", diff --git a/src/tty.rs b/src/tty.rs index 1dba3d3..f28a0c7 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -78,8 +78,20 @@ pub struct TTY{ } 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() } } From 3cc2f05b82f0605e3e33d196e12bccba5865e515 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 9 Jun 2023 10:52:14 -0400 Subject: [PATCH 02/31] Fix weird spacing issue in init script --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c3908bc..4113979 100755 --- a/src/main.rs +++ b/src/main.rs @@ -110,7 +110,7 @@ fn main(){ } } - log::info!("\n\n--------------------------------------"); + log::info!("--------------------------------------"); log::info!("Number of devices detected: {}",devices.len()); log::info!("--------------------------------------\n\n"); From a235a84dad4515644c8c957c212d1bd2ed568f39 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 9 Jun 2023 10:54:08 -0400 Subject: [PATCH 03/31] Add init logging in debug mode Added log call for init of devices. The whole point of debug mode is to get more info, so not saying what you're doing isn't super helpful. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 4113979..a14d367 100755 --- a/src/main.rs +++ b/src/main.rs @@ -118,6 +118,7 @@ fn main(){ device.brighten_screen(); if args.debug{ let location = device.get_location(); + log::info!("Init device {}...", location); device.set_serial(&location); } else{ From 37accb8a0fc2884e08b4844f0b0249f9aacb3311 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 9 Jun 2023 11:04:20 -0400 Subject: [PATCH 04/31] Version bump --- Cargo.toml | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3d19cf..2d938e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "seymour_poc_rust" -version = "2.1.0" +version = "2.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index a14d367..76263ca 100755 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ struct Args{ debug:bool } -const VERSION:&str="2.1.0"; +const VERSION:&str="2.1.1"; fn int_input_filtering(prompt:Option<&str>) -> u64{ let internal_prompt = prompt.unwrap_or(">>>"); From 42944f2d3c7badc67a3594d4b2a77fa85b8e605c Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 9 Jun 2023 11:07:38 -0400 Subject: [PATCH 05/31] set debug iteration count Debug mode now requires no user input whatsoever --- Cargo.lock | 2 +- src/main.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 475c9f5..a445c89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "seymour_poc_rust" -version = "2.1.0" +version = "2.1.1" dependencies = [ "chrono", "clap", diff --git a/src/main.rs b/src/main.rs index 76263ca..bdb2950 100755 --- a/src/main.rs +++ b/src/main.rs @@ -133,8 +133,13 @@ fn main(){ } let mut iteration_count:u64 = 0; - while iteration_count < 1{ - iteration_count = int_input_filtering(Some("Enter the number of iterations to complete: ")); + if args.debug { + iteration_count = 10000; + } + else { + while iteration_count < 1{ + iteration_count = int_input_filtering(Some("Enter the number of iterations to complete: ")); + } } let mut iteration_threads = Vec::new(); From 40c33a8d799f0f924189d1179c42dcb7f3343a92 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 08:42:36 -0400 Subject: [PATCH 06/31] Increase logging verbosity --- src/device.rs | 12 ++++++------ src/tty.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/device.rs b/src/device.rs index a6f4e31..92462da 100755 --- a/src/device.rs +++ b/src/device.rs @@ -246,11 +246,11 @@ impl Device{ 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); + log::trace!("Writing to file: {:?}",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(); @@ -378,13 +378,13 @@ impl Device{ 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); + log::trace!("Has bp started on device {}? : {:?}",self.serial,bp_start); thread::sleep(BP_RUN); 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); + log::debug!("Increasing bp count for device {} to {}",self.serial,self.bps); self.save_values(); } } @@ -394,7 +394,7 @@ impl Device{ 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::debug!("Increasing temp count for device {} to {}",self.serial,self.temps); self.save_values(); } } diff --git a/src/tty.rs b/src/tty.rs index f28a0c7..3281325 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -133,7 +133,7 @@ impl TTY{ return Response::Other; } else { - log::debug!("Read an empty string. Possible read error."); + log::debug!("Read an empty string from device {:?}. Possible read error.", self); //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. From b0dad705bce9387a367db734de522f433c7dfe38 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 08:45:47 -0400 Subject: [PATCH 07/31] Fix borrow issue --- src/device.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device.rs b/src/device.rs index 92462da..af38512 100755 --- a/src/device.rs +++ b/src/device.rs @@ -39,7 +39,7 @@ impl Device{ log::debug!("{:?}",&self.serial); let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt"; if ! Path::new(&output_path).exists(){ - log::debug!("Creating file {}",output_path); + log::debug!("Creating file {}",&output_path); let temp = fs::File::create(&output_path); match temp{ Ok(file) => { @@ -242,11 +242,11 @@ impl Device{ } 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.",output_path); + log::warn!("Could not open file [{}] to write! Potential permissions error.",&output_path); return false } } From b351228df417230888a356686192d50f00d78951 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 12:58:23 -0400 Subject: [PATCH 08/31] Reduce boot time and bp time --- src/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.rs b/src/device.rs index af38512..523bd6d 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,8 +2,8 @@ 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 BOOT_TIME:Duration = Duration::new(40, 0); +const BP_RUN:Duration = Duration::new(55, 0); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; From 6f1ac516300cf17eba614c4a6e5c136024d2a2ea Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 13:31:09 -0400 Subject: [PATCH 09/31] Attempt to fix "drop" Remove infinite loop from is_temp_running, add logging --- src/device.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/device.rs b/src/device.rs index 523bd6d..a09ddce 100755 --- a/src/device.rs +++ b/src/device.rs @@ -332,13 +332,23 @@ impl Device{ 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, _ => {}, } } + self.usb_tty.write_to_device(Command::ReadTemp); + for _ in 0..10{ + match self.usb_tty.read_from_device(None){ + Response::TempSuccess => return true, + Response::TempFailed => return false, + _ => {}, + } + } + log::error!("Temp read failed!!!"); + return false; } pub fn is_bp_running(&mut self) -> bool { self.go_to_lifecycle_menu(); From 7cf87ee58a2024c195a1d383efbdaf3d5b9be2b8 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 15:02:51 -0400 Subject: [PATCH 10/31] Add notes for rebooting status Turns out, long shutdown-before-reboot is why things get desynced after a while. There's a random thread that can wait up to 10s before dying, and that's what causes the "drops", which are actually more akin to "desync"s. --- notes.md | 6 ++++++ src/device.rs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..da1f519 --- /dev/null +++ b/notes.md @@ -0,0 +1,6 @@ +Boot time isn't static. +Boot time can (in theory) be sped up by forcing a clearing of the screen of all vitals before rebooting. +Clearing the screen of all vitals is theoretically possible in the UI menu, with a Spoof Touch, but I don't know the object name of the 'clear' button. + +Can check for reboot completed by reading in serial, check for `reboot: Restarting System` +once done, read for `login:` diff --git a/src/device.rs b/src/device.rs index a09ddce..256b6b5 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,8 +2,8 @@ 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(40, 0); -const BP_RUN:Duration = Duration::new(55, 0); +const BOOT_TIME:Duration = Duration::new(50, 0); +const BP_RUN:Duration = Duration::new(60, 0); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; From c38b476f9f432952a39d68c3dd030a15056e8213 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 12 Jun 2023 16:06:23 -0400 Subject: [PATCH 11/31] Start dealing with reboot --- src/device.rs | 39 ++++++++++++++++++++------------------- src/tty.rs | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/device.rs b/src/device.rs index 256b6b5..c5deb03 100755 --- a/src/device.rs +++ b/src/device.rs @@ -11,6 +11,7 @@ const OUTPUT_FOLDER: &str = "output/"; const UNINITIALISED_SERIAL: &str = "uninitialised"; #[derive(PartialEq,Debug)] pub enum State{ + Shutdown, LoginPrompt, DebugMenu, LifecycleMenu, @@ -144,22 +145,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 { @@ -182,6 +167,10 @@ impl Device{ _ = self.usb_tty.read_from_device(None); self.current_state = State::DebugMenu; }, + State::Shutdown => { + while self.usb_tty.read_from_device(None) != Response::Rebooting {} + self.current_state = State::LoginPrompt; + }, }; }; return self; @@ -209,6 +198,10 @@ impl Device{ self.current_state = State::DebugMenu; return self; }, + State::Shutdown => { + while self.usb_tty.read_from_device(None) != Response::Rebooting {} + self.current_state = State::LoginPrompt; + }, }; }; return self; @@ -236,6 +229,10 @@ impl Device{ _ = self.usb_tty.read_from_device(None); self.current_state = State::DebugMenu; }, + State::Shutdown => { + while self.usb_tty.read_from_device(None) != Response::Rebooting {} + self.current_state = State::LoginPrompt; + }, }; }; return self; @@ -363,7 +360,11 @@ impl Device{ } } pub fn reboot(&mut self) -> () { - self.go_to_login_prompt(); + //self.go_to_login_prompt(); + self.usb_tty.write_to_device(Command::Quit); + while self.usb_tty.read_from_device(None) != Response::Rebooting {} + self.current_state = State::Shutdown; + while self.usb_tty.read_from_device(None) != Response::LoginPrompt {} self.current_state = State::LoginPrompt; } pub fn is_rebooted(&mut self) -> bool { @@ -371,7 +372,7 @@ impl Device{ return true; } else{ - self.go_to_login_prompt(); + self.reboot(); self.reboots +=1; self.save_values(); return true; @@ -380,7 +381,7 @@ impl Device{ pub fn test_cycle(&mut self, bp_cycles: Option, temp_cycles: Option) -> () { 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(); + if self.current_state != State::LoginPrompt { self.reboot(); } thread::sleep(BOOT_TIME); self.go_to_lifecycle_menu(); _ = self.usb_tty.read_from_device(Some("[")); diff --git a/src/tty.rs b/src/tty.rs index 3281325..75a1a29 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -60,6 +60,7 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ ])); const RESPONSES:[(&str,Response);10] = [ + ("reboot: Restarting",Response::Rebooting), ("login:",Response::LoginPrompt), ("Password:",Response::PasswordPrompt), ("root@",Response::ShellPrompt), @@ -69,7 +70,6 @@ const RESPONSES:[(&str,Response);10] = [ ("Temp:",Response::TempSuccess), ("> ",Response::DebugMenuWithContinuedMessage), (">",Response::DebugMenuReady), - ("[",Response::Rebooting), ]; pub struct TTY{ From 58456421010e1f64928085b7c8e2648bc115f2bf Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Tue, 13 Jun 2023 08:30:40 -0400 Subject: [PATCH 12/31] Version bump --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a445c89..5612343 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "seymour_poc_rust" -version = "2.1.1" +version = "2.2.0" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 2d938e4..f1ede23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "seymour_poc_rust" -version = "2.1.1" +version = "2.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index bdb2950..285e680 100755 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ struct Args{ debug:bool } -const VERSION:&str="2.1.1"; +const VERSION:&str="2.2.0"; fn int_input_filtering(prompt:Option<&str>) -> u64{ let internal_prompt = prompt.unwrap_or(">>>"); From c1757ce1697682090aee637751ec34d63165489d Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Tue, 13 Jun 2023 09:26:25 -0400 Subject: [PATCH 13/31] Continue reconfiguring for new cycle structure --- src/device.rs | 68 +++++++++++++++++++++++++++++++-------------------- src/main.rs | 19 ++++++++------ src/tty.rs | 18 +++++++++----- 3 files changed, 66 insertions(+), 39 deletions(-) diff --git a/src/device.rs b/src/device.rs index c5deb03..827963c 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,8 +2,10 @@ 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(50, 0); -const BP_RUN:Duration = Duration::new(60, 0); +//const BOOT_TIME:Duration = Duration::new(50, 0); +const BP_RUN_1:Duration = Duration::new(29, 0); +const TEMP_WAIT:Duration = Duration::new(3,0); +const BP_RUN_2:Duration = Duration::new(28, 0); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; @@ -29,6 +31,7 @@ pub struct Device{ current_state: State, reboots: u64, temps: u64, + init_temps: u64, bps: u64 } @@ -108,8 +111,7 @@ impl Device{ Response::Other | Response::Empty | Response::ShellPrompt | Response::LoginPrompt | Response::Rebooting => initial_state = State::LoginPrompt, - Response::BPOn | Response::BPOff | Response::TempFailed - | Response::TempSuccess => + Response::BPOn | Response::BPOff | Response::TempCount(_) => initial_state = State::LifecycleMenu, Response::DebugMenuReady | Response::DebugMenuWithContinuedMessage=> initial_state = State::DebugMenu, @@ -130,6 +132,7 @@ impl Device{ current_state: initial_state, reboots: 0, temps: 0, + init_temps: 0, bps: 0 }; if !output.load_values(){ @@ -257,7 +260,8 @@ impl Device{ 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()); + let saved_temps = self.temps - self.init_temps; + output_data.push_str(&saved_temps.to_string()); output_data.push_str("\n"); let temp = file_name.write_all(output_data.as_bytes()); match temp{ @@ -326,27 +330,46 @@ impl Device{ _ = self.usb_tty.read_from_device(None); return self; } - pub fn is_temp_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::TempSuccess => return true, - Response::TempFailed => return false, + Response::TempCount(count) => return count, _ => {}, } } self.usb_tty.write_to_device(Command::ReadTemp); for _ in 0..10{ match self.usb_tty.read_from_device(None){ - Response::TempSuccess => return true, - Response::TempFailed => return false, + Response::TempCount(count) => return count, _ => {}, } } log::error!("Temp read failed!!!"); - return false; + 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(count) => self.init_temps = count , + _ => {}, + } + } + self.usb_tty.write_to_device(Command::ReadTemp); + for _ in 0..10{ + match self.usb_tty.read_from_device(None){ + Response::TempCount(count) => self.init_temps = count , + _ => {}, + } + } + log::error!("Temp read failed!!!"); + //return 0; + } + pub fn is_bp_running(&mut self) -> bool { self.go_to_lifecycle_menu(); self.usb_tty.write_to_device(Command::CheckBPState); @@ -360,7 +383,6 @@ impl Device{ } } pub fn reboot(&mut self) -> () { - //self.go_to_login_prompt(); self.usb_tty.write_to_device(Command::Quit); while self.usb_tty.read_from_device(None) != Response::Rebooting {} self.current_state = State::Shutdown; @@ -378,11 +400,9 @@ impl Device{ return true; } } - pub fn test_cycle(&mut self, bp_cycles: Option, temp_cycles: Option) -> () { + pub fn test_cycle(&mut self, bp_cycles: Option, _temp_cycles: Option) -> () { let local_bp_cycles: u64 = bp_cycles.unwrap_or(3); - let local_temp_cycles: u64 = temp_cycles.unwrap_or(2); if self.current_state != State::LoginPrompt { self.reboot(); } - thread::sleep(BOOT_TIME); self.go_to_lifecycle_menu(); _ = self.usb_tty.read_from_device(Some("[")); for _bp_count in 1..=local_bp_cycles{ @@ -390,7 +410,13 @@ impl Device{ self.start_bp(); let bp_start = self.is_bp_running(); log::trace!("Has bp started on device {}? : {:?}",self.serial,bp_start); - thread::sleep(BP_RUN); + thread::sleep(BP_RUN_1); + + self.start_temp(); + thread::sleep(TEMP_WAIT); + self.stop_temp(); + + thread::sleep(BP_RUN_2); let bp_end = self.is_bp_running(); log::trace!("Has bp ended on device {}? : {:?}",self.serial,bp_end); if bp_start != bp_end { @@ -399,16 +425,6 @@ impl Device{ 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 for device {} to {}",self.serial,self.temps); - self.save_values(); - } - } log::info!("Rebooting {} for the {}th time",self.serial, self.reboots); self.reboot(); self.reboots += 1; diff --git a/src/main.rs b/src/main.rs index 285e680..9cd8f0c 100755 --- a/src/main.rs +++ b/src/main.rs @@ -49,8 +49,8 @@ fn input_filtering(prompt:Option<&str>) -> String{ } fn main(){ - setup_logs(); let args = Args::parse(); + setup_logs(&args.debug); log::info!("Seymour Life Testing version: {}",VERSION); if args.debug{ log::debug!("Debug enabled!"); @@ -181,7 +181,7 @@ fn find_gpio(device:&mut Device,gpio:&mut GpioPins) -> bool{ return false; } -pub fn setup_logs(){ +pub fn setup_logs(debug:&bool){ let chrono_now: DateTime = Local::now(); if ! Path::new("logs").is_dir(){ _ = fs::create_dir("logs"); @@ -204,10 +204,15 @@ pub fn setup_logs(){ 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 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(); } diff --git a/src/tty.rs b/src/tty.rs index 75a1a29..7910857 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -32,8 +32,7 @@ pub enum Response{ ShellPrompt, BPOn, BPOff, - TempFailed, - TempSuccess, + TempCount(u64), LoginPrompt, DebugMenuReady, DebugMenuWithContinuedMessage, @@ -51,7 +50,7 @@ const COMMAND_MAP:Lazy> = 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,"?"), @@ -59,15 +58,14 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ (Command::Newline,"\n"), ])); -const RESPONSES:[(&str,Response);10] = [ +const RESPONSES:[(&str,Response);9] = [ ("reboot: Restarting",Response::Rebooting), ("login:",Response::LoginPrompt), ("Password:",Response::PasswordPrompt), ("root@",Response::ShellPrompt), ("Check NIBP In Progress: True",Response::BPOn), ("Check NIBP In Progress: False",Response::BPOff), - ("Temp: 0",Response::TempFailed), - ("Temp:",Response::TempSuccess), + ("SureTemp Probe Pulls:",Response::TempCount(0)), ("> ",Response::DebugMenuWithContinuedMessage), (">",Response::DebugMenuReady), ]; @@ -127,7 +125,15 @@ impl TTY{ 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; + if enum_value == Response::TempCount(0){ + match read_line.rsplit_once(' '){ + None => return enum_value, + Some((_,temp_count)) => return Response::TempCount(temp_count.parse().unwrap_or(0)) + } + } + else{ return enum_value; + } } } return Response::Other; From 7a601ebc6e9c52a44884b8170ecd6ef5432acc4b Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Tue, 13 Jun 2023 09:32:44 -0400 Subject: [PATCH 14/31] Add back is_temp_running --- src/device.rs | 22 +++++++++++++++++++++- src/main.rs | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/device.rs b/src/device.rs index 827963c..ab33e84 100755 --- a/src/device.rs +++ b/src/device.rs @@ -330,6 +330,27 @@ impl Device{ _ = self.usb_tty.read_from_device(None); return self; } + + pub fn is_temp_running(&mut self) -> bool{ + 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(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(count) => return count == self.init_temps , + _ => {}, + } + } + log::error!("Temp read failed!!!"); + return false + } + pub fn update_temp_count(&mut self) -> u64 { self.go_to_lifecycle_menu(); self.usb_tty.write_to_device(Command::ReadTemp); @@ -367,7 +388,6 @@ impl Device{ } } log::error!("Temp read failed!!!"); - //return 0; } pub fn is_bp_running(&mut self) -> bool { diff --git a/src/main.rs b/src/main.rs index 9cd8f0c..fdc3cf3 100755 --- a/src/main.rs +++ b/src/main.rs @@ -145,6 +145,7 @@ fn main(){ 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()); @@ -167,6 +168,7 @@ fn main(){ } 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(){ From fe7cd6d5106d3338a656ce213f73fd90b2605d42 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Tue, 13 Jun 2023 15:46:09 -0400 Subject: [PATCH 15/31] Finish temp algorithm, update login algorithm Bash often drops beginning characters in the first command sent if it is sent too soon after being logged in. Solution is to wait 1s after logging in --- notes.md | 2 ++ src/device.rs | 48 ++++++++++++++++++++++++++++++++++-------------- src/tty.rs | 18 ++++++++++++++---- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/notes.md b/notes.md index da1f519..9c5d16e 100644 --- a/notes.md +++ b/notes.md @@ -4,3 +4,5 @@ Clearing the screen of all vitals is theoretically possible in the UI menu, with Can check for reboot completed by reading in serial, check for `reboot: Restarting System` once done, read for `login:` + +First command sent to shell gets dropped (possibly due to timing issue?) diff --git a/src/device.rs b/src/device.rs index ab33e84..9ba594a 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,10 +2,10 @@ 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(50, 0); -const BP_RUN_1:Duration = Duration::new(29, 0); -const TEMP_WAIT:Duration = Duration::new(3,0); -const BP_RUN_2:Duration = Duration::new(28, 0); +const BP_RUN_1:Duration = Duration::from_secs(29); +const TEMP_WAIT:Duration = Duration::from_secs(3); +const BP_RUN_2:Duration = Duration::from_secs(28); +const LOGIN_WAIT:Duration = Duration::from_secs(1); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; @@ -165,6 +165,7 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); + thread::sleep(LOGIN_WAIT); _ = self.usb_tty.read_from_device(None); self.usb_tty.write_to_device(Command::DebugMenu); _ = self.usb_tty.read_from_device(None); @@ -195,6 +196,7 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); + thread::sleep(LOGIN_WAIT); _ = self.usb_tty.read_from_device(None); self.usb_tty.write_to_device(Command::DebugMenu); _ = self.usb_tty.read_from_device(None); @@ -227,6 +229,7 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); + thread::sleep(LOGIN_WAIT); _ = self.usb_tty.read_from_device(None); self.usb_tty.write_to_device(Command::DebugMenu); _ = self.usb_tty.read_from_device(None); @@ -336,14 +339,14 @@ impl Device{ self.usb_tty.write_to_device(Command::ReadTemp); for _ in 0..10 { match self.usb_tty.read_from_device(None){ - Response::TempCount(count) => return count == self.init_temps , + Response::TempCount(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(count) => return count == self.init_temps , + Response::TempCount(count) => return count != self.init_temps , _ => {}, } } @@ -356,18 +359,24 @@ impl Device{ self.usb_tty.write_to_device(Command::ReadTemp); for _ in 0..10 { match self.usb_tty.read_from_device(None){ - Response::TempCount(count) => return count, + Response::TempCount(count) => { + log::trace!("Count for device {} updated to {}",self.serial,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(count) => return count, + Response::TempCount(count) => { + log::trace!("Count for device {} updated to {}",self.serial,count); + return count + }, _ => {}, } } - log::error!("Temp read failed!!!"); + log::error!("Update temp count on device {} failed!!!",self.serial); return 0; } @@ -376,18 +385,26 @@ impl Device{ self.usb_tty.write_to_device(Command::ReadTemp); for _ in 0..10 { match self.usb_tty.read_from_device(None){ - Response::TempCount(count) => self.init_temps = count , + Response::TempCount(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(count) => self.init_temps = count , + Response::TempCount(count) => { + log::trace!("init temp count set to {} on device {}",count,self.serial); + self.init_temps = count; + return + }, _ => {}, } - } - log::error!("Temp read failed!!!"); + }; + log::error!("init temp count failed on device {}!!!",self.serial); } pub fn is_bp_running(&mut self) -> bool { @@ -425,6 +442,7 @@ impl Device{ 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(); @@ -432,8 +450,10 @@ impl Device{ log::trace!("Has bp started on device {}? : {:?}",self.serial,bp_start); thread::sleep(BP_RUN_1); + 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(); thread::sleep(BP_RUN_2); diff --git a/src/tty.rs b/src/tty.rs index 7910857..49df070 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -126,13 +126,23 @@ impl TTY{ 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; if enum_value == Response::TempCount(0){ - match read_line.rsplit_once(' '){ - None => return enum_value, - Some((_,temp_count)) => return Response::TempCount(temp_count.parse().unwrap_or(0)) + 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)) => { + log::trace!("Header: {}",header); + log::trace!("Temp count: {}",temp_count); + return Response::TempCount(temp_count.parse().unwrap_or(0)) + } + } + } } } else{ - return enum_value; + return enum_value; } } } From 714c198f54d47de5f7ae4faee73cea557a03f94a Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 14 Jun 2023 10:14:04 -0400 Subject: [PATCH 16/31] Add proper password prompt parsing functionality --- src/device.rs | 10 +++------- src/tty.rs | 6 ++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/device.rs b/src/device.rs index 9ba594a..10e43a2 100755 --- a/src/device.rs +++ b/src/device.rs @@ -5,7 +5,6 @@ use rppal::gpio::{Gpio,OutputPin}; const BP_RUN_1:Duration = Duration::from_secs(29); const TEMP_WAIT:Duration = Duration::from_secs(3); const BP_RUN_2:Duration = Duration::from_secs(28); -const LOGIN_WAIT:Duration = Duration::from_secs(1); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; @@ -165,14 +164,13 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); - thread::sleep(LOGIN_WAIT); _ = 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; }, State::Shutdown => { - while self.usb_tty.read_from_device(None) != Response::Rebooting {} + while self.usb_tty.read_from_device(None) != Response::LoginPrompt{} self.current_state = State::LoginPrompt; }, }; @@ -196,7 +194,6 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); - thread::sleep(LOGIN_WAIT); _ = self.usb_tty.read_from_device(None); self.usb_tty.write_to_device(Command::DebugMenu); _ = self.usb_tty.read_from_device(None); @@ -204,7 +201,7 @@ impl Device{ return self; }, State::Shutdown => { - while self.usb_tty.read_from_device(None) != Response::Rebooting {} + while self.usb_tty.read_from_device(None) != Response::LoginPrompt {} self.current_state = State::LoginPrompt; }, }; @@ -229,14 +226,13 @@ impl Device{ }, State::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); - thread::sleep(LOGIN_WAIT); _ = 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; }, State::Shutdown => { - while self.usb_tty.read_from_device(None) != Response::Rebooting {} + while self.usb_tty.read_from_device(None) != Response::LoginPrompt {} self.current_state = State::LoginPrompt; }, }; diff --git a/src/tty.rs b/src/tty.rs index 49df070..87dea27 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -111,6 +111,7 @@ impl TTY{ 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.tty.flush(); + if command == Command::Login { std::thread::sleep(std::time::Duration::from_secs(2)); } std::thread::sleep(std::time::Duration::from_millis(500)); return output; } @@ -141,6 +142,11 @@ impl TTY{ } } } + 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; } From 4bc838301673a780a626f33e933f17c93e5f27c4 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 14 Jun 2023 13:31:39 -0400 Subject: [PATCH 17/31] Continue tweaking reboot algorithm --- src/device.rs | 24 ++++++++++++++++++------ src/tty.rs | 4 +++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/device.rs b/src/device.rs index 10e43a2..5d9ae0f 100755 --- a/src/device.rs +++ b/src/device.rs @@ -107,8 +107,8 @@ impl Device{ _ = usb_port.read_from_device(None); initial_state = State::LoginPrompt; }, - Response::Other | Response::Empty | Response::ShellPrompt - | Response::LoginPrompt | Response::Rebooting => + Response::Other | Response::Empty | Response::ShellPrompt | + Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting => initial_state = State::LoginPrompt, Response::BPOn | Response::BPOff | Response::TempCount(_) => initial_state = State::LifecycleMenu, @@ -417,9 +417,22 @@ impl Device{ } pub fn reboot(&mut self) -> () { self.usb_tty.write_to_device(Command::Quit); - while self.usb_tty.read_from_device(None) != Response::Rebooting {} - self.current_state = State::Shutdown; - while self.usb_tty.read_from_device(None) != Response::LoginPrompt {} + let mut successful_reboot: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; + }, + Response::ShuttingDown => { + log::warn!("Failed reboot on device {}!",self.serial); + successful_reboot = false; + }, + _ => {} + } + }; + if successful_reboot { self.reboots += 1; } self.current_state = State::LoginPrompt; } pub fn is_rebooted(&mut self) -> bool { @@ -463,7 +476,6 @@ impl Device{ } log::info!("Rebooting {} for the {}th time",self.serial, self.reboots); self.reboot(); - self.reboots += 1; self.save_values(); } } diff --git a/src/tty.rs b/src/tty.rs index 87dea27..7925221 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -39,6 +39,7 @@ pub enum Response{ Rebooting, Other, Empty, + ShuttingDown } @@ -58,10 +59,11 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ (Command::Newline,"\n"), ])); -const RESPONSES:[(&str,Response);9] = [ +const RESPONSES:[(&str,Response);10] = [ ("reboot: Restarting",Response::Rebooting), ("login:",Response::LoginPrompt), ("Password:",Response::PasswordPrompt), + ("EXIT Debug menu",Response::ShuttingDown), ("root@",Response::ShellPrompt), ("Check NIBP In Progress: True",Response::BPOn), ("Check NIBP In Progress: False",Response::BPOff), From a2701de3a093c2eae3e4067273de88fd8b52dba6 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 14 Jun 2023 14:36:19 -0400 Subject: [PATCH 18/31] Remove excess argument for test --- src/device.rs | 2 +- src/main.rs | 2 +- src/tty.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device.rs b/src/device.rs index 5d9ae0f..fe1a863 100755 --- a/src/device.rs +++ b/src/device.rs @@ -446,7 +446,7 @@ impl Device{ return true; } } - pub fn test_cycle(&mut self, bp_cycles: Option, _temp_cycles: Option) -> () { + pub fn test_cycle(&mut self, bp_cycles: Option) -> () { let local_bp_cycles: u64 = bp_cycles.unwrap_or(3); if self.current_state != State::LoginPrompt { self.reboot(); } self.go_to_lifecycle_menu(); diff --git a/src/main.rs b/src/main.rs index fdc3cf3..a3e7e82 100755 --- a/src/main.rs +++ b/src/main.rs @@ -149,7 +149,7 @@ fn main(){ for i in 1..=iteration_count{ log::info!("Starting iteration {} of {} for device {}...", i,iteration_count,device.get_serial()); - device.test_cycle(None, None); + device.test_cycle(None); } })); } diff --git a/src/tty.rs b/src/tty.rs index 7925221..ceed27a 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -110,7 +110,7 @@ impl TTY{ } pub fn write_to_device(&mut self,command:Command) -> bool { - log::debug!("writing {:?} to tty {}...", command, self.tty.name().unwrap_or("unknown".to_string())); + log::trace!("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.tty.flush(); if command == Command::Login { std::thread::sleep(std::time::Duration::from_secs(2)); } @@ -126,7 +126,7 @@ impl TTY{ let read_line:String = String::from_utf8_lossy(read_buffer.as_slice()).to_string(); 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); + log::trace!("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; if enum_value == Response::TempCount(0){ let mut lines = read_line.lines(); From e666931d1a67b1d8c5895d1e6888a2b028ad0325 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 14 Jun 2023 15:26:52 -0400 Subject: [PATCH 19/31] take advantage of new runners --- .forgejo/workflows/buildcheck.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.forgejo/workflows/buildcheck.yaml b/.forgejo/workflows/buildcheck.yaml index dc1b053..d6f2e38 100644 --- a/.forgejo/workflows/buildcheck.yaml +++ b/.forgejo/workflows/buildcheck.yaml @@ -3,39 +3,25 @@ run-name: ${{ github.actor }} is testing on: [push] jobs: docker-check: - runs-on: docker + runs-on: rust steps: - name: Grab misc. dependencies run: | apt update && apt install -y librust-libudev-sys-dev build-essential - name: Check out repository code uses: actions/checkout@v3 - - name: Grab Rust toolchain - uses: https://github.com/actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: aarch64-unknown-linux-gnu - override: true - name: Run check uses: https://github.com/actions-rs/cargo@v1 with: command: check docker-build: - runs-on: docker + runs-on: rust steps: - name: Grab misc. dependencies run: | apt update && apt install -y librust-libudev-sys-dev build-essential - name: Check out repository code uses: actions/checkout@v3 - - name: Grab Rust toolchain - uses: https://github.com/actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: aarch64-unknown-linux-gnu - override: true - name: Run check uses: https://github.com/actions-rs/cargo@v1 with: From c1e3efdb8cb005193198bf14ff306f51237276eb Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Wed, 14 Jun 2023 15:31:37 -0400 Subject: [PATCH 20/31] revert previous change --- .forgejo/workflows/buildcheck.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/buildcheck.yaml b/.forgejo/workflows/buildcheck.yaml index d6f2e38..dc1b053 100644 --- a/.forgejo/workflows/buildcheck.yaml +++ b/.forgejo/workflows/buildcheck.yaml @@ -3,25 +3,39 @@ run-name: ${{ github.actor }} is testing on: [push] jobs: docker-check: - runs-on: rust + runs-on: docker steps: - name: Grab misc. dependencies run: | apt update && apt install -y librust-libudev-sys-dev build-essential - name: Check out repository code uses: actions/checkout@v3 + - name: Grab Rust toolchain + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: aarch64-unknown-linux-gnu + override: true - name: Run check uses: https://github.com/actions-rs/cargo@v1 with: command: check docker-build: - runs-on: rust + runs-on: docker steps: - name: Grab misc. dependencies run: | apt update && apt install -y librust-libudev-sys-dev build-essential - name: Check out repository code uses: actions/checkout@v3 + - name: Grab Rust toolchain + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: aarch64-unknown-linux-gnu + override: true - name: Run check uses: https://github.com/actions-rs/cargo@v1 with: From c2ea32f2c91e2d5defa05645b559efcbe7c2d0b1 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Thu, 15 Jun 2023 17:02:12 -0400 Subject: [PATCH 21/31] Attempt to debug bad temp cycle check --- src/device.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device.rs b/src/device.rs index fe1a863..9732720 100755 --- a/src/device.rs +++ b/src/device.rs @@ -259,6 +259,8 @@ impl Device{ output_data.push_str(&self.bps.to_string()); output_data.push_str("\n"); output_data.push_str(TEMP_SECTION); + log::trace!("Current temps: {}",self.temps); + log::trace!("Initial temps: {}",self.init_temps); let saved_temps = self.temps - self.init_temps; output_data.push_str(&saved_temps.to_string()); output_data.push_str("\n"); From 823543ff036f050bbbb313e9b0a491065ca4b08c Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 16 Jun 2023 09:53:46 -0400 Subject: [PATCH 22/31] Update init and project name Project is no longer Proof Of Concept. Modified Device init to be more consistent. Started explicit typing of variables. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/device.rs | 56 +++++++++++++++++++++++++++++++++++---------------- src/main.rs | 6 +++--- src/tty.rs | 18 +++++++++++++---- 5 files changed, 58 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5612343..dc445d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -638,7 +638,7 @@ dependencies = [ ] [[package]] -name = "seymour_poc_rust" +name = "seymour_life_rust" version = "2.2.0" dependencies = [ "chrono", diff --git a/Cargo.toml b/Cargo.toml index f1ede23..ab9d269 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ #cargo-features = ["per-package-target"] [package] -name = "seymour_poc_rust" +name = "seymour_life_rust" version = "2.2.0" edition = "2021" diff --git a/src/device.rs b/src/device.rs index 9732720..c9fc610 100755 --- a/src/device.rs +++ b/src/device.rs @@ -40,10 +40,10 @@ impl Device{ _ = fs::create_dir(&OUTPUT_FOLDER); }; log::debug!("{:?}",&self.serial); - let output_path = OUTPUT_FOLDER.to_owned() + &self.serial + ".txt"; + 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); + let temp:Result = fs::File::create(&output_path); match temp{ Ok(file) => { self.output_file = Some(file); @@ -55,17 +55,17 @@ impl Device{ } } else { - let temp = std::fs::read_to_string(output_path); + let temp:Result = 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::(); + let section:&str = section_and_data[0]; + let possible_value:Result = section_and_data[1].trim().parse::(); match possible_value{ Ok(value) => { log::trace!("{:?} value: [{:?}]",section,value); @@ -83,7 +83,7 @@ impl Device{ }; } Err(_) => { - log::warn!("Unable to parse value [{}] into integer",section_and_data[1]); + log::warn!("Unable to parse value [{:?}] into integer",section_and_data); } } }; @@ -107,14 +107,32 @@ impl Device{ _ = usb_port.read_from_device(None); initial_state = State::LoginPrompt; }, + //Response::Empty parsing here is potentially in bad faith Response::Other | Response::Empty | Response::ShellPrompt | Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting => - initial_state = State::LoginPrompt, - Response::BPOn | Response::BPOff | Response::TempCount(_) => - initial_state = State::LifecycleMenu, - Response::DebugMenuReady | Response::DebugMenuWithContinuedMessage=> - initial_state = State::DebugMenu, - } + initial_state = State::LoginPrompt, + Response::BPOn | Response::BPOff | Response::TempCount(_) | + Response::DebugMenuReady | Response::DebugMenuWithContinuedMessage=>{ + usb_port.write_to_device(Command::Quit); + _ = usb_port.read_from_device(None); + usb_port.write_to_device(Command::Newline); + match usb_port.read_from_device(None){ + Response::Rebooting => { + while usb_port.read_from_device(None) != Response::LoginPrompt {} + initial_state = State::LoginPrompt; + }, + Response::ShellPrompt => { + usb_port.write_to_device(Command::Shutdown); + while usb_port.read_from_device(None) != Response::LoginPrompt {} + initial_state = State::LoginPrompt; + }, + _ => { + log::error!("Unknown state for TTY {:?}!!! Consult logs immediately.",usb_port); + return Err("Failed TTY init. Unknown state, cannot trust.".to_string()); + } + }; + }, + }; }, None => initial_state = State::LoginPrompt }; @@ -259,8 +277,8 @@ impl Device{ output_data.push_str(&self.bps.to_string()); output_data.push_str("\n"); output_data.push_str(TEMP_SECTION); - log::trace!("Current temps: {}",self.temps); - log::trace!("Initial temps: {}",self.init_temps); + log::trace!("Current temps: [{}]",self.temps); + log::trace!("Initial temps: [{}]",self.init_temps); let saved_temps = self.temps - self.init_temps; output_data.push_str(&saved_temps.to_string()); output_data.push_str("\n"); @@ -359,6 +377,7 @@ impl Device{ match self.usb_tty.read_from_device(None){ Response::TempCount(count) => { log::trace!("Count for device {} updated to {}",self.serial,count); + self.temps = count; return count }, _ => {}, @@ -369,6 +388,7 @@ impl Device{ match self.usb_tty.read_from_device(None){ Response::TempCount(count) => { log::trace!("Count for device {} updated to {}",self.serial,count); + self.temps = count; return count }, _ => {}, @@ -420,16 +440,18 @@ impl Device{ pub fn reboot(&mut self) -> () { self.usb_tty.write_to_device(Command::Quit); 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; + if !exited_menu { log::info!("Unusual reboot detected for device {}. Please check logs.",self.serial); } }, Response::ShuttingDown => { - log::warn!("Failed reboot on device {}!",self.serial); - successful_reboot = false; + log::trace!("Exiting debug menu on device {}.",self.serial); + exited_menu = true; }, _ => {} } diff --git a/src/main.rs b/src/main.rs index a3e7e82..3505a67 100755 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ -use seymour_poc_rust::{device::Device, - tty::{self,TTY,Response}, - gpio_facade::GpioPins}; +use seymour_life_rust::{device::Device, + tty::{self,TTY,Response}, + gpio_facade::GpioPins}; use std::{io::{stdin,stdout,Write}, thread::{self, JoinHandle}, path::Path, diff --git a/src/tty.rs b/src/tty.rs index ceed27a..415e0ba 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -23,6 +23,7 @@ pub enum Command{ Login, DebugMenu, Newline, + Shutdown, } #[derive(Clone,Eq,Derivative,Debug)] @@ -57,6 +58,7 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ (Command::RedrawMenu,"?"), (Command::DebugMenu," python3 -m debugmenu; shutdown -r now\n"), (Command::Newline,"\n"), + (Command::Shutdown,"shutdown -r now\n"), ])); const RESPONSES:[(&str,Response);10] = [ @@ -135,10 +137,18 @@ impl TTY{ let trimmed_line = single_line.trim(); match trimmed_line.rsplit_once(' '){ None => return enum_value, - Some((header,temp_count)) => { - log::trace!("Header: {}",header); - log::trace!("Temp count: {}",temp_count); - return Response::TempCount(temp_count.parse().unwrap_or(0)) + Some((_header,temp_count)) => { + match temp_count.trim().parse::(){ + Err(_) => { + log::error!("String {} from device {} unable to be parsed!",temp_count,self.tty.name().unwrap_or("unknown shell".to_string())); + return Response::TempCount(0) + }, + Ok(parsed_temp_count) => { + //log::trace!("Header: {}",header); + log::trace!("parsed temp count for device {}: {}",self.tty.name().unwrap_or("unknown shell".to_string()),temp_count); + return Response::TempCount(parsed_temp_count) + } + } } } } From f9f819d5fdb04608a3b52c1fa8be378b2b0015bc Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 16 Jun 2023 10:57:16 -0400 Subject: [PATCH 23/31] Rewrite goto functions, remove extra return type Goto functions are now smarter, and can handle empty/bad reads from the seymour. Also simplified the DebugMenu checks in tty --- src/device.rs | 152 ++++++++++++++++++++++++++++++-------------------- src/tty.rs | 10 ++-- 2 files changed, 96 insertions(+), 66 deletions(-) diff --git a/src/device.rs b/src/device.rs index c9fc610..c9bf40f 100755 --- a/src/device.rs +++ b/src/device.rs @@ -2,9 +2,7 @@ use std::{fs::{self, File}, path::Path, io::Write, thread, time::Duration}; use crate::tty::{TTY, Response,Command}; use rppal::gpio::{Gpio,OutputPin}; -const BP_RUN_1:Duration = Duration::from_secs(29); const TEMP_WAIT:Duration = Duration::from_secs(3); -const BP_RUN_2:Duration = Duration::from_secs(28); const REBOOTS_SECTION: &str = "Reboots: "; const BP_SECTION: &str = "Successful BP tests: "; const TEMP_SECTION: &str = "Successful temp tests: "; @@ -108,11 +106,11 @@ impl Device{ initial_state = State::LoginPrompt; }, //Response::Empty parsing here is potentially in bad faith - Response::Other | Response::Empty | Response::ShellPrompt | + Response::Other | Response::Empty | Response::ShellPrompt | Response::FailedDebugMenu | Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting => initial_state = State::LoginPrompt, Response::BPOn | Response::BPOff | Response::TempCount(_) | - Response::DebugMenuReady | Response::DebugMenuWithContinuedMessage=>{ + Response::DebugMenu=>{ usb_port.write_to_device(Command::Quit); _ = usb_port.read_from_device(None); usb_port.write_to_device(Command::Newline); @@ -182,9 +180,44 @@ 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::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, + Response::ShellPrompt => break, + _ => { + log::error!("Unexpected response from device {}!",self.serial); + 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.usb_tty.write_to_device(Command::DebugMenu); - _ = self.usb_tty.read_from_device(None); + loop { + match self.usb_tty.read_from_device(None) { + Response::Empty | Response::Rebooting | Response::ShuttingDown => {}, + 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 => { + while self.usb_tty.read_from_device(None) != 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); + }, + _ => { + log::error!("Unexpected response from device {}!", self.serial); + 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 => { @@ -195,37 +228,7 @@ impl Device{ }; 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; - }, - State::Shutdown => { - while self.usb_tty.read_from_device(None) != Response::LoginPrompt {} - self.current_state = State::LoginPrompt; - }, - }; - }; - return self; - } + fn go_to_lifecycle_menu(&mut self) -> &mut Self{ while !(self.current_state == State::LifecycleMenu){ match self.current_state { @@ -244,9 +247,44 @@ 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::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, + Response::ShellPrompt => break, + _ => { + log::error!("Unexpected response from device {}!",self.serial); + 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.usb_tty.write_to_device(Command::DebugMenu); - _ = self.usb_tty.read_from_device(None); + loop { + match self.usb_tty.read_from_device(None) { + Response::Empty | Response::Rebooting | Response::ShuttingDown => {}, + 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 => { + while self.usb_tty.read_from_device(None) != 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); + }, + _ => { + log::error!("Unexpected response from device {}!", self.serial); + 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 => { @@ -257,6 +295,7 @@ impl Device{ }; 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); @@ -331,7 +370,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); @@ -425,14 +464,13 @@ impl Device{ log::error!("init temp count failed on device {}!!!",self.serial); } - pub fn is_bp_running(&mut self) -> bool { + 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, } } @@ -459,17 +497,7 @@ impl Device{ 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.reboot(); - self.reboots +=1; - self.save_values(); - return true; - } - } + pub fn test_cycle(&mut self, bp_cycles: Option) -> () { let local_bp_cycles: u64 = bp_cycles.unwrap_or(3); if self.current_state != State::LoginPrompt { self.reboot(); } @@ -479,17 +507,19 @@ impl Device{ 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(); + let bp_start:bool = self.is_bp_running(); log::trace!("Has bp started on device {}? : {:?}",self.serial,bp_start); - thread::sleep(BP_RUN_1); - 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(); + 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() {}; - thread::sleep(BP_RUN_2); let bp_end = self.is_bp_running(); log::trace!("Has bp ended on device {}? : {:?}",self.serial,bp_end); if bp_start != bp_end { diff --git a/src/tty.rs b/src/tty.rs index 415e0ba..eb42940 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -35,12 +35,12 @@ pub enum Response{ BPOff, TempCount(u64), LoginPrompt, - DebugMenuReady, - DebugMenuWithContinuedMessage, + DebugMenu, Rebooting, Other, Empty, - ShuttingDown + ShuttingDown, + FailedDebugMenu, } @@ -63,6 +63,7 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ const RESPONSES:[(&str,Response);10] = [ ("reboot: Restarting",Response::Rebooting), + ("command not found",Response::FailedDebugMenu), ("login:",Response::LoginPrompt), ("Password:",Response::PasswordPrompt), ("EXIT Debug menu",Response::ShuttingDown), @@ -70,8 +71,7 @@ const RESPONSES:[(&str,Response);10] = [ ("Check NIBP In Progress: True",Response::BPOn), ("Check NIBP In Progress: False",Response::BPOff), ("SureTemp Probe Pulls:",Response::TempCount(0)), - ("> ",Response::DebugMenuWithContinuedMessage), - (">",Response::DebugMenuReady), + (">",Response::DebugMenu), ]; pub struct TTY{ From 70da5adc2b21483efa4435e2ec86272642bda6a8 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Fri, 16 Jun 2023 14:00:43 -0400 Subject: [PATCH 24/31] Remove some logging for storage purposes Also, stored a particularly useful log in the repo for easier analysis --- log-containing-uboot-prompt.txt | 264 ++++++++++++++++++++++++++++++++ src/device.rs | 12 +- src/tty.rs | 14 +- 3 files changed, 280 insertions(+), 10 deletions(-) create mode 100644 log-containing-uboot-prompt.txt diff --git a/log-containing-uboot-prompt.txt b/log-containing-uboot-prompt.txt new file mode 100644 index 0000000..251fc4f --- /dev/null +++ b/log-containing-uboot-prompt.txt @@ -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 diff --git a/src/device.rs b/src/device.rs index c9bf40f..d61d12e 100755 --- a/src/device.rs +++ b/src/device.rs @@ -107,7 +107,7 @@ impl Device{ }, //Response::Empty parsing here is potentially in bad faith Response::Other | Response::Empty | Response::ShellPrompt | Response::FailedDebugMenu | - Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting => + Response::LoginPrompt | Response::ShuttingDown | Response::Rebooting | Response::PreShellPrompt => initial_state = State::LoginPrompt, Response::BPOn | Response::BPOff | Response::TempCount(_) | Response::DebugMenu=>{ @@ -182,7 +182,7 @@ impl Device{ self.usb_tty.write_to_device(Command::Login); loop { match self.usb_tty.read_from_device(None){ - Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, Response::ShellPrompt => break, _ => { @@ -196,7 +196,7 @@ impl Device{ self.usb_tty.write_to_device(Command::DebugMenu); loop { match self.usb_tty.read_from_device(None) { - Response::Empty | Response::Rebooting | Response::ShuttingDown => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, Response::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); while self.usb_tty.read_from_device(None) != Response::ShellPrompt {}; @@ -249,7 +249,7 @@ impl Device{ self.usb_tty.write_to_device(Command::Login); loop { match self.usb_tty.read_from_device(None){ - Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, Response::ShellPrompt => break, _ => { @@ -259,11 +259,10 @@ impl Device{ }, }; }; - //_ = self.usb_tty.read_from_device(None); self.usb_tty.write_to_device(Command::DebugMenu); loop { match self.usb_tty.read_from_device(None) { - Response::Empty | Response::Rebooting | Response::ShuttingDown => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, Response::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); while self.usb_tty.read_from_device(None) != Response::ShellPrompt {}; @@ -284,7 +283,6 @@ impl Device{ }, }; }; - //_ = self.usb_tty.read_from_device(None); self.current_state = State::DebugMenu; }, State::Shutdown => { diff --git a/src/tty.rs b/src/tty.rs index eb42940..c03ad17 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -41,6 +41,7 @@ pub enum Response{ Empty, ShuttingDown, FailedDebugMenu, + PreShellPrompt, } @@ -61,7 +62,8 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ (Command::Shutdown,"shutdown -r now\n"), ])); -const RESPONSES:[(&str,Response);10] = [ +const RESPONSES:[(&str,Response);11] = [ + ("Last login:",Response::PreShellPrompt), ("reboot: Restarting",Response::Rebooting), ("command not found",Response::FailedDebugMenu), ("login:",Response::LoginPrompt), @@ -128,8 +130,14 @@ impl TTY{ let read_line:String = String::from_utf8_lossy(read_buffer.as_slice()).to_string(); for (string,enum_value) in RESPONSES{ if read_line.contains(string){ - log::trace!("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; + 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); + }; + self.failed_read_count = 0; if enum_value == Response::TempCount(0){ let mut lines = read_line.lines(); while let Some(single_line) = lines.next(){ From 4a83509bf88d9ecbb163959e8894f9c7775b2f53 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Sat, 17 Jun 2023 15:41:35 -0400 Subject: [PATCH 25/31] Add Nix dev environment --- shell.nix | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9d75c26 --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +{pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs; [ cargo rustc pkg-config libudev-zero ]; +} From 5182e4431ba70d58b8d846fa25164499f02f6497 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 09:08:37 -0400 Subject: [PATCH 26/31] Add debug tool Not sure why Unexpected Response error always shows. trying to track it down. --- src/device.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/device.rs b/src/device.rs index d61d12e..022bb18 100755 --- a/src/device.rs +++ b/src/device.rs @@ -187,6 +187,7 @@ impl Device{ Response::ShellPrompt => break, _ => { log::error!("Unexpected response from device {}!",self.serial); + log::debug!("brightness 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; }, @@ -212,6 +213,7 @@ impl Device{ }, _ => { log::error!("Unexpected response from device {}!", self.serial); + log::debug!("brightness 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; }, @@ -254,6 +256,7 @@ impl Device{ 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; }, @@ -278,6 +281,7 @@ impl Device{ }, _ => { log::error!("Unexpected response from device {}!", self.serial); + 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; }, From 24e742e0a2657b32be162d049eec762ad2e46479 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 09:22:29 -0400 Subject: [PATCH 27/31] Continue debugging --- src/device.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device.rs b/src/device.rs index 022bb18..857535b 100755 --- a/src/device.rs +++ b/src/device.rs @@ -264,7 +264,8 @@ impl Device{ }; self.usb_tty.write_to_device(Command::DebugMenu); loop { - match self.usb_tty.read_from_device(None) { + let read_in = self.usb_tty.read_from_device(None); + match read_in { Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, Response::LoginPrompt => { self.usb_tty.write_to_device(Command::Login); @@ -280,7 +281,7 @@ impl Device{ self.usb_tty.write_to_device(Command::DebugMenu); }, _ => { - log::error!("Unexpected response from device {}!", self.serial); + 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; From 3b352472dcbc143cf0f57f36d8f208d9a01fdb98 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 09:45:27 -0400 Subject: [PATCH 28/31] Log "other" TTY Response --- src/tty.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tty.rs b/src/tty.rs index c03ad17..8fcf571 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -172,6 +172,7 @@ impl TTY{ } } } + log::warn!("Unable to determine response. Response string is: [{:?}]",read_line); return Response::Other; } else { From 35d9c7b6fb6ace95f0633eaf981586051f006850 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 10:05:03 -0400 Subject: [PATCH 29/31] Add debug menu init and blank newline handling --- src/device.rs | 6 +++++- src/tty.rs | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/device.rs b/src/device.rs index 857535b..21c06f1 100755 --- a/src/device.rs +++ b/src/device.rs @@ -106,7 +106,7 @@ impl Device{ initial_state = State::LoginPrompt; }, //Response::Empty parsing here is potentially in bad faith - Response::Other | Response::Empty | Response::ShellPrompt | Response::FailedDebugMenu | + 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(_) | @@ -130,6 +130,10 @@ impl Device{ } }; }, + Response::EmptyNewline => { + log::error!("Unknown state for TTY {:?}!!! Consult logs immediately.",usb_port); + return Err("Failed TTY init. Unknown state, cannot trust.".to_string()); + }, }; }, None => initial_state = State::LoginPrompt diff --git a/src/tty.rs b/src/tty.rs index 8fcf571..d62f54d 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -42,6 +42,8 @@ pub enum Response{ ShuttingDown, FailedDebugMenu, PreShellPrompt, + EmptyNewline, + DebugInit, } @@ -62,7 +64,7 @@ const COMMAND_MAP:Lazy> = Lazy::new(||HashMap::from([ (Command::Shutdown,"shutdown -r now\n"), ])); -const RESPONSES:[(&str,Response);11] = [ +const RESPONSES:[(&str,Response);12] = [ ("Last login:",Response::PreShellPrompt), ("reboot: Restarting",Response::Rebooting), ("command not found",Response::FailedDebugMenu), @@ -74,6 +76,7 @@ const RESPONSES:[(&str,Response);11] = [ ("Check NIBP In Progress: False",Response::BPOff), ("SureTemp Probe Pulls:",Response::TempCount(0)), (">",Response::DebugMenu), + ("Loading App-Framework",Response::DebugInit) ]; pub struct TTY{ @@ -128,6 +131,9 @@ 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 (string,enum_value) in RESPONSES{ if read_line.contains(string){ if(enum_value == Response::BPOn) || (enum_value == Response::BPOff) { From 8fb05a3010541d03f8b5031ca03e3182435ff3f5 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 10:14:59 -0400 Subject: [PATCH 30/31] Mute unexpected response for DebugInit and empty --- src/device.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/device.rs b/src/device.rs index 21c06f1..5f07a5d 100755 --- a/src/device.rs +++ b/src/device.rs @@ -186,7 +186,8 @@ impl Device{ self.usb_tty.write_to_device(Command::Login); loop { match self.usb_tty.read_from_device(None){ - Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | + Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {}, Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, Response::ShellPrompt => break, _ => { @@ -201,7 +202,8 @@ impl Device{ self.usb_tty.write_to_device(Command::DebugMenu); loop { match self.usb_tty.read_from_device(None) { - Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + 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 {}; @@ -255,7 +257,8 @@ impl Device{ self.usb_tty.write_to_device(Command::Login); loop { match self.usb_tty.read_from_device(None){ - Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | + Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {}, Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);}, Response::ShellPrompt => break, _ => { @@ -270,7 +273,8 @@ impl Device{ loop { let read_in = self.usb_tty.read_from_device(None); match read_in { - Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {}, + 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 {}; From 7b287518717338dbfda0a11fbe734843817ae72b Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 10:31:26 -0400 Subject: [PATCH 31/31] Deprioritise misc responses There's a lot of these, and most are shutdown or bootup logs. Will still log, but won't show in the default mode --- src/tty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.rs b/src/tty.rs index d62f54d..335f69f 100755 --- a/src/tty.rs +++ b/src/tty.rs @@ -178,7 +178,7 @@ impl TTY{ } } } - log::warn!("Unable to determine response. Response string is: [{:?}]",read_line); + log::trace!("Unable to determine response. Response string is: [{:?}]",read_line); return Response::Other; } else {