This is an implementation of an ssh client and terminal emulator that runs on a Raspberry Pi Pico 2 W installed in a PicoCalc.
This project is a bit of a toy, but it's a fun one to hack on!
Note
This will only run on an rp2350 that is pin-compatible with the Pico 2W. It requires wifi.
- Connect to wifi
- basic password based ssh auth
- Terminal Emulation
- many escape sequences currently not implemented
- keyboard encoding not yet fully implemented
When it first boots it will need to have wifi credentials configured.
Do this using the config
command, which stores key/value info in
flash, which you should format on first use only:
$ config format
$ config set wifi_ssid YourSSID
$ config set wifi_pw YourPW
$ reboot
Caution
Please note that the config storage is clear-text data held
in a region of the flash memory on the device. If someone
has your device, it is possible to extract any credentials
from it simply by booting it up and running config list
.
When it reboots, it will attempt to connect, DHCP an IP address and sync the time from an NTP server.
At that point you can ssh somewhere:
$ ssh hostname
You will be prompted for the username and password for the remote host.
If you don't like typing those things in, you can save them in the config:
$ config set ssh_user YourUser
$ config set ssh_pw AndPassWord
Caution
Please note that the config storage is clear-text data held
in a region of the flash memory on the device. If someone
has your device, it is possible to extract any credentials
from it simply by booting it up and running config list
.
Show battery charging status and remaining capacity as a percentage.
Show or manipulate the keyboard or lcd backlight
bl kbd PCT
- sets the keyboard backlight level toPCT
percentage. Note that this functionality requires an updated version of the picocalc keyboard MCU firmware to be installed on your device, as many shipped without this functionality. PR How to flash the keyboard MCUbl lcd PCT
- sets the lcd backlight level toPCT
percentage.
Reboot into bootsel mode, to facilitate flashing a new firmware image
Clears the screen
Operates on the config section of flash storage. This is 8KiB in size.
config format
- prepares the flash storage region for first useconfig list
- shows the contents of the config storageconfig get KEY
- shows the value ofKEY
config rm KEY
- marksKEY
as removedconfig set KEY VALUE
- assignsKEY=VALUE
Caution
Please note that the config storage is clear-text data held
in a region of the flash memory on the device. If someone
has your device, it is possible to extract any credentials
from it simply by booting it up and running config list
.
Shows memory usage information
Shows contents of a FAT SD card. This is currently very basic and doesn't support LFN.
Reboot the device
A very simple ssh client
ssh host
- connect to host and start a shellssh host command
- connect to host and run a command
Show the time
You need flip-link
to re-arrange the memory layout:
$ cargo install flip-link
if for some reason this doesn't work out, comment out the linker
line from
.cargo/config.toml
, but note that the estimation of available RAM printed
on boot will be incorrect.