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)

digitalvoid 2010-08-20 16:32

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

Originally Posted by fnordianslip (Post 793193)
....
A question I have, is does the inbound SMS message destined for SMScon with a command in it get subverted away from the user interface so no notifications are presented?

No, this is what i like to solve myself. I don't think is really possible.
Reply messages from smscon are done in the background and don't list in Conversations app.

fnordianslip 2010-08-20 16:33

Re: {Announce] SMScon (control your device with SMS)
 
Actually, a potentially good idea might be to set up an 'smscon' user on the server machine, with no privileges and no login shell.

Then, in the N900's /home/user/.ssh/config, specify for the server host the specific private key (with IdentityFile) to be used to connect to the server, and specify the User as smscon. You would then need to generate a special key pair for the smscon user, with no passphrase.

That way, your normal private keys can have passphrase protection, but the one used by SMScon to make the ssh connection to the server can't compromise accounts on other machines, but should be able to set up the tunnels.

I've not actually tried this, but I think it could work in practice.

AlexV12 2010-08-21 10:02

Re: {Announce] SMScon (control your device with SMS)
 
When i type:

sudo gainroot
smscon -start


i get:
/bin/sh: smscon: Permission denied

also, if i type smscon -start without root, i get -sh: smscon: not found


how come? what am i doing wrong?

i put both files in /usr/sbin via the code:

cp /home/user/MyDocs/Smscon/* /usr/sbin


after that i rebooted. but i have no idea how to activate it/ get into the options.

and do you need to change al the XXXXXXX in the file manually? or can you do this easily in the options once the program works?

digitalvoid 2010-08-21 14:12

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

Originally Posted by AlexV12 (Post 793825)
When i type:

sudo gainroot
smscon -start


i get:
/bin/sh: smscon: Permission denied

also, if i type smscon -start without root, i get -sh: smscon: not found


how come? what am i doing wrong?

i put both files in /usr/sbin via the code:

cp /home/user/MyDocs/Smscon/* /usr/sbin


after that i rebooted. but i have no idea how to activate it/ get into the options.

and do you need to change al the XXXXXXX in the file manually? or can you do this easily in the options once the program works?

smscon & smscon_daemon must be in /usr/bin and both files must have the right permissions (755), do this as root in /usr/bin:

Code:

Nokia-N900:/usr/bin# chmod 755 smscon
Nokia-N900:/usr/bin# chmod 755 smscon_daemon

Smscon must be run as root:


Code:

Nokia-N900:/# smscon
== smscon - remote control utility ==
Options:
  -start  : start smscon
  -restart : clear & restart smscon
  -stop    : stop smscon
  -reset  : stop smscon & arase the log file
  -boot    : set start at device boot
  -unboot  : remove start at device boot
  -status  : get smscon_daemon status
  -log    : show the logfile
  -clear  : erase the log file
  -help    : this help menu
Nokia-N900:/#

To make it load at device boot:

Code:

Nokia-N900:/# smscon -boot
smscon_boot doesn't excist.
new smscon_boot created & active.
Nokia-N900:/#

And indeed you have to change all the XXXXX's before use.

AlexV12 2010-08-22 11:12

Re: {Announce] SMScon (control your device with SMS)
 
i think i got it working, smscon - boot worked, so i'm on the right track.

however if i type
Code:

smscon -start
i get about 70 "not found" errors. it also ends with:

Code:

/usr/bin/smscon_daemon: line 68: syntax error: word unexpected (expecting ")")
is that supposed to happen?

also if i send an sms to my phone with "check" nothing happens.

digitalvoid 2010-08-22 15:31

Re: {Announce] SMScon (control your device with SMS)
 
@ AlexV12:

Very strange, did you install the packages?

AlexV12 2010-08-23 09:58

Re: {Announce] SMScon (control your device with SMS)
 
yes i did, however i changed the 2 last codes from:


Code:

apt-get openssh
apt-get pexpect

to:
Code:

apt-get install openssh
apt-get install pexpect

otherwise i got an "invalid operation"

why you put in apt-get pexpect twice i don't know :)

i reinstalled all the packages again and rebooted, but i get the same. But you might be right, it looks like it hasn't (fully) installed all the packages. because the first error i get when typing smscon -start is:

Code:

/usr/bin/smscon_daemon: line 1: #!/usr/bin/python: not found
after that i get:

Code:

/usr/bin/smscon_daemon: line [NUMBER]: import: not found
strange

Soap77 2010-08-23 17:10

Re: {Announce] SMScon (control your device with SMS)
 
looks like a nice application,
How about take it a bit further.
Lets say you loose your "phone" and you have data stored on it that you dont want anyone to see:
A function to wipe the entire phone for such data. ( of course its one selfs own responsibility to have proper backup somewhere else.)

the wipe function should remove any connection to exchange/imap/pop accounts, delete entire phonebook (I have my phonebook synced with exchange, so its a POC to get all the contacts back) remove conversation history etc.
there is a similar function already in the exchange server. I have never tried it so I dont know if itīs doing it properly.

AlexV12 2010-08-23 18:51

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

Originally Posted by Soap77 (Post 796054)
looks like a nice application,
How about take it a bit further.
Lets say you loose your "phone" and you have data stored on it that you dont want anyone to see:
A function to wipe the entire phone for such data. ( of course its one selfs own responsibility to have proper backup somewhere else.)

the wipe function should remove any connection to exchange/imap/pop accounts, delete entire phonebook (I have my phonebook synced with exchange, so its a POC to get all the contacts back) remove conversation history etc.
there is a similar function already in the exchange server. I have never tried it so I dont know if itīs doing it properly.

take in mind that it wouldn't be a good idea to combine it with the change of simcard, as for example a friend has to use his sim in your phone (for what ever reason).. it would erase all data, but it hasn't been stolen ;)

it is a nice idea though to trigger that via sms, but you'd have to be sure that the thief still has your simcard in the phone, otherwise it won't work

digitalvoid 2010-08-23 19:31

Re: {Announce] SMScon (control your device with SMS)
 
@ AlexV12:

Sorry for that, must indeed be apt-get install ...
and one install of pexpect is enough :). I corrected my first post...

Are the two scripts in /usr/bin and have the right permissions?
And did you install the Python packages?


"...
it is a nice idea though to trigger that via sms, but you'd have to be sure that the thief still has your simcard in the phone, otherwise it won't work"

--> smscon detects a SIM change at boot and then sends you the new provider name, new IMSI and new phonenumber. With this number you can SMS & control your phone again.


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

vBulletin® Version 3.8.8