Jolla and SailfishOS

CompanionTOH for Jolla Phone A

2016-08-27 05:06

Working on yet another KeyboardTOH for the Jolla Phone A, I figured, that there are a couple of things that pretty much every TOH might need or some extensions that you might not want to loose, just because you switch TOH.

The first thing, that came to my mind was a Level Shifter, that:

Tossing around a couple of ideas, the CompanionTOH concept was born.

The main purpose of this TOH is to provide a

So far so good!

But: If you clip-on the CompanionTOH only once and than leave it there just (de-)attaching Companions, there are a couple of things you take over the responsibility for.

Usually, if you clip-on a TOH, Jolla's toh-demon

  1. tries to read the NFC tag of TOH

    The NFC tag information are used to look for, download and install TOH specific software from Jolla's Harbour store.

  2. tries to read the content of an I2C EEPROM on 0x50

    The EEPROM can provide additional configuration information and can also be used in an udev script to e.g. start a specific software on the phone, whenever this TOH is clipped-on.

  3. I haven't tried it yet, but from poking around a little I assume that if you de-attach TOH, the toh-demon calls udev again with the right attributes set, to signal the new state.

This behaviour needs to be simulated by the CompanionTOH and the CompanionTOH driver.

Up to now I have worked on:

figuring, that it would be quite useful to have a MCU in the CompanionTOH, that provides a little more "intelligence".

Of course this opens Pandora's box of ideas, what additional value could be build into the CompanionTOH:

but my current favourite is an I2C <-> BLE bridge, since I have not seen an example of Jolla's internal Bluetooth chip working with a BLE device.

So why not use a Cypress BLE PSoC or PRoC module and ...