-
Notifications
You must be signed in to change notification settings - Fork 3
Add SSH config storage support #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…om sunset for ssh-stamp...
I've pushed a sunset change that I think should fix that problem. mkj/sunset@1dcf2ec Previously sshwire-derive assumed |
Thank you! Works a treat! ;) |
…assumptions around mutexes and rename Fl/FlashCo fig struct names
…onfigure the UART's pins at runtime (possible?) and also pass the config object around (safely/mutex-ing) too
…t a CriticalSectionRawMutex for the SSHConfig. Next up: figure out non-unsafe() ways to steal() pins for the UART pins
…channel, needs more work/thought... also PeripheralRef is not present in 1.0.0-beta.1
Co-authored-by: Marko Malenic <[email protected]>
… call is now required. The partition checking/handling functionalities might be relevant to @jubeormk1 too, btw
…with the UART operation, need to debug further
…X/TX/CTS/RTS... etc.. pin assignment and at-runtime validation et al Co-authored-by: Marko Malenic <[email protected]>
…h into fix_passwd_auth
…erialization/deserialization "on the wire" of SSHConfig, unfortunately /cc @mmalenic
Introduced custom Errors Introduced env vars and started refactoring accordingly. Config and peripherals are borrow checker challenges. Co-authored-by: Marko Malenic <[email protected]>
…nfig no longer needs a new() method but OTOH resolve_pin() requires a bit more rework (or remove it altogether?)
Co-authored-by: Marko Malenic <[email protected]>
… PinConfig::new()... Also channel cannot send at the end of uart_task() because there's an infinite loop right before. Co-authored-by: Marko Malenic <[email protected]>
Use channels to send individual pins around... probably we should refactor to Signal instead since message size N=1. Co-authored-by: Marko Malenic <[email protected]>
…ass SSH's env events
… lifetimes and futures. Co-authored-by: Marko Malenic <[email protected]>
…es as the current arrangement locks while waiting to send/receive pin configurations, /cc @mmalenic
…nfig persistence, added a couple of OTA partitions to help out @jubeormk1. Narrowed down flash write errors (erase works now) to sector size alignment issues /cc @mmalenic. [ci skip]
… nor flash writing offsets issue... hash payload on flash is 2 bytes off still and yields 'bad config hash' [ci skip]
Co-authored-by: Marko Malenic <[email protected]>
…sh_read-ing config. Add IPV6-specific address to SSHStampConfig (renamed from SSHConfig since potentially we'll have to DIY-decode ourselves due to the extra fields we'll change/introduce) [ci skip]
…e SSHStampConfig members [ci skip]
…ect still though... I (334) boot: Disabling RNG early entropy source... Existing config bad, making new. Wrong config version [src/storage.rs:96] "New config being serialised: " = "New config being serialised: " [src/storage.rs:96] &c = SSHStampConfig { hostkey: SignKey::Ed25519, password_authentication: true, admin_pw: None, admin_keys: [ None, None, None, ], wifi_ssid: "ssh-stamp", wifi_pw: None, mac: [ 218, 85, 73, 185, 109, 144, ], ipv4_static: None, uart_pins: SerdePinConfig { tx: 10, rx: 11, rts: None, cts: None, }, } Flash size = 8388608 bytes NVS partition size = 8192 NVS partition offset = 0x9000 [src/storage.rs:150] CONFIG_OFFSET + FlashConfig::BUF_SIZE = 40996 [src/storage.rs:152] "Erasing flash" = "Erasing flash" flash save done Checking if link is up...
… now throws RanOut on wifi_ssid dec(s)?: config.rs:462-463 Co-authored-by: Julio Beltran Ortega <[email protected]>
…rgets after almost a year... will it work?
Will eventually fix #23 #20 #21, WIP.
Also involves changes upstream sunset dependency, commits happening on mkj/sunset#35.