maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] SMScon (control your device with SMS) (https://talk.maemo.org/showthread.php?t=60729)

dragly 2010-10-07 17:56

Re: [Announce] SMScon (control your device with SMS)
 
First of all; thanks for the great effort you guys are putting into this app! :)

I needed to reflash my device the other day and decided to give SMSCON another try (after having some trouble the last time).

With the new v0.6.0 of SMSCON Editor I'm having some trouble initializing. The commands for reset and del config seems to work fine (return no errors), but the initialize command causes the editor to hang and never close. I have to force closing it. Do you have any ideas why this happens?

dragly 2010-10-07 18:18

Re: [Announce] SMScon (control your device with SMS)
 
Here is another try. I initialized a new file using
Code:

smscon -init
Afterwards, I edited the smscon_config file manually and added my phone number. Now the "test sms" function works, but sending an SMS to myself does nothing (other than that I recieve the SMS of course).

The output of the log is this:
Code:

DAEMON INFO: successfully loaded "smscon_config" file
DAEMON INFO: reading valid IMSI code (xxxxxxxxxxxx) from file
DAEMON INFO: authorized IMSI code found
DAEMON INFO: smscon auto-loads at boot

This is the log from the time I didn't use the "test sms" command.

When I used the "test sms" command, the log was the same, except for the following two lines at the end:
Code:

DAEMON INFO: send SMS message test to "****"
DAEMON INFO: smscon_daemon stopped

Starting the daemon again and attempting to send "Check" to my cell phone number did not help.

Edit: I'm also unable to edit settings using the SMSCON Editor. I tried chown'ing the smscon_config file, but it didn't help.

Saturn 2010-10-07 19:26

Re: [Announce] SMScon (control your device with SMS)
 
Hi dragly,

Thanks for your tests. Are you testing with the devel version?

Could you try as root and post the results:
Code:

cat /etc/sudoers|grep smscon*
ls -al /opt/smscon*
ls -al /home/user/.smscon*

Be aware that after a test the daemon stops and you need to restart it. Just press "Start" from the init tab.

You could also start the editor from the xterm to check if there are any messages when you press "Update config" with the following (execute as user):
Code:

/opt/smscon-editor/smscon-editor

dragly 2010-10-07 20:37

Re: [Announce] SMScon (control your device with SMS)
 
Hi Saturn,

No problem. Just glad to help. The app is truly a great idea :)

I'm testing the devel version, yes.

Here are the command outputs:
Code:

Nokia-N900:~# cat /etc/sudoers|grep smscon*
user ALL = NOPASSWD: /opt/smscon-editor/smsconEditorCopyConfig, /opt/smscon-editor/smsconEditorCreatePass *
user ALL = NOPASSWD: /opt/smscon/smscon

Code:

Nokia-N900:~# ls -al /opt/smscon*
/opt/smscon:
drwxr-xr-x    2 root    root        4096 Oct  7 20:00 .
drwxr-xr-x  28 root    root        4096 Oct  7 19:35 ..
-rwxr-xr-x    1 root    root        14636 Oct  3 13:53 smscon
-rw-r--r--    1 root    root          15 Oct  7 20:00 smscon_code
-rw-r--r--    1 user    users        1721 Oct  7 20:02 smscon_config
-rwxr-xr-x    1 root    root        75515 Oct  3 13:53 smscon_daemon

/opt/smscon-editor:
drwxr-xr-x    2 root    root        4096 Oct  7 19:35 .
drwxr-xr-x  28 root    root        4096 Oct  7 19:35 ..
-rwxr-xr-x    1 root    root          128 Oct  7 17:48 smscon-editor
-rw-r--r--    1 root    root        1968 Oct  7 17:48 smsconEditorAskPass.py
-rwxr-----    1 root    root          78 Oct  7 17:48 smsconEditorCopyConfig
-rwxr-----    1 root    root          31 Oct  7 17:48 smsconEditorCreatePass
-rw-r--r--    1 root    root        36474 Oct  7 17:48 smsconEditorMain.py
-rw-r--r--    1 root    root        76571 Oct  7 17:48 smsconEditorMainGUI.py
-rw-r--r--    1 root    root        2030 Oct  7 17:48 smsconEditorNewPass.py
-rw-r--r--    1 root    root          36 Oct  7 17:48 smsconEditorPass

Code:

Nokia-N900:~# ls -al /home/user/.smscon*
drwxr-xr-x    2 user    users        4096 Oct  7 19:42 .
drwxr-xr-x  122 user    users      12288 Oct  7 19:42 ..

Running smscon-editor from terminal and clicking "Update Settings" gives the following output:
Code:

Nokia-N900:~/.smscon-editor$ /opt/smscon-editor/smscon-editor
Traceback (most recent call last):
  File "/opt/smscon-editor/smsconEditorMain.py", line 484, in doCreateConfigGeneral
    os.rename( Path + ConfigFile, Path + ConfigFile + "~" )
OSError: [Errno 2] No such file or directory

So something is apparently not working properly. I do get a message telling me that the config file was loaded successfully to begin with, though.

dragly 2010-10-07 22:10

Re: [Announce] SMScon (control your device with SMS)
 
The following did the trick to make the editor work as expected again. Maybe you should add a check to see if the file exists in the user-directory?
Code:

cp /opt/smscon/smscon_config /home/user/.smscon-editor/
However, I'm still not getting any reply when I send the message "Check" to the device. Sending test messages works, so it appears like it just doesn't respond to received messages.

The log from my last run was this:
Code:

Nokia-N900:~# smscon -log
DAEMON INFO: ---------------------------------------------
DAEMON INFO: successfully loaded "smscon_config" file
DAEMON INFO: reading valid IMSI code (***) from file
DAEMON INFO: authorized IMSI code found
DAEMON WARNING: smscon doesn't load at boot
DAEMON INFO: send SMS message test to "***"
DAEMON INFO: smscon_daemon has stopped
SMSCON INFO: smscon_daemon is running (07-10-2010 22:55:15)
DAEMON INFO: ---------------------------------------------
DAEMON INFO: successfully loaded "smscon_config" file
DAEMON INFO: reading valid IMSI code (***) from file
DAEMON INFO: authorized IMSI code found
DAEMON WARNING: smscon doesn't load at boot

No indication of received messages.

Saturn 2010-10-07 22:27

Re: [Announce] SMScon (control your device with SMS)
 
Hi dragly,

Thanks for the report. It made me realise that first time users had a chicken-egg problem.

Made changes in a couple of places to check for the missing files (for first time users or those manually deleted for some reason).

A new version has been uploaded in devel, please check when/if you have time.

Cheers

EDIT: Oh, I see you realised the problem already..

Saturn 2010-10-07 22:38

Re: [Announce] SMScon (control your device with SMS)
 
Quote:

Originally Posted by dragly (Post 835828)
...
However, I'm still not getting any reply when I send the message "Check" to the device. Sending test messages works, so it appears like it just doesn't respond to received messages.
...

Are you in the States or basically .. outside Europe? (just shooting in the dark!)

There is a set of users that seems to have this problem and we are not able to understand the relation. It might be the operator that sends the message in a specific way or an application that interferes with the dbus signal. (?)

Most probably digitalvoid (who wrote that part) has better chances to understand more.

dragly 2010-10-07 23:08

Re: [Announce] SMScon (control your device with SMS)
 
The new version worked flawlessly. I did a full purge and removed all setting files to test it.

Quote:

Are you in the States or basically .. outside Europe? (just shooting in the dark!)
Nope, I'm in Norway. I think it could have something to with the DBus as I had the exact same problem when I was trying to create an application in Qt which listened for incoming SMS messages using Qt Mobility. Asking in the Nokia Forums didn't result in any replies on the issue.

The strange thing, though, is that I flashed the device yesterday. So if DBus is the case, I must have reinstalled an application or reverted some config files which have messed up DBus again.

I would really like to help debugging this. It annoys me that I can't figure out what's wrong and I don't know where to look. And I would love to have SMSCON up and running :)

zimon 2010-10-07 23:11

Re: [Announce] SMScon (control your device with SMS)
 
Quote:

Originally Posted by dragly (Post 835828)
Code:

cp /opt/smscon/smscon_config /home/user/.smscon-editor/

I had to make that trick also to get smscon_editor working.

btw, Prefix for Commands1 and Commands2 can be different, it seems. It could be seen as a feature, but I'd rather like to have only one prefix and place for it for all commands. Oh well, a very minor thing.
There seems to be space available only for 3 more new commands and then you are out of space. So maybe just one "Commands" with a vertical scroll.

Still I'd recommend to have separate password which MUST start the SMS command or smscon_daemon won't parse SMS any futher. Initially could be "smscon". In this way also few CPU cycles are saved every time SMS comes to the phone, because smscon can check only first word against one string and then either process futher or ignore it.

SMSCON_editor's icon goes to All-folder when Catorize is installed. Is this intentional (more hidden) or should it go to System-folder?
Edit: noticed later it goes to Network-folder.

Great work guys!

Edit:
One feature request: A wget supported URI (for example http-address) which is polled in selectable time periods for SMSCON commands, one per line.
If wget is not installed (not in /usr/bin) then ignore this setting.
(Or write HTTP/HTTPS/FTP support with Python.)

Use case for this:
You have a home web page or http-server where you can store TXT-files. When phone is stolen, you go to the nearest netcafe and put suitable text file to the http-server. If smscon_daemon gets the text file, when it next time polls the URI, it will process it line by line like every line would be a SMS.
Also maybe support for parsing out HTML-tags if one is only able to export html-files to the web page.

jakiman 2010-10-08 06:21

Re: [Announce] SMScon (control your device with SMS)
 
What an awesome app. I have just one question:

Can you change the specified mobile number via SMS also?
Coz what happens the specified phone number isn't available at the time?

I would like to be able to remotely change the phone number that it contacts for call&sms by sending it some specific sms with the number.

Such as:

ChangeNumber +XXXXXXXXX

Is this possible?


All times are GMT. The time now is 07:25.

vBulletin® Version 3.8.8