Power the watch on, off or through a cycle, or measure the current it draws, with the supply the lab (see pbl lab) wires to its battery terminals.
pbl power on --voltage 3800
pbl run --resources
pbl power measure --seconds 30
pbl power start --name sync
# ... anything else: pbl console, an app on the phone, ...
pbl power stop --save results
pbl power off
on (and cycle) start a background process that holds the supply until
off: some supplies, the PPK2 among them, cut the power when their port
closes. Every other pbl power command talks to that process, so the
watch stays powered in between, and any other command runs meanwhile.
status shows whether it runs, the voltage and any measurement under way.
Its log is next to the locks (see Locks).
The supply is the one of the lab’s watch for the build, the one of the
watch given with --watch, or the one given with --supply. --voltage
sets what it supplies; without it the supply keeps its voltage.
measure measures for --seconds and prints the mean, maximum and 99th
percentile of the current. start and stop measure everything in
between instead, across other commands. --json prints the whole
summary, and --save DIR writes it as <name>.json, along with
<name>.csv (1 ms means). Only supplies that sample the current can
measure. A measurement is kept in memory until it stops: about 24 MB a
minute with a PPK2.
The background process holds the supply’s lock, so an pbl itest session
on the watch fails right away, naming it, until pbl power off.
Type |
Supply |
Measures |
|---|---|---|
|
Nordic Power Profiler Kit II, in source-meter mode |
yes |
A supply type is a module of pbl.power implementing
pbl.power.Supply, registered in pbl.power.TYPES; lab files,
pbl power and the integration tests take any registered type.
pbl power [-h] [-b DIR] [--dry-run] [--lab FILE] [--watch NAME]
[--supply NAME] [--voltage MV] [--off-time S] [--seconds S]
[--name NAME] [--save DIR] [--json]
{on,off,cycle,status,measure,start,stop}
{on,off,cycle,status,measure,start,stop}on, off, cycle; status; measure for –seconds, or start and stop a measurement around other work
--supply NAMEThe lab’s supply to use (default: the watch’s)
--voltage MVVoltage to supply, in millivolts (default: leave it as is)
--off-time SHow long cycle leaves the watch off (default: 1.0 s)
--seconds SHow long measure measures (default: 10.0 s)
--name NAMEName of the measurement, and of its saved files
--save DIRSave the measurement in DIR: a JSON summary and a CSV of 1 ms means
--jsonPrint JSON
Generated from PebbleOS 75673c495. This page is maintained in the pebbleos repository: docs/pbl/power.md.