Author Topic: External screen under sailfish  (Read 6766 times)

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
External screen under sailfish
« on: July 01, 2019, 07:23:44 pm »
So we don't pollute the welcome thread, we can discuss the functionality of the external screen under sailfish here. I am going to investigate the functionality of the current phone gui, and see if it would be easy to insert code in there for the external screen. If any other sailors want to have a go at it as well, put your findings here. If Jolla doesn't have a solution when the cosmo is released, hopefully we will.

Cyril

  • Newbie
  • *
  • Posts: 7
    • View Profile
External screen under sailfish
« Reply #1 on: July 01, 2019, 09:38:36 pm »
Hello Vader,

Thank you for opening this new thread. I'd want to point out that any code written to adapt the front panel to Sailfish will pave the way to any compatibility with Linux as the interface would be the same.

Like I said in my earlier post, the front panel's details are guessing work until any API documentation is released by PC. This guessing, thanks to PC giving the name of the micro-controller, leads me to imagine that the front-panel is treated like a USB device by the Cosmo's OS.

From my other post :
Quote
From week 23 update : "[...] We have also been working on the software interface between the main MediaTek P70 processor and the second processor, the STM32: we have been defining the messages that will be passed from Android or Linux to the second processor and vice versa. Having a separate processor handling the external screen allows uniform interfacing of the second screen to any Operating System that is running on the main Cosmo processor, without needing to modify the second processor firmware. [...]"

So, Sailfish OS applications using C++/Qt/QML, the communication itself could be managed with QSerialPort (I have to check if it's supported on Sailfish's Qt), and the back-end could maybe be shared with Linux.

At a minimum, from the video of the front panel here, the front panel interface ins and outs are :

Ins :
- upper notifications (battery life, network, etc...)
- date
- upcoming alarm
- event notifications (like app notifcations or calls)
- coming phone calls, which means informations  like :
    -- number
    -- caller contact name
    -- caller icon / photo
    -- OUT : accept or declining call from the front panel touchscreen (only guessing here)

Outs :
- from the slide down menu : (00:12)
    -- wifi on / off
    -- WAN network on/off
    -- GPS on/off
    -- bluetooth on/off
    -- do not disturb on/off
    -- energy-saving mode on/off
    -- plane mode on/off
    -- internet sharing on/off

- shortcut menu : (00:26)
    -- (I'm leaving out the camera and video buttons)
    -- call (interface unknown, manual dialling and/or direct contact dialling )
    -- agenda (interface unknown)
    -- microphone / recorder ? (interface unknown)
    -- alarm
    -- flashlight (linked to camera features)
    -- settings (front panel system settings ?)


The security pattern could be internally managed by the front panel system.

I think the whole camera block is still managed by the main OS, but I could be wrong. If so, video stream and photo will somehow have to be sent to the front-panel. The white square at 00:35 could be a result from a not yet implemented photo shot.

The fingerprint reader is obviously independent from the front panel and managed from the OS, or they would use it instead of the security pattern.

At first glance, it may be an overwhelming task to interface the front panel with Sailfish or Linux. Yet, we can start small. We can start with displaying the battery life, for example.

Actually, we don't have to wait for the Cosmo to begin. From the main OS to the front-panel, any signal/information will have to be picked from the main operating system (Sailfish / Linux), then this raw information will have to be transformed so as to be understood by the front panel, and finally this information would be sent to the front-panel interface.
Three basic blocks. We don't know enough from Cosmo to code anything about the last two block (transformation and transmission), but we have all the tools to code the first one (gathering the informations).

I only have the Sailfish OS Emulator from the SDK, but I'm least worried about this OS than with the different Linux distributions and desktop environments. We will surely stick with the official Debian image, but I don't know which DE is better suited. Which DE is the "official" one with PC Gemini ?

I'm still unsure about the existing and running phone capabilities of PC's Debian and I don't have a Gemini to fiddle with it.
Each feature will have to tap into software.
Ex: For contacts : GKA Contacts here

What are your thoughts ?  Any idea or finding ?

Cyril
« Last Edit: July 01, 2019, 09:40:27 pm by Cyril »

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
External screen under sailfish
« Reply #2 on: July 02, 2019, 05:35:11 am »
I would expect either a USB serial (cdc) connection, or I2C. Either way, it should be as simple as opening the device and reading/writing to/from it. I  will see how easy it is to interface to current functionality in sailfish, so that when we work out what the API is we can embed it in the respective files.

I'll see what I can do this weekend.

Cyril

  • Newbie
  • *
  • Posts: 7
    • View Profile
External screen under sailfish
« Reply #3 on: July 02, 2019, 08:19:56 am »
Quote from: vader
I would expect either a USB serial (cdc) connection, or I2C. Either way, it should be as simple as opening the device and reading/writing to/from it. I  will see how easy it is to interface to current functionality in sailfish, so that when we work out what the API is we can embed it in the respective files.

I'll see what I can do this weekend.

I'm a Linux SysAdmin, and I forgot about the simplest way, thank you for reminding me    My mind was on full-Qt mode... No hurry about all that, the Cosmo isn't in our hand yet. Surely you will receive yours before me. Because I chose a French keyboard, it will be the among the last batches to be produced (small number of devices).

I'm looking for how to create a daemon / background service from an app on Sailfish OS

Cyril

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
External screen under sailfish
« Reply #4 on: July 02, 2019, 06:27:34 pm »
Quote from: Cyril
I'm looking for how to create a daemon / background service from an app on Sailfish OS

A lot of the functionality is dbus - might be easier to break in at that point. I'm a linux dev, so between us we should be able to work this out  I live in Oz, and was lucky to get one of the first units as we are close to where they were shipped from. I think mine was serial number 008 from the first production run of geminis.

Sailfish runs systemd, so that would be the logical place to start (I am not a fan of systemd, however it is what we have). Functionality can be extended via patches and are run by PatchManager at boot time, so that may be a better way to do it without messing with the low level stuff. For newbies to sailfish, check out together.jolla.com, or talk.maemo.org, and look at openrepos for patches. I actually do my sailfish development on the gemini. I have a full dev environment with IDE (or I just use vi from the terminal for quick stuff). At home, I just ssh into it so I can use a big screen/keyboard, or just go au naturale and use the device as is.

Cyril

  • Newbie
  • *
  • Posts: 7
    • View Profile
External screen under sailfish
« Reply #5 on: July 03, 2019, 02:44:13 pm »
Thanks for the tips, Vader. I'm already confronted to  systemd on Sailfish. I agree that we have to pump from D-Bus when we can. I'm playing with the rpm package spec to install the *.service file where it will be run at startup. I'm inspired by Sailfish Connect

I see that PatchManager is an OpenRepos app, but I don't yet discern the advantages over crating a normal app. For now, I'm trying to write an app the official way with the Sailfish SDK. A daemon must be launched in the background, and optionally a GUI app for settings.
« Last Edit: July 03, 2019, 02:45:20 pm by Cyril »

Pikku-iikka

  • Newbie
  • *
  • Posts: 41
    • View Profile
External screen under sailfish
« Reply #6 on: July 13, 2019, 06:17:19 am »
Sorry, just found this thread, which seemingly is the right place. Posted this earlier in another thread:

As an everyday Sailfish/Jolla phone user, I just mailed a question (in plain finnish) to Jolla, about their thoughts concerning the Cosmo Communicator, Sailfish OS and CC's second screen. I hope my country fellows will give an answer. Of course, just like Planet Computers, Jolla is a small group of people having their business widely spread now (Russia, South America) and maybe busy....
« Last Edit: July 13, 2019, 06:21:53 am by Pikku-iikka »
Pikku-iikka (alias Little Ike - 194 cm / 130 kg)
Planet Cosmo Communicator
Samsung Note 8, Jolla Phone (Sailfish), Nokia N9 (Meego)
Raspberry Pi 4B / RetroPie setup emulating Amiga.

Pikku-iikka

  • Newbie
  • *
  • Posts: 41
    • View Profile
External screen under sailfish
« Reply #7 on: August 19, 2019, 12:22:53 am »
Quote from: Pikku-iikka
Sorry, just found this thread, which seemingly is the right place. Posted this earlier in another thread:

As an everyday Sailfish/Jolla phone user, I just mailed a question (in plain finnish) to Jolla, about their thoughts concerning the Cosmo Communicator, Sailfish OS and CC's second screen. I hope my country fellows will give an answer. Of course, just like Planet Computers, Jolla is a small group of people having their business widely spread now (Russia, South America) and maybe busy....

So, it was a holiday time in Finland. At august 9th, I got this reply from Jolla Team:

"Hei!

Kiitos mielenkiinnostasi Sailfish OS:n sovelluskohteiden suhteen!

Pahoittelut viiveestä vastauksessa.
Valitettavasti meillä ei ole tässä vaiheessa tiedotettavaa Cosmo Communicatorin kehityshankkeeseen liittyen.
Näin ollen voimme vain pyytää seuraamaan tiedotustamme: https://blog.jolla.com/ sekä osallistumaan keskusteluun mm. täällä: https://together.jolla.com/question/128326/...otes&page=1

Kiitos!
Jolla Team"

... which in English says this:

"Hello!

Thank you for your interest in Sailfish OS Applications!

Sorry for the delay in your response.
Unfortunately, we have no information at this stage on the Cosmo Communicator development project.
We can only ask you to follow our information on https://blog.jolla.com/ and to participate in discussions here: https://together.jolla.com/question/128326/...otes&page=1

Thank You!
Jolla Team"


-iikka
Pikku-iikka (alias Little Ike - 194 cm / 130 kg)
Planet Cosmo Communicator
Samsung Note 8, Jolla Phone (Sailfish), Nokia N9 (Meego)
Raspberry Pi 4B / RetroPie setup emulating Amiga.

Cyril

  • Newbie
  • *
  • Posts: 7
    • View Profile
External screen under sailfish
« Reply #8 on: September 13, 2019, 06:24:51 am »
Hello Pikku-iikka,

Thank you for sharing ! I'm not surprised with their answer. As the Cosmo isn't out yet, it would be difficult to anyone to begin to port Sailfish on it, doesn't it ? The focus of PC is on Android, which will be used by 99% of the user base.

I decided to wait for my Cosmo before commiting on interfacing Sailfish and the font screen.

Kind regards,
Cyril