maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Situations app - bugs, questions, answers, help etc.. (https://talk.maemo.org/showthread.php?t=94442)

rob_kouw 2019-09-23 18:19

Re: Situations app - bugs, questions, answers, help etc..
 
After reading these new developments, I decided to install Sonar and the new Situations. Great that this wonderful app becomes useful again!

I'm happy with it in daily use, and yet there are some observations:
1. Not all the What are eligible at all times. For setting the Location settings, I have to start with a proper example.
2. When - it won't register cell towers.
3. It seems my phone (XA2) has become more unstable than before.

I'll try to register specific issues. Many thanks anyway, hhaveri!

hhaveri 2019-09-29 07:05

Re: Situations app - bugs, questions, answers, help etc..
 
Thanks, not sure if I understood the 1st point, though. If I remember correctly, 2nd one was due to something being different in the platform implementation for XA2. No idea what could cause no.3.

Anyway, I'll try to have a look at all reported issues. Lately I've had some difficulties to find time to "finalize" the sonar stuff - mostly on situations side. Hopefully within a couple weeks...

Br,
Heikki

crun 2019-09-29 21:33

Re: Situations app - bugs, questions, answers, help etc..
 
I am looking to send SMS automatically (without manual intervention) from FindMyJolla and GPSInfo.

I am expecting that I will hit a permissions problem**, and your daemon might be the answer.

Should I be making my own functional daemon to do my task for each app, or would it be better to use yours?

If "use situations daemon", then would you think it best to add the functionality to your daemon or would it just give me a privileged commandline to send any command to?


Any suggestions on how to do the send welcome.
To be specific,
1) it must send when phone is unattended.
2) it does not need to do it invisibly or in secret.

** Yup indeed I do get access denied as they say at the bottom of this sending-an-sms-via-the-command-line

Code:

[nemo@Sailfish ~]$ dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.MessageManager.SendMessage string:"+123456789" string:"test sms"
Error org.ofono.Error.AccessDenied: Operation not permitted

further: it does work if I login to root with devel-su then try it.

hhaveri 2019-10-02 14:20

Re: Situations app - bugs, questions, answers, help etc..
 
Quote:

Originally Posted by crun (Post 1560669)
Should I be making my own functional daemon to do my task for each app, or would it be better to use yours?

I think you should make your own daemon(s). Sonar is not supposed to be a general purpose component. Instead I'm putting reasonable effort to keep it Situations only to minimize unwanted exposure of personal data & otherwise restricted APIs.

Br,
Heikki

Halftux 2019-10-02 16:36

Re: Situations app - bugs, questions, answers, help etc..
 
Quote:

Originally Posted by crun (Post 1560669)
I am looking to send SMS automatically (without manual intervention) from FindMyJolla and GPSInfo.

I am expecting that I will hit a permissions problem

I don't know if it helps, I uploaded a binary which userid is set to zero and it is calling this sms dbus command. This binary can be executed by a user (smssend).

crun 2019-10-03 11:15

Re: Situations app - bugs, questions, answers, help etc..
 
Thanks, I'll try it on the next go round.
Current problem: I don't get the phone number of incoming sms....

Halftux 2019-10-03 11:39

Re: Situations app - bugs, questions, answers, help etc..
 
Quote:

Originally Posted by crun (Post 1560809)
Thanks, I'll try it on the next go round.
Current problem: I don't get the phone number of incoming sms....

What method are you trying to get the phone number?

On the same dbus service there is a IncomingMessage signal and a GetMessages method. But don't know if there can deliver the number.


Maybe it is also worth to look here:

https://sailfishos.org/wiki/Telephony
https://sailfishos.org/wiki/Messaging

telepathy-ring
telepathy-qt
libqofono

crun 2019-10-04 09:32

Re: Situations app - bugs, questions, answers, help etc..
 
It uses this DBUS channel.

Code:

#define DBUS_INTERFACE "org.freedesktop.Telepathy.Channel.Interface.Messages"

#define DBUS_MEMBER_NAME "MessageReceived"

    if (!sessionBus.connect("", "", DBUS_INTERFACE, DBUS_MEMBER_NAME, this, SLOT(dbusMessageReceived(const QDBusMessage &)))) {

which returns data thus:

https://together.jolla.com/question/...pathy-message/

sender-identity is IMSI not MSISDN (phone number)

Halftux 2019-10-04 18:01

Re: Situations app - bugs, questions, answers, help etc..
 
1 Attachment(s)
@crun ok I could seperate the phone number with dbus service org.ofono.MessageManager. Listening on signal IncomingMessage (service: org.ofono, path: /ril_0, interface: org.ofono.MessageManager). There you get a variant map [string, variant]. The second key is "Sender" where its variant holds the number.

I attach a deb which I used for listening on ImmediateMessage, IncomingMessage and MessageAdded. But for me only IncomingMessage got triggerd. It has some debug messages and in the end it prints to stdout the number. You can quit with x+enter.

EDIT: lol wrong slot, IncomingMessage got triggerd not Immediate, fixed it.

Halftux 2019-10-04 22:51

Re: Situations app - bugs, questions, answers, help etc..
 
@crun I uploaded a code example
https://github.com/halftux/smsrun/bl...src/smsrun.cpp


All times are GMT. The time now is 09:28.

vBulletin® Version 3.8.8