-
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 section below.
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
.
Wacom Ink devices are Bluetooth LE devices and all communication is wireless. Tuhi uses a number of specific terms to interact with those devices:
-
Searching
means Tuhi is looking for new devices (i.e. those not previously connected with Tuhi) -
Registering
means Tuhi connects to a new device for the first time. -
Listening
means Tuhi is listening to data from a registered device.
These three terms reflect some of the user interaction with the device. The actual download of data is handled automatically while Tuhi is listening to a device.
Wacom Ink devices can only be associated with one application at a time. If you are using e.g. Wacom Inkspace, you cannot use Tuhi at the same time (and vice versa). You will need to re-register
the device every time you switch between applications.
When Searching
, Tuhi identifies any Bluetooth LE devices within range of the host system. Devices that match the supported devices will be made available to register.
For a device to be identified during Searching
, hold the device's button until the blue light blinks.
When Registering
a device, Tuhi picks a randomly-generated UUID and sends that to the tablet. Future communication with the tablet needs to include that UUID. This is not registering the device with some cloud service, vendor, or other service. It is communication between Tuhi and the firmware on the device. It is merely a process of "your ID is now $foo" followed by "hi $foo, I want to connect".
Unlike other Bluetooth devices, Tuhi-compatible devices do not need to be "paired". Hence the choice of the term Register
.
For a device to be able to register, hold the device's button until the blue light blinks and make sure Tuhi is Searching
. During Register
, you will need to press the device's button when prompted.
Once a device has been registered with Tuhi, you can start and stop Listening
to the device. While listening, Tuhi will download any drawings from that device in the background and make those drawings available through the DBus interface.