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)

tHMZ 2010-08-25 17:02

Re: [Announce] SMScon (control your device with SMS)
 
How easy is this? Can I backup my applications before I help you test it? What apps do I have to have pre-installed? I don't code, I like tech but I dunno how to use the X terminal etc. so do I need to know how to?

AlexV12 2010-08-25 17:22

Re: [Announce] SMScon (control your device with SMS)
 
i myself am very much a beginner in Xterminal, i know my way around some codes, but not allot.

I somehow can't get it to work while i've done everything that i'm supposed to do...

to give you a simple guide, all you have to do is type these codes in xterminal. Make sure you've installed Rootsh (from the cataloges in the app manager

Open Xterminal and type:
Code:

root
apt-get install maemo-python-device-env
apt-get install python-location
apt-get install pexpect
apt-get install ncftp (cli ftp client)
apt-get install gstreamer-tools
apt-get install openssh

close xterminal

open smscon_daemon (from where you downloaded it to) with "notes"

and edit these lines into the appropriate lines

Code:

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

after this save the file and close "notes"

now move both the files to N900/newfolder (create the newfolder if you don't have it yet)

open Xterminal: note some letters are Capitals!
Code:

sudo gainroot
cd /home/user/MyDocs
cp /home/user/MyDocs/newfolder/* /usr/bin

close Xterminal

open Xterminal again:
Code:

root
cd /usr/bin
chmod 755 smscon
chmod 755 smscon_daemon

after that smscon should work.

you can run smscon by opening Xterminal:
Code:

root
smscon -start

for other commands use this code:
Code:

root
smscon -help

use your up arrow to get the last input you entered in Xterminal, and change it if it's easier than retyping the whole code.

Good luck, however somehow my phone doesn't recognise python :( hope yours does.

evilsquelch 2010-08-25 18:07

Re: [Announce] SMScon (control your device with SMS)
 
Has anyone tried to build this stuff on top of IAMHERE instead of starting from scratch? We had this in the works for a while but it was basically abandoned.

http://wiki.maemo.org/I_am_here

it could be idea to combine these projects

just a thought

digitalvoid 2010-08-25 18:24

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

It's smscon -help (no space between minus and command)

I am currently rewriting the code, so new version is comming soon.

AlexV12 2010-08-25 18:47

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

Originally Posted by evilsquelch (Post 798144)
Has anyone tried to build this stuff on top of IAMHERE instead of starting from scratch? We had this in the works for a while but it was basically abandoned.

http://wiki.maemo.org/I_am_here

it could be idea to combine these projects

just a thought

Iamhere doesn't support PR1.2 so i think it would be much more of a hassle to build it on top of Iamhere and looking at the progress Digitalvoid has made it would be stupid to start all over now.

It would have been a great idea, as Iamhere worked perfect including sending an email with the frontcam image etc. too bad it got abandoned

digitalvoid 2010-08-25 19:26

Re: [Announce] SMScon (control your device with SMS)
 
I like to implement email sending of frontcam picture (is a beter idea, easier) but at the moment I don't know how. I.m trying to find out.

knypek3 2010-08-25 20:32

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

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


Yes, it can check website. But what when my site have adress http://asgarmy.ovh.org and to send to it any file i must log to ftp - ftp.60free.ovh.org ?
I can't send throw ftp.asgarmy.ovh.org.
So i can't use it script becouse when i type in remotehost asgarmy.ovh.org smscon don't send anything.
When i type ftp adress (ftp.60free.ovh.org) in remote host the
function def StatusRemoteHost(): check this adress and send my error, becouse on this adress (ftp.60free.ovh.org) aren't any site. It is only ftp.
I think you now know what is my problem...
So can you help me now? :D

Mabye this link can help You:
http://docs.python.org/library/email

digitalvoid 2010-08-25 21:21

Re: [Announce] SMScon (control your device with SMS)
 
I have changed the StatusRemoteHost() to use the ping command, then it would work for you. (is much better solution)

Smtplib in Python can indeed send emails, I will implement this in favor of ftp sending of frontcam picture.

In a couple of days I will post a new version of smscon...

digitalvoid 2010-08-26 20:02

Re: [Announce] SMScon (control your device with SMS)
 
Updated the first post, new version coming soon!

digitalvoid 2010-08-28 19:15

Re: [Announce] SMScon (control your device with SMS)
 
Updated the first post, new version (v2.1) is out!


All times are GMT. The time now is 11:16.

vBulletin® Version 3.8.8