maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview (https://talk.maemo.org/showthread.php?t=96932)

minimec 2017-04-09 20:54

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1526620)
Minimecs bt script isn't working on cm13 port at the moment, because hcitool doesn't show any connections when it is connected to a bt speaker, so it quits the connection after 120 seconds. Minimec could you check this on cm13?

Hi Mautz. I passed some tests with the cm13 build. Works as expected here. I used version: 0.3 of my script (link in the post above.). Could it be that we got a bug when removing the 'log function' in the version you have on git? Maybe somehow your speaker lost connection with the phone?

I will do another test tomorrow in my car.

Code:

,---
| SailfishOS 2.0.5.6 (Haapajoki) (armv7hl)
'---
[nemo@Sailfish ~]$ getprop ro.build.version.release
6.0.1
[nemo@Sailfish ~]$ devel-su
Password:
[root@Sailfish nemo]# ./bt-sleep-monitor.sh &
[1] 11276
[root@Sailfish nemo]# exit
[nemo@Sailfish ~]$ tail -f /dev/shm/bt-sleep-monitor.log
Sun Apr  9 22:21:31 CEST 2017: Log started
Sun Apr  9 22:21:31 CEST 2017: Set 'lpm=1' as default
Sun Apr  9 22:21:31 CEST 2017: Bluetooth disabled (starting bluetooth listener)
Sun Apr  9 22:22:11 CEST 2017: Action 'bluetooth on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:24:11 CEST 2017: Device connected (listening for 'disconnect')
Sun Apr  9 22:24:24 CEST 2017: Device disconnected (set 'lpm=1')
Sun Apr  9 22:24:24 CEST 2017: Bluetooth enabled (starting 'display on' listener)
Sun Apr  9 22:24:42 CEST 2017: Action 'display on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:26:42 CEST 2017: Device connected (listening for 'disconnect')
Sun Apr  9 22:27:01 CEST 2017: Device disconnected (set 'lpm=1')
Sun Apr  9 22:27:02 CEST 2017: Bluetooth disabled (starting bluetooth listener)
Sun Apr  9 22:27:41 CEST 2017: Action 'bluetooth on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:29:41 CEST 2017: No connection after 120 seconds (set 'lpm=1')
Sun Apr  9 22:29:41 CEST 2017: Bluetooth enabled (starting 'display on' listener)
Sun Apr  9 22:30:22 CEST 2017: Action 'display on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:32:22 CEST 2017: No connection after 120 seconds (set 'lpm=1')
Sun Apr  9 22:32:22 CEST 2017: Bluetooth disabled (starting bluetooth listener)
Sun Apr  9 22:32:36 CEST 2017: Action 'bluetooth on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:34:36 CEST 2017: Device connected (listening for 'disconnect')
Sun Apr  9 22:35:34 CEST 2017: Device disconnected (set 'lpm=1')
Sun Apr  9 22:35:34 CEST 2017: Bluetooth enabled (starting 'display on' listener)
Sun Apr  9 22:35:46 CEST 2017: Action 'display on' (set 'lpm=0' for 120 seconds)
Sun Apr  9 22:37:46 CEST 2017: Device connected (listening for 'disconnect')
Sun Apr  9 22:38:09 CEST 2017: Device disconnected (set 'lpm=1')
Sun Apr  9 22:38:09 CEST 2017: Bluetooth enabled (starting 'display on' listener)
Sun Apr  9 22:38:14 CEST 2017: Action 'display on' (set 'lpm=0' for 120 seconds)
^C
[nemo@Sailfish ~]$


maidis 2017-04-09 21:01

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1526659)
My custom kernel has double tap to wake feature, but since this is not an original feature of the Nexus5 it will cause a massive battery drain.

Better use the fake dt2w with LPM mode.

Thanks for the info. I got my wish. A few links to make it easier for newbies like me:

mautz 2017-04-09 21:11

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
@minimec

I'll test with 0.3 version of your script in the next days, i have no bt hardware here since i am not at home at the moment, i'll report back. Have you tested the connection for more than 120 seconds and do you get any output when you are connected with hcitool?

Thanks!

@maidis

Code:

ssu ar mer-tools
pkcon refresh
pkcon install mce-tools
mcetool --set-low-power-mode=disabled
mcetool --set-lpmui-triggering=from-pocket,hover-over
mcetool --set-low-power-mode=enabled

in terminal will do the same.

claustn 2017-04-09 21:20

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by minimec (Post 1526698)
If you don't start the 'bt-sleep-monitor.sh' script in some startup script or systemd service, you have to start it manually. (I pretend that the script is in the /home/nemo folder)

Code:

chmod +x bt-sleep-monitor.sh  # Needed only once
devel-su
./bt-sleep-monitor.sh &
exit


Thank you minimec.
It works! I had tried to execute the script file with the command:
sh filename.sh
but it wasn't the correct way.

How to run the script at startup now? I'm trying to understand how systemd works but I'm not sure yet.

minimec 2017-04-09 22:34

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
@mautz

Yes I tested more than 120 seconds, sometimes even listening to some music.

In the script I check for an existing connection with this 'if' statement
Code:

if  [ "$(hcitool con | grep \>)" == "" ] ; then
...

I I do the 'hcitool' command in the terminal with an existing connection, I get ...
Code:

[root@Sailfish nemo]# hcitool con | grep \>
        > ACL 00:0D:44:AD:FF:E1 handle 11 state 1 lm MASTER AUTH ENCRYPT

And... You need to be 'root' to get some info with 'hcitool' ;)

minimec 2017-04-09 23:00

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by claustn (Post 1526710)
How to run the script at startup now? I'm trying to understand how systemd works but I'm not sure yet.

I created a systemd service that I use for all my 'tuning' during boot. The initial post can be found here...

With this you should be able to create your own service. The actual script would then look something like this...

Code:

#!/bin/bash

## bt-sleep-monitor service script

start() {
    /home/nemo/bt-sleep-monitor.sh &
}

stop() {
    killall bt-sleep-monitor.sh dbus-monitor
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        sleep 1
        start
        ;;
    *) exit 1
esac


mautz 2017-04-10 06:07

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by minimec (Post 1526711)
@mautz


And... You need to be 'root' to get some info with 'hcitool' ;)

Ah, not sure if i tried it with root :-D

nh1402 2017-04-12 19:17

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Yes I'm aware of Anbox, yes I'm looking into it, I'll be getting the sources and playing with it as soon as I get my dev machine sorted.

Bundyo 2017-04-16 08:00

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
There is an other OSes PR that mentions SFOS:
https://github.com/anbox/anbox/pull/29

Though I couldn't find an Android image for ARM.

qoh 2017-04-19 12:37

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I've followed the entire thread. The amount of information is overwhelming.

Could we arrange to update the wiki?

Maybe someone can post links to the exact posts that handle certain parts of the install, and we compile them together.

What comes to my mind right now:
  • what to download & where
  • how to install (in multirom; how to skip tutorial)
  • how to apply all the fixes
  • all required workarounds (like 4-finger touch)
  • how to configure undervolting (including lowest voltages known to work)
  • screen wake up (lpm)
  • aliendalvik
  • anything else I might have overlooked


All times are GMT. The time now is 21:59.

vBulletin® Version 3.8.8