Active Topics

 


Reply
Thread Tools
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#591
Originally Posted by mautz View Post
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 ~]$
 

The Following 2 Users Say Thank You to minimec For This Useful Post:
Posts: 6 | Thanked: 11 times | Joined on Apr 2017
#592
Originally Posted by mautz View Post
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:
 

The Following 2 Users Say Thank You to maidis For This Useful Post:
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#593
@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.
 

The Following 2 Users Say Thank You to mautz For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#594
Originally Posted by minimec View Post
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.
 

The Following User Says Thank You to claustn For This Useful Post:
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#595
@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'
 

The Following 2 Users Say Thank You to minimec For This Useful Post:
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#596
Originally Posted by claustn View Post
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
 

The Following 2 Users Say Thank You to minimec For This Useful Post:
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#597
Originally Posted by minimec View Post
@mautz


And... You need to be 'root' to get some info with 'hcitool'
Ah, not sure if i tried it with root :-D
 

The Following User Says Thank You to mautz For This Useful Post:
Posts: 288 | Thanked: 1,103 times | Joined on Jul 2014
#598
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.
 

The Following 8 Users Say Thank You to nh1402 For This Useful Post:
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#599
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.
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 

The Following User Says Thank You to Bundyo For This Useful Post:
Posts: 9 | Thanked: 12 times | Joined on Aug 2016
#600
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
 

The Following 7 Users Say Thank You to qoh For This Useful Post:
Reply

Tags
hammerhead, nexus5, sailfishos, sfdroid


 
Forum Jump


All times are GMT. The time now is 14:49.