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)

sr00t 2011-06-13 15:07

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

Originally Posted by Saturn (Post 1028254)
Could you please give the output of the following two commands:
Code:

cat /opt/smscon/smscon_config |grep user
cat /opt/smscon/smscon_config |grep CHECKHOST


Code:

~ $ cat /opt/smscon/smscon_config | grep user
# SMSCON user settings (v0.7-2)
~ $ cat /opt/smscon/smscon_config | grep CHECKHOST
~ $


Saturn 2011-06-13 15:15

Re: [Announce] SMScon (control your device with SMS)
 
It understood..

The new smscon version did not force an update of the configuration file.

Please do the following or wait for an update.
Code:

sudo gainroot
smscon -force init


sr00t 2011-06-13 15:22

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

Originally Posted by Saturn (Post 1028266)
It understood..

The new smscon version did not force an update of the configuration file.

Please do the following or wait for an update.
Code:

sudo gainroot
smscon -force init


It worked like a charm :)
Thanks a lot for the quick answer !

digitalvoid 2011-06-13 15:43

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

For all people who have 0.7-2 installed, when installing 0.8.1 do a:
Code:

smscon -force init
in X-terminal after install. This will setup a new standard config file with the new options. Edit these options to your needs...

digitalvoid 2011-06-13 17:16

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

Release 0.8.1-3 is on it's way:
  • FIX: bug in the ENABLECHECKHOST option. It would execute the wrong command. See WIKI/Usage for changed details.
  • CHANGE: smscon_config file will be re-initialized automatically due to changes/new options not available in release 0.7-2.

Saturn 2011-06-13 17:25

Re: [Announce] SMScon (control your device with SMS)
 
Release of the SMSCON Editor in devel (version 0.8.8)

Changes:
* Correction of error with RESENDTIME creation.
* Replaced "-init" command with "-force init".
* Added check in postinstal script for the config version.

BluesLee 2011-06-13 17:37

Re: [Announce] SMScon (control your device with SMS)
 
@digitalvoid & Saturn: Many thanks for this kind of application.
Unfortunately, i have two issues:

1. Minor one: If I "Execute Script" i get two short messages that the
user script was executed. This bug was also mentioned earlier in
this thread.

2. I want corresponding GSM cellid informations via SMS, so I
tried the below using smssend via cli from the repos:

Code:

#!/bin/sh
# smscon script (v0.8.1)
# (edit below)

# get cellid codes via dbus command
# MCC:        Mobile Country Code;        MNC:        Mobile Network Code;
# LAC:        Local Area Code;        CELLID:        Cellid;
EXPRESSION=`dbus-send --system --print-reply=literal --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status`
MCC=`echo $EXPRESSION | cut -f 10 -d " "`
MNC=`echo $EXPRESSION | cut -f 8 -d " "`
LAC=`echo $EXPRESSION | cut -f 4 -d " "`
CELLID=`echo $EXPRESSION | cut -f 6 -d " "`
smssend -n +49xxxxxxxxxx -m "Cellid Info: MCC=$MCC; MNC=$MNC; LAC=$LAC; CELLID=$CELLID"

Running this from the cli works perfect, running it from the
test tab within the smscon gui doesnt. Is such a gsm command
for sending SMS etc blocked when I run the script within smscon?

Request: A command like COM_CELLID would be great. We
could use it with snuggle as a frontend.


Blues

Saturn 2011-06-13 21:49

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

Originally Posted by BluesLee (Post 1028364)
@digitalvoid & Saturn: Many thanks for this kind of application.
Unfortunately, i have two issues:

1. Minor one: If I "Execute Script" i get two short messages that the
user script was executed. This bug was also mentioned earlier in
this thread.

2. I want corresponding GSM cellid informations via SMS, so I
tried the below using smssend via cli from the repos:

Code:

#!/bin/sh
# smscon script (v0.8.1)
# (edit below)

# get cellid codes via dbus command
# MCC:        Mobile Country Code;        MNC:        Mobile Network Code;
# LAC:        Local Area Code;        CELLID:        Cellid;
EXPRESSION=`dbus-send --system --print-reply=literal --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status`
MCC=`echo $EXPRESSION | cut -f 10 -d " "`
MNC=`echo $EXPRESSION | cut -f 8 -d " "`
LAC=`echo $EXPRESSION | cut -f 4 -d " "`
CELLID=`echo $EXPRESSION | cut -f 6 -d " "`
smssend -n +49xxxxxxxxxx -m "Cellid Info: MCC=$MCC; MNC=$MNC; LAC=$LAC; CELLID=$CELLID"

Running this from the cli works perfect, running it from the
test tab within the smscon gui doesnt. Is such a gsm command
for sending SMS etc blocked when I run the script within smscon?

Request: A command like COM_CELLID would be great. We
could use it with snuggle as a frontend.


Blues

Strange, I've put your code in the script and had to give it executable rights and it has worked fine.
Code:

sudo gainroot
chmod 755 /opt/smscon/smscon_script

It has given me a bunch of errors about the dbus call made by smssend (since the code has been executed as root), but it worked.

Would propose to run the Editor from terminal and see if there are any errors.

I will send at some point to digitalvoid some code to add the cellid info command, but I fear that the number of commands has grown to a unmanageable size. Let's see what he thinks when the time comes.

Saturn 2011-06-13 22:15

Re: [Announce] SMScon (control your device with SMS)
 
Here is also some improvement to the code of BluesLee if someone wants to use it.

* Requirement is to have the "smssend" package installed (you can find it in extras).
* Will send an SMS with the cell info the phone is connected to the number you have defined in the SMSCON configuration.

Code:

#!/bin/sh
# smscon script (v0.8.1)
# (edit below)

if dpkg -l | grep smssend 1>/dev/null;
then
  ##Read SENDERNUMBER from config file
  SENDERNUMBER=`awk -F' ' '$1 == "SENDERNUMBER" { print $3;exit}' /opt/smscon/smscon_config|cut -d"'" -f2`
 
  ##Send SMS if smssend package is installed
  # get cellid codes via dbus command
  # MCC:        Mobile Country Code;        MNC:        Mobile Network Code;
  # LAC:        Local Area Code;        CELLID:        Cellid;
  EXPRESSION=`dbus-send --system --print-reply=literal --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status`
  MCC=`echo $EXPRESSION | cut -f 10 -d " "`
  MNC=`echo $EXPRESSION | cut -f 8 -d " "`
  LAC=`echo $EXPRESSION | cut -f 4 -d " "`
  CELLID=`echo $EXPRESSION | cut -f 6 -d " "`
  #echo $MCC $MNC $LAC $CELLID
  smssend -n $SENDERNUMBER -m "Cellid Info: MCC=$MCC; MNC=$MNC; LAC=$LAC; CELLID=$CELLID"
fi


carlon 2011-06-13 22:17

Re: [Announce] SMScon (control your device with SMS)
 
I just installed this app, it looks great but it seems like i need a wiki to explain the wiki..i look at the wiki hoping that it would explain the options but it didn't, and i really dont know what all the options do


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

vBulletin® Version 3.8.8