Pinetime Smartwatch Setup Guide

Setup Guide for PineTime on Librem 5

Introduction to PineTime

I have been using the Librem 5 (L5) with a PineTime for about 4 months at the time of writing. It functions as a good, cheap companion for those with low expectations for a smartwatch. It can tell the time, show you notifications, and start a timer, everything else is something that falls into the “oh neat” category for me.

The battery life on the watch has been great and regularly exceeds its rated 1 week life. The max brightness setting is enough for glaring sunlight. Connection range is about 3 meters with no obstructions, and it will connect from pocket to wrist. However I do find the connection to be prone to dropped packets and occasion reconnects if my L5 is in the opposite pocket of my wrist.

Bluetooth Setup

The PineTime uses Bluetooth 5 in Low Energy mode, abbreviated “BLE”. The RS9116 chip on the L5 claims to support this mode, but a few steps are necessary to enable it. The following procedure is what worked for me and my devices, but they are known good working on PureOS Byzantium updated on the date of this post.

Upgrading RS9116 Firmware

This step may or may not be necessary, but I do not want to downgrade firmware versions to test older versions. You can check which version of the firmware you have by running,

sudo dmesg | grep redpine

and you should expect to see something similar to this,

redpine_91x: ================ RSI Version Info ==============
redpine_91x: ================================================
redpine_91x: FW Version	: 1.2.0.16
redpine_91x: RSI FW Version	:  1610.1.2.ab.ffbf
redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
redpine_91x: Operating mode	: 13 [Wi-Fi STA + BT DUAL]
redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
redpine_91x: ================================================

in the output.

Currently the latest firmware is nonfree, but that is only because of a possible mistake on Redpine’s part. The instructions to update are hosted here

sudo apt install wget
wget https://source.puri.sm/Librem5/firmware-rs9116-nonfree/-/raw/debian/master/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps
sudo mv RS9116_NLINK_WLAN_BT_IMAGE.rps /lib/firmware

And then restart the phone. After running

sudo dmesg | grep redpine

you should see,

redpine_91x: ================================================
redpine_91x: ================ RSI Version Info ==============
redpine_91x: ================================================
redpine_91x: FW Version	: 1.2.0.16
redpine_91x: RSI FW Version	:  1610.1.2.ab.ffbf
redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
redpine_91x: Operating mode	: 13 [Wi-Fi STA + BT DUAL]
redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
redpine_91x: ================================================

in the output. If Operating mode isn’t 13, that’s fine, we’ll fix that in the next step.

Changing the Operating Mode to 13

While troubleshooting connecting my PineTime I got inspiration from this post to attempt to change the operating mode so BLE would work.

In order to change the operating mode you’ll need to edit a file. If you don’t have a preferred text editor, then the following command will open the file in a GUI text editor,

SUDO_EDITOR=gedit sudoedit /etc/modprobe.d/librem5-devkit.conf

Inside of the file you should see a line like this,

options redpine_91x dev_oper_mode=7 rsi_zone_enabled=1 antenna_diversity=1 wlan_rf_power_mode=0x00

Note that this has redpine_91x in it. Inside of this line change dev_oper_mode= from it’s current value (7 in this example) to 13. Save and then exit your text editor.

In order to enact these changes you’ll need to either flip your HKS for Wifi and reload the modules, or just restart your phone.

Installing InfiniTime Daemon

InfiniTime Daemon is the program that will be run in the background to connect with and sync notification to your PineTime. It can also be used to upgrade your PineTime watch.

In order to install first download the debian release that from the Release Page to your L5. You should download the latest stable release, and the file you are looking for ends with -aarch64.deb For example the latest version of writing is itd-0.0.8-linux-aarch64.deb.

Then you’ll want to install that file, which is typically

sudo apt install ~/Downloads/itd-0.0.8-linux-aarch64.deb

Installing the InfiniTime GUI

This part is optional, but a nice to have.

sudo apt install gcc libgl1-mesa-dev xorg-dev git
sudo rm -rf /usr/local/go
wget https://go.dev/dl/go1.19.2.linux-arm64.tar.gz
sudo tar -C /usr/local -xzf go1.19.2.linux-arm64.tar.gz
export PATH=/usr/local/go/bin:$PATH
git clone https://gitea.arsenm.dev/Arsen6331/itd
cd itd
go build ./cmd/itgui

Then to make it a desktop icon

mkdir -p ~/.local/bin/
cp itgui ~/.local/bin/
echo 'export PATH=${HOME}/.local/bin:${PATH}' >> ~/.bashrc

Then you’ll need to log out and back in (restart your phone) for the PATH setting to take effect. Finally create the file
~/.local/share/applications/itd_gui.desktop

with the contents,

[Desktop Entry]
Name=PineTime
Type=Application
Icon=pda
Exec=itgui
Categories=Utility;
X-Purism-FormFactor=Workstation;Mobile;

Connecting to the PineTime

Ensure your PineTime watch is powered on and in range. Next open the L5’s Bluetooth settings. Enable Bluetooth, then wait for the InfiniTime to show up. If it shows up as “Disconnected” rather than “Not Set Up”, click on it and “Remove Device”. Do not click on the InfiniTime device to manually pair it. InifiniTime Daemon will automatically connect it for you.

Next you should enable and start InfiniTime Daemon. After running this command it will always be running in the background, even after restarts.

systemctl --user start itd
systemctl --user enable itd

You should be prompted to enter the PIN displayed on your watch to pair the devices.

At this point your watch should be paired, which will mean

  • The time is correct (or at least the same as your L5)
  • A Bluetooth icon has appeared on the watch face (maybe not all of them)
  • A notification should appear saying “Successfully Connected”

Upgrading your PineTime Firmware

With the latest release of PineTime, a “resources” packet is part of the process. Currently the GUI does not support this yet, so I recommend using the command line to update, at least until the GUI gets support for it.

You should download the latest release from the InifiniTime releases page.
You want both .zip files, infinitime-resources-*.*.*.zip and pinetime-mcuboot-app-dfu-*.*.*.zip

At this point I recommend keeping your L5 fairly close your PineTime, which should be on its charger. Then run, substituting the latest version number, if yours is different.

itctl fw upg -a ~/Downloads/pinetime-mcuboot-app-dfu-1.11.0.zip -r ~/Downloads/infinitime-resources-1.11.0.zip

This may take awhile, and the command may look initially hung. Give it some time. If it fails, it was likely just a dropped packet or incorrect checksum, so just try it again a few times before asking for help.

After the firmware update succeed the watch will reboot, then you’ll have to
re-pair. This involves removing the old InfiniTime entry from your Bluetooth
Settings and waiting for InifiniTime Daemon to reconnect to it. If the daemon
doesn’t initiate the reconnection, you can run the following to restart it,

systemctl --user restart itd

If the resource don’t load correctly (some watch faces are greyed out), then
you can run the following to try them again,

itctl res load ~/Downloads/infinitime-resources-1.11.0.zip

Although currently there might be an issue.

Staying Connected to the Pinetime

One of the problems I encounter with InfiniTime Daemon is that it gives up on
reconnecting quite quickly.

I believe the default is to just try once every minute for five minutes after a disconnect or after Bluetooth connection is restored. This is likely to save on battery from not reconnecting.

In order to get it going again, if you miss the five minute window is to either
flip the hardware kill switch off/on, or run the previously mentioned,

systemctl --user restart itd

However neither method is great.
My solution was to create an app icon, which just runs the latter command.

First create a local bin folder,

mkdir -p ~/.local/bin

Then add it to your PATH, you can skip this step if you already did it for the GUI

echo 'export PATH=${HOME}/.local/bin:${PATH}' >> ~/.bashrc

Next create the file,
~/.local/bin/reconnect-pinetime
with the following contents

#!/bin/bash
systemctl --user restart itd

Then set its permissions

chmod 0755 ~/.local/bin/reconnect-pinetime

Finally create a desktop file
~/.local/share/applications/reconnect_pinetime.desktop

with the following contents,

[Desktop Entry]
Name=Reconnect Pinetime
Type=Application
Icon=mail-send-receive-symbolic
Exec=reconnect-pinetime
Categories=Utility;
X-Purism-FormFactor=Workstation;Mobile;

Then you’ll need to log out and back in (restart your phone) for the PATH setting to take effect.

Now you’ll just be able to click the Icon to reconnect to your PineTime.

24 Likes

Cool and very detailed tutorial, thanks!

However, wouldn’t Siglo be a good alternative for the daemon/GUI part?

Thanks for this! I’ve had the PineTime for about a month now and eagerly awaiting my L5 so I can use the two together. The watch has worked out well so far, but looking forward to more degrees of integration than I can currently get pairing it with my iPhone.

@mathemagician Is this PineTime worth it? If you don’t mind sharing a review of the past month you’ve had it.

I was looking out for a Linux Smartwatch.

The Link on that pine shop is broken. Here you find the working overview:

https://pine64.com/product-category/pinetime-smartwatch/

Not sure if i can order this from Europe but it look cheap enough to order a sealed one and an open devkit too. Na i wait a bit longer have less time right now for this.

For the $20-something I paid for it (plus the hefty delivery fee for shipment from China), I think it’s been alright. Until I get the L5, I’ve been using a hand-me-down iPhone, and the integration that is currently supported is pretty minimal. I can push firmware updates and get my steps displayed on the iPhone, but I can’t get phone notifications or control music. So, if you intend on pairing with an iPhone, I’d suggest passing on it for now unless your needs/desires are minimal. It seems like there’s much better integration pairing with Android, if you, like me, are waiting for an L5 or other Linux phone.

I did install the itd daemon on my L13 without too much issue and was able to pair it successfully, upgrade the firmware immediately, and receive notifications from the laptop, but the watch and the laptop seemed to require constant pairing, even with me sitting right next to the laptop. It got to be enough of a nuisance that I turned off itd. I have not yet revisited it. I would like to try Siglo, but the version of meson that I get from the repo is less than what the project requires (0.49.2 vs 0.55.0). I just haven’t had the time (or sufficient motivation yet) to get the latest build.

Regarding the watch itself, it does the basics fine. The pedometer will flag steps that aren’t really steps based on the motion of my wrist when I do things like opening a pill bottle. I assume other watches might fall victim to that. I’ve messed around with the heart rate monitor, and I think that works fine. The interface and swiping has worked well, and the size of the display seems fine. The wrist strap has been decent, considering the price paid. Battery life has been ok…I don’t think I’ve gotten a week’s worth of charge, but it’s been close, maybe every 5-6 days I would put it in the charger, but I’d be lying if I said I was tracking that rigorously.

All in all, I don’t regret getting it (if for no other reason to avoid pulling out my phone to check the time), but having the L5 with itd working on it is what I really envision making it worthwhile.

I hope that helps!

4 Likes

Worked without issues for me!

1 Like

Siglo is a good alternative for the GUI. It seems to be more adaptively designed.

I had used it before when I first got the PineTime to update the firmware, because it was more reliable than ITD for that at the time. However I only ran it on my laptop because the flatpak wasn’t built for arm64 at the time, and it wasn’t easy to build on the L5 for whatever reason I don’t remember. Also the flatpak still doesn’t do SMS notifications.

Maybe I’ll revisit it and build it for the L5, since I agree it is a superior GUI.

Thanks for this @spk44 I’ve been using siglo, but have been wanting to try out itgui :). I think the navigation app is supposed to work with it. (Or will be… where is that darn link…)

edit - Got it connected :). Oddly I can’t use Siglo now. I wonder why. I kind of figured both would work. :thinking:

Great guide! Thanks a lot.
This came right on time with me trying to make this combo work a few days before
and just when itd and infinitime released new versions. (just hitting that itd resources
upload issue too which seems fixed on the dev tree now).
Pinetime is a great piece of hardware. I ordered it from France and it came from China.
Great value for the price (26$+shipping/taxes). Battery lasts a week for my usage,
probably half less with BLE enabled.
Software is already very good and I can’t imagine what it will become with time.
All I wanted : not expensive, pretty well build (so far), data kept locally, community
based, enough battery. I didn’t test it extensively with the librem 5 as I’m only using
messages notifications. Answering calls works, but I don’t know if refusing fails at it
was on the pinephone.

I’m not the OP. If the Pinetime is worth it is entirely up to your expectations. I’ve received mine five days ago (EU store, 16 days between order and delivery) and am very pleased. It is pretty small and the OS Infinitime is responsive. I’ve since replaced the 20mm band with a metal one and fitted a glass screen protector for a Fitbit Versa which fits quite nice.

The Pinetime is extremely limited compared to the Garmin Lily of my wife: it receives notifications from Gadgetbridge on Android (need to connect it to Linux still), has a heart rate monitor that only registers when the display is on, an alarm and some other small features I’ve not used yet. There is no history at all with Gadgetbridge it seems. Battery life seems to be about four to five days.

I’ve bought it for receiving notifications from the Librem 5 (expecting mine in december).

2 Likes

Just discovered that Gadgetbridge actually stores activity (steps) and sleep.

1 Like

I am not sure to buy. Cause it did not run Linux - for good reasons.

The pro ones are a cheap price and a programmable watch. Today i do not need one. But i think about coding Apps for this and it seems to be a fine price for the development kid and a sealed clock. Even if there are nearly no Apps for it. However the Hardware looks a bit … conservative.

I am not sure why i should have that smart clock, for my luxury Linux Smartphone.

@ookhoi I think there’s a new infinitime update that helps it look much better.

1 Like

I’ve updated to 1.11 the day my Pinetime arrived :slight_smile:

@spk44 Thanks for writing up these instructions for the L5. Now I want to order a PineTime!

Small nitpick. The firmware for the Silicon Labs RS9116 WiFi/BT is proprietary and only provided as binaries. The bug report that you linked to is to change the license in the headers of the code files for the RS0116’s rsi driver (not the firmware). Currently the source code for the driver files (e.g. rsi/rsi_91x_main.c) have this header:

*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/

But three of the source code files also contain this macro code to insert a dual BSD/GPL license, and the GPL isn’t compatible with the Silicon Labs Master Software License Agreement.

MODULE_LICENSE("Dual BSD/GPL");

Thank you for clarifying that, it makes a lot of sense now.

I’ll offer this as well post-1.11 upgrade that the new watch faces are pretty nice and I believe I am getting more battery life than I observed before.

For anyone using itd, upgrade to a new 0.0.9 release before you apply the resource file that enables the new watch faces.

1 Like

I’m having ann issue detecting my Pinetime from my Librem5’s bluetooth. I have also been unable to detect the Pinetime from other devices I have like an iPhone.

I’ve followed the steps in the guide, installed itd and upgraded the RS firmware etc but at “Ensure your PineTime watch is powered on and in range. Next open the L5’s Bluetooth settings. Enable Bluetooth, then wait for the InfiniTime to show up.” the watch just never shows up in my Bluetooth visible devices.

I’m looking for it under settings -> Bluetooth. Should I be looking somewhere else?

Is there an obvious step I am missing? Also I don’t know a great deal about blue tooth, is there instructions somewhere on how to troubleshoot detection issues with the Pinetime?

Did you check to see if Bluetooth is enabled in the PineTime’s settings?