-
Notifications
You must be signed in to change notification settings - Fork 32
Using Tuhi
This is a quickstart to get you up and running with Tuhi. For details, see the Terminology page.
Tuhi is a DBus session daemon. From the git repository, simply start with:
$ ./tuhi.py
If you have installed Tuhi, start it with tuhi
from your favorite shell.
kete
is the commandline tool to interact with Tuhi featuring an interactive shell. kete
is currently on available in the git repository and does not get installed. A graphical UI to Tuhi is in the works.
The above process of registering a device is as follows:
$ ./tools/kete.py
Tuhi shell control
INFO: Connected to the Tuhi daemon
tuhi> search
INFO: Search started
tuhi>
Now hold the device button until the blue light starts flashing and you'll see:
INFO: Unregistered device: DC:2C:26:A0:C9:A8 - LE Paper
tuhi>
Register the device with the Bluetooth address (tab-completion is available)
INFO: Unregistered device: DC:2C:26:A0:C9:A8 - LE Paper
tuhi> register DC:2C:26:A0:C9:A8
INFO: DC:2C:26:A0:C9:A8 - LE Paper: Press button on device now
Press the device button when prompted.
INFO: DC:2C:26:A0:C9:A8 - LE Paper: Press button on device now
INFO: DC:2C:26:A0:C9:A8 - LE Paper: Registration successful
And done. The device is now available in Tuhi.
The info
command shows some basic data of the device, including which drawings are available. The listen
command starts to listen for new data on the device. To get the device to connect, press its button. This is usually only needed once, the device stays connected while Tuhi is running and listening and Tuhi will keep downloading data as it is made available by the device.
tuhi> info DC:2C:26:A0:C9:A8
DC:2C:26:A0:C9:A8 - LE Paper
Battery level: 78%, discharging
Available drawings:
* 1518566232: drawn on the 2018-02-14 at 09:57
* 1518570062: drawn on the 2018-02-14 at 11:01
tuhi> listen DC:2C:26:A0:C9:A8
[...]
tuhi> listen DC:2C:26:A0:C9:A8 off
To download a drawing, use the fetch
command, either with the drawing's identifier or the all
keyword:
tuhi> fetch DC:2C:26:A0:C9:A8 1518566232
INFO: LE Paper: saved file "LE Paper-2018-02-14-09-57.svg"
tuhi> fetch DC:2C:26:A0:C9:A8 all
INFO: LE Paper: saved file "LE Paper-2019-07-15-16-44.svg"
INFO: LE Paper: saved file "LE Paper-2019-07-15-16-45.svg"
...
And the SVG file will be available in your $PWD
.