openWifiSsh: the dev image ships the switch too; say so

Checked against microduck-image-dev.bb: it installs microduck-ssh-access
and adds a permanent any-interface drop-in on top. So the call answers
switched: true there, and changes nothing, rather than the switched:
false the docs promised.

Assisted-by: Claude:claude-opus-5-5
This commit is contained in:
apirrone
2026-11-12 13:40:32 +01:00
parent 02e41549f3
commit 4fb1faa991
4 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ use duck_ipc_proto as proto;
pub const SWITCH: &str = "/run/microduck-ssh-wifi";
/// What the image installs alongside the path unit. Its absence means an image with no switch to
/// press: the dev image, which listens on wifi already, or a board with no USB link.
/// press: a board with no USB link, which keeps ssh on wifi. The dev image has it — and a
/// permanent drop-in that opens wifi anyway, so pressing it there is harmless and changes nothing.
pub const INSTALLED: &str = "/usr/share/microduck-ssh-access/30-wifi-until-reboot.conf";
/// Press the switch, if this image has one.
+1 -2
View File
@@ -151,8 +151,7 @@ duckctl ssh-wifi
```
That asks `configd` over the same authenticated Bluetooth session every other command uses, so it
needs the setup code. It answers `switched: false` on the dev image, where ssh is open on wifi
already.
needs the setup code. On the dev image it changes nothing: ssh is open on wifi there already.
`ssh` and `scp` remember where they last found each robot, in `~/.cache/duckctl/addresses`
(`$XDG_CACHE_HOME` if set), and try that address first: if something answers on port 22 within a
+4 -2
View File
@@ -4924,8 +4924,10 @@ pub struct RebootResult {
/// a tmpfs. There is no call to close it early, because a reboot already does.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct OpenWifiSshResult {
/// False on an image with no such switch (the dev image, which listens on wifi already, or a
/// board with no USB link). Nothing was done, and ssh on wifi is whatever the image makes it.
/// False on an image with no such switch — a board with no USB link, which keeps ssh on wifi
/// anyway. Nothing was done, and ssh on wifi is whatever the image makes it. True on the dev
/// image too: it ships the switch, but listens on wifi permanently, so pressing it changes
/// nothing there.
pub switched: bool,
}
+1 -2
View File
@@ -1345,8 +1345,7 @@ enum Command {
/// A shipping image answers ssh on the head's USB-C link only, so `duckctl ssh` over wifi is
/// refused there. This asks `configd`, over the same authenticated Bluetooth session every
/// other command uses, to open port 22 on every interface until the next reboot. Then
/// `duckctl ssh` works. On the dev image it reports `switched: false`: ssh is open there
/// already.
/// `duckctl ssh` works. The dev image listens on wifi already, so there it changes nothing.
SshWifi,
/// Send any method, for whatever is not wrapped above.
Call {