maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] The One Ring (https://talk.maemo.org/showthread.php?t=41817)

epage 2010-10-05 17:34

Re: [Announce] The One Ring
 
Quote:

Originally Posted by wakkamis (Post 833989)
Haha. Thanks for pointing that out. I read them but i guess i just didnt "get" them.

I'm in the same boat...

xur17 2010-10-08 23:46

Re: [Announce] The One Ring
 
I posted a request for a command line utility to send and receive manually as a bug. Is this the correct spot to post this?

I am working on a solution to push a request to my n900 to check for new messages whenever I receive a sms message. I just need a script that will force my device to check for new sms messages.

Is the reset_state_machine debug command only supposed to reset the countdown? When I run that command, it appears to set the countdown to ~20seconds, so there is a delay before I receive any new messages. Is there any command that will force an immediate check?

epage 2010-10-09 11:55

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 836845)
I posted a request for a command line utility to send and receive manually as a bug. Is this the correct spot to post this?

Yes, I just switched the priority to Enhancement.

Quote:

Originally Posted by xur17 (Post 836845)
I am working on a solution to push a request to my n900 to check for new messages whenever I receive a sms message. I just need a script that will force my device to check for new sms messages.

Is the reset_state_machine debug command only supposed to reset the countdown? When I run that command, it appears to set the countdown to ~20seconds, so there is a delay before I receive any new messages. Is there any command that will force an immediate check?

As part of the feature I could always add a new command.

xur17 2010-10-09 16:49

Re: [Announce] The One Ring
 
If I run reset_state_machine in the debug prompt, it resets the voicemail timeout to 60 seconds, even if it is disabled. The contacts and sms polling rates are kept though.

Is there a way to send a command to the debug console via dbus? I have tried using the following command, but it goes to the open window instead of the debug prompt:

Code:

run-standalone.sh dbus-send --type=method_call --dest=:1.113 /org/freedesktop/Telepathy/Connection/theonering/gv/username_40gmail_2ecom/channel6 org.freedesktop.Telepathy.Channel.Type.Text.Send uint32:0 string:"reset_state_machine textsnow"

epage 2010-10-09 22:02

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 837230)
If I run reset_state_machine in the debug prompt, it resets the voicemail timeout to 60 seconds, even if it is disabled. The contacts and sms polling rates are kept though.

Is there a way to send a command to the debug console via dbus? I have tried using the following command, but it goes to the open window instead of the debug prompt:

Code:

run-standalone.sh dbus-send --type=method_call --dest=:1.113 /org/freedesktop/Telepathy/Connection/theonering/gv/username_40gmail_2ecom/channel6 org.freedesktop.Telepathy.Channel.Type.Text.Send uint32:0 string:"reset_state_machine textsnow"

TOR will shutdown if it has no active connection for about 10 seconds. So just log off, wait a while, and log on.

EDIT: And that sounds like a bug that it resets voicemail even when disabled.

xur17 2010-10-10 21:25

Re: [Announce] The One Ring
 
Can you give me any hints on how to call a function in state_machine.py from an external python script? I added the following two functions to state_machine.py:

Code:

        def update_now(self):
                self._update_now()

        def _update_now(self):
                self._onTimeout.cancel()
                self._strategy.reinitialize_state()
                self._strategy.increment_state()
                self._onTimeout.start(seconds=1)

I can call update_now from within debug_prompt.py (I added the following command that runs when "reset_state_machine textsnow" is run from the debug prompt) (see line ~80):

Code:

self._conn.session.textsStateMachine.update_now()

epage 2010-10-11 12:47

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 837957)
Can you give me any hints on how to call a function in state_machine.py from an external python script? I added the following two functions to state_machine.py:

Code:

        def update_now(self):
                self._update_now()

        def _update_now(self):
                self._onTimeout.cancel()
                self._strategy.reinitialize_state()
                self._strategy.increment_state()
                self._onTimeout.start(seconds=1)

I can call update_now from within debug_prompt.py (I added the following command that runs when "reset_state_machine textsnow" is run from the debug prompt) (see line ~80):

Code:

self._conn.session.textsStateMachine.update_now()

I thought you had figured out how to run it manually:
Quote:

Originally Posted by xur17 (Post 837230)
Code:

run-standalone.sh dbus-send --type=method_call --dest=:1.113 /org/freedesktop/Telepathy/Connection/theonering/gv/username_40gmail_2ecom/channel6 org.freedesktop.Telepathy.Channel.Type.Text.Send uint32:0 string:"reset_state_machine textsnow"


Quote:

Originally Posted by feuxfollets (Post 828781)
Also it sets all of the polling times (contacts, voicemail, text) to -2147483648.

Note I found the bug report for this. It is filed upstream at b.fd.o (previous b.m.o bug)

epage 2010-10-11 13:03

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 837230)
If I run reset_state_machine in the debug prompt, it resets the voicemail timeout to 60 seconds, even if it is disabled. The contacts and sms polling rates are kept though.

I've now fixed the issue with voicemail timeouts and it should be included in the next release.

Quote:

Originally Posted by xur17 (Post 837230)
Is there a way to send a command to the debug console via dbus? I have tried using the following command, but it goes to the open window instead of the debug prompt:

Code:

run-standalone.sh dbus-send --type=method_call --dest=:1.113 /org/freedesktop/Telepathy/Connection/theonering/gv/username_40gmail_2ecom/channel6 org.freedesktop.Telepathy.Channel.Type.Text.Send uint32:0 string:"reset_state_machine textsnow"

Sorry, I glossed over this before and didn't realize you didn't have this working. I'll try to look into this.

EDIT: I've also added a command to force TOR to completely shutdown immediately so you can reload a modified version.

xur17 2010-10-11 17:03

Re: [Announce] The One Ring
 
I had been just killing the TOR process (it restarts itself), but after it started again, it was having some issues (it would have some messages shown twice).

Thanks again for your help by the way. I have the rest of my script working, so I can notify my n900 when new text messages arrive.

I just need to get TOR to check for new text messages via a command, and the script will be ready to go.

epage 2010-10-13 03:13

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 838547)
I had been just killing the TOR process (it restarts itself), but after it started again, it was having some issues (it would have some messages shown twice).

Thanks again for your help by the way. I have the rest of my script working, so I can notify my n900 when new text messages arrive.

I just need to get TOR to check for new text messages via a command, and the script will be ready to go.

So in addition to quit and fixing reset_state_machine, I've added update_now.

Sorry I'm taking so long on getting the script ready to send commands to the debug prompt. It'll probably be a couple more days.


All times are GMT. The time now is 23:38.

vBulletin® Version 3.8.8