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)

AlexV12 2010-08-23 20:53

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

Originally Posted by digitalvoid (Post 796194)
@ 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.

any python package in specific? i've only installed the packages that you named in your first post. are there any other packages (maybe from the application manager) i need installed?

also i typed in the code:
Code:

root
cd usr/bin
chmod 755 smscon
chmod 755 smscon_daemon

however i don't get any response (as in 50% done or what so ever.) it just starts a new line saying:
Code:

Nokia-N900:/usr/bin#
which i think is ok, because it doesn't give an error, which normally means succes.

digitalvoid 2010-08-24 10:34

Re: {Announce] SMScon (control your device with SMS)
 
Can you show me all the errors you getting from starting smscon?

AlexV12 2010-08-24 12:40

Re: [Announce] SMScon (control your device with SMS)
 
http://img840.imageshack.us/img840/6...0082414350.png

http://img829.imageshack.us/img829/7...0082414351.png

http://img824.imageshack.us/img824/5...0082414352.png

http://img832.imageshack.us/img832/5...0082414352.png

http://img834.imageshack.us/img834/4...0082414353.png

digitalvoid 2010-08-24 13:25

Re: [Announce] SMScon (control your device with SMS)
 
It looks like maybe Python isn't installed on your device...

In X Terminal, if you do this:

Code:

Nokia-N900:~# python


you should get this:

Code:

Nokia-N900:~# python
Python 2.5.4 (r254:67916, May 17 2010, 21:00:32)
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>



Use Ctrl + D to quit Python.

AlexV12 2010-08-24 13:50

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

Originally Posted by digitalvoid (Post 796863)

Code:

Nokia-N900:~# python
Python 2.5.4 (r254:67916, May 17 2010, 21:00:32)
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>



Use Ctrl + D to quit Python.

i get this code perfectly!, same date, time etc, so same version i guess

knypek3 2010-08-24 19:27

Re: [Announce] SMScon (control your device with SMS)
 
Do you edit this files on windows notepad? This is a fcking app.- it change a file, that n900 can't read it.
Try apt-get install nano
cd folder
nano smscon
And that try to edit.

To author this app:
It is possible to give o this app email function?
Photos can be easy send to email server.

Can anyone show me how to for example configure a server for smscon?? What i must write here

Code:

RemoteHost                  = 'ftp.60free.ovh.org'                        # remote server address
RemotePort                  = 22                                          # remote server port
RemotePath                  = '/XXXXXXXXXXXX'                              # remote server ftp path
RemoteUser                  = 'XXXXXXXXXXXXX'                              # remote user
RemotePassword


AlexV12 2010-08-24 20:23

Re: [Announce] SMScon (control your device with SMS)
 
either edit it with notepad on your pc, or open the file in "notes" on your n900 and edit the file there.

digitalvoid 2010-08-25 08:35

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

Originally Posted by knypek3 (Post 797127)
Do you edit this files on windows notepad? This is a fcking app.- it change a file, that n900 can't read it.
Try apt-get install nano
cd folder
nano smscon
And that try to edit.

To author this app:
It is possible to give o this app email function?
Photos can be easy send to email server.

Can anyone show me how to for example configure a server for smscon?? What i must write here

Code:

RemoteHost = 'ftp.60free.ovh.org'  # remote server address
RemotePort = 22  # remote server port
RemotePath = '/XXXXXXXXXXXX'  # remote server ftp path
RemoteUser = 'XXXXXXXXXXXXX'  # remote user
RemotePassword = 'XXXXXXXXXXXXX' # remote password


RemoteHost is the name of your server address (example: myserver.com)
RemotePort is the port on your server for the ssh connection (normally this is port 22). Your server must have a running ssh server.
RemotePath is the path to connect to on your server for ftp. (example: /ftp/nokia). (ftp uses port 21 for connection)
RemoteUser is the username for the ssh connection & ftp access.
RemotePassword is the password for the RemoteUser for the ssh connection & ftp access.

I have a home server with a fixed IP adddress (and a website) so I can configure it all very easely. It's very funny to ssh your phone through GPRS connection from your home (it's not super fast but it works ok).

I will look into making smscon also have a email function.
I'm currently rewriting parts of smscon & smscon_daemon (code cleanup, using a settings file (smscon_config) instead of editing smscon_daemon.

knypek3 2010-08-25 11:31

Re: [Announce] SMScon (control your device with SMS)
 
hmn it's strange.
Why you using ssh?
I test this but in log write:
searching "ftp.60free.ovh.org"
failed to find "ftp.60free.ovh.org" (max retries reached)

But when i manualy try ncftpput -V -E -u user -p pass -P 21 ftp.60free.ovh.org / file
it send successfully the file.
So for what is the ssh necessary??

If i delete all ssh (ssh start, stop, status) and leave only function ncftpput it will work?

Edit:
I think it can't connect becouse in
def StatusRemoteHost():
p = urlparse('http://' + RemoteHost)
h = HTTP(p[1])
Have a http prefix.
I have only ftp.

Can anyone help?

digitalvoid 2010-08-25 13:08

Re: [Announce] SMScon (control your device with SMS)
 
Ssh (it's technically a reverse ssh connection) is only needed if you want to control you device (command 'Remote on' & 'Remote off').

Ftp is used for sending the frontcam photo to you own ftp server (command 'Camera').

I check if the connection is active (before ftping) by checking if my website can be reached. Why? I could use a simple ping to my IP address (server), but the ping is not always passed through GPRS or LAN networks with a strict firewall. Port 80 (website) is always passed, so smscon only works if a website is available on the server to connect to. I will look in to it; maybe I change this to a ping again with a fallback to website checking.

Does anybody know how I can compose & send a email by cli.
Python smtplib doesn't work either.


All times are GMT. The time now is 18:06.

vBulletin® Version 3.8.8