Skip to content

Conversation

brainstorm
Copy link
Owner

@brainstorm brainstorm commented Jun 1, 2025

Will eventually fix #23 #20 #21, WIP.

Also involves changes upstream sunset dependency, commits happening on mkj/sunset#35.

@mkj
Copy link
Collaborator

mkj commented Jun 17, 2025

I've pushed a sunset change that I think should fix that problem. mkj/sunset@1dcf2ec

Previously sshwire-derive assumed crate::sshwire would work, so needed use sunset::sshwire in the crate top lib.rs .
Now it should work fine as long as sunset is a dependency in Cargo.toml.

@brainstorm
Copy link
Owner Author

I've pushed a sunset change that I think should fix that problem. mkj/sunset@1dcf2ec

Previously sshwire-derive assumed crate::sshwire would work, so needed use sunset::sshwire in the crate top lib.rs . Now it should work fine as long as sunset is a dependency in Cargo.toml.

Thank you! Works a treat! ;)

brainstorm and others added 18 commits June 21, 2025 11:47
…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
… 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]>
…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]>
brainstorm and others added 3 commits July 28, 2025 20:43
…nfig no longer needs a new() method but OTOH resolve_pin() requires a bit more rework (or remove it altogether?)
… 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]>
brainstorm and others added 6 commits August 15, 2025 20:57
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]>
…es as the current arrangement locks while waiting to send/receive pin configurations, /cc @mmalenic
brainstorm and others added 11 commits September 9, 2025 21:54
…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]
…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]
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provisioning based on (SSH) environment variables
2 participants