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)

impeham 2010-09-25 13:42

Re: [Announce] SMScon (control your device with SMS)
 
still also waiting for this - if it works it'll be a great tool for me

Saturn 2010-09-25 14:09

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

Originally Posted by n900testa (Post 825994)
Same for me. None of the commands trigger a reply (sms or email). The "test" works just fine for gps, call and picture...
Version: 0.4.4-6
Status: Daemon is running
Log: No incoming (received) sms commands are listed

Any ideas what this might be up to?

Some questions to both to help debug this:
1. Did you change/rename the commands?
2. Did you check you didn't put any space after the command sms?
3. What is your default language.
4. do you see the sms you have sent to the messages and does it have more than just the command?

impeham 2010-09-25 14:35

Re: [Announce] SMScon (control your device with SMS)
 
i didn't change the commands - stayed with default names.
i did not put a space or enter after the command in the SMS message, however, when i open the SMS message in the N900, the message looks as if there is a new line (as if i also added an ENTER key to the end of the message).
my device language is English(United Kingdom).
One more thing is that i did not use another cellular to send the SMS - i used a windows application called "TextMe" - i don't have another cellular to use for sending.
i also tried to copy the message content from the N900 after i got it to clipboard and paste it to a new sent SMS message and it didn't work also.

Thanks.

faf 2010-09-25 21:45

Re: [Announce] SMScon (control your device with SMS)
 
1 Attachment(s)
hi. first of all, thank you, this is an awesome application. :)

i found potential trouble with grps connection handling. there could be situations when there are more than one such connection available. for example, one for internet-over-gprs and one for mms (via fmms / fapn pair).

in such case smscon-daemon, as far as i can understand, will use the first gprs connection he found, and if it will be the one for mms only then email just will not be sent.

actually, i haven't any clue about how to define the exact subtype of the grps connection. the only solution that came to my mind was to check gprs_accesspointname param in the gconftool output for whether it contains "mms." substring. (patch attached.)

but it's a kind of quick-and-dirty hacks. has anybody any better suggestions? :confused:

Saturn 2010-09-25 23:21

Re: [Announce] SMScon (control your device with SMS)
 
1 Attachment(s)
Find the new version of the SMSCON Editor v. 0.4.4-14 in extras-devel.
http://maemo.org/packages/view/smscon-editor/

This version brings a feature requested by several people already.
It allows the prefixing of a common string all the commands on the window in one go.
There isn't much to explain - just try it. The changes are registered only after pressing the "Update Settings" button. To remove the prefix (before updating them) just re-prefix with nothing in the box.

See for more information and screenshots in the wiki page of SMSCON Editor (still needs work! documentation is always boring :))

- Feel free to report issues.
- Feel free to thank the developers. There's a button for it!
- Don't forget to vote in testing for the packages promotion if you find them functional. Here are the links:
SMSCON ,
SMSCON-Editor

DojwqIO 2010-09-26 03:50

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

Originally Posted by SaintGermain (Post 820902)
I just added "passphrase" to the regexp for making smscon compatible with 'public key authentication' (the password you provide in smscon_config will be processed as the passphrase to your private key):

Code:

(Output, ExitStatus) = pexpect.run( 'ssh -n -N -T -f -p %s -R %s:%s:%s %s@%s &' % (REMOTEPORT, LocalPort, LocalHost, REMOTEPORT, REMOTEUSER, REMOTEHOST), events = { '(?i)(password|passphrase)':REMOTEPASSWORD + '\n', '(?i)(yes/no) ?':'yes' + '\n' }, withexitstatus = True )

With that, I managed to make reverse-SSH works with public key authentication !

Does the above setup work with an empty passphrase?
I have set up the keys and I'm able to connect via ssh and open the tunnel from the command line as root in the N900, but smscon fails to establish the connection.


Update: I added a passphrase to my private key on the N900 and added it to smscon_config and it didn't work either. The ssh connection cannot be established with smscon but it is possible from the command line.

Any suggestions? The smscon -log output does not provide a lot of information.

More information: the remoteuser in my ssh server does not have shell access but it is able to forward ports.

DojwqIO 2010-09-26 04:19

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

Originally Posted by digitalvoid (Post 825864)

@ DojwqIO:

COM_POWER show you the current battery charge percentage (returns SMS).

COM_TRACKON will continiously send the GPS coordinates with SMS or email to you.

The port can be adjusted in the smscon_daemon file (look at "LocalPort" under "variables")

Keyboard use is opening/closing the keyboard slider.

Thanks, I tried power and poweroff and they work.
I do not however get any sms updates about keyboard use.

See my other post about issues with remote ssh connections.
smscon is not able to establish the reverse tunnel with public key authorization.

n900testa 2010-09-26 10:12

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

Originally Posted by Saturn (Post 826011)
Some questions to both to help debug this:
1. Did you change/rename the commands?
2. Did you check you didn't put any space after the command sms?
3. What is your default language.
4. do you see the sms you have sent to the messages and does it have more than just the command?


1. I tried with the default commands and also with custom commands
2. Yep. No spaces or new lines in the sms. Only the command.
3. English
4. The message that i receive on my n900 only displays my command (i.e. Check) with no other signs, whitespaces or similar.
When i receive the message, the notification window pops up, but nothing else happens. The message is sent from another cellphone (using the same network - o2).

Thanks for your support...:rolleyes:

[update] I also do not receive any command reply sms. So it looks like smscon can't handle the received sms (which would also confirm the "empty" logfile)

DojwqIO 2010-09-26 22:19

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

Originally Posted by DojwqIO (Post 826409)
smscon is not able to establish the reverse tunnel with public key authorization.

OK, found out what was going on. When trying to make the ssh connection, smscon first pings the ssh server, and if there is no response, it does not even attempt to establish the connection. My server does not respond to pings and that's why I was able to ssh using the command line, but smscon was not working.

I changed the code in smscon_daemon to try to connect even after a failed ping:

Code:

    if StatusSSH() == False:
        if StatusRemoteHost() == False:
            logging.error('ssh ping failure to "%s". Will try connect anyway' % REMOTEHOST)
            StartSSH()
            return
        else:
            StartSSH()
            return
    else:
        logging.info('ssh connection is already active')
        return

and now smscon can establish the connection.
Hope this helps.

digitalvoid 2010-09-27 08:13

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

Originally Posted by DojwqIO (Post 826924)
OK, found out what was going on. When trying to make the ssh connection, smscon first pings the ssh server, and if there is no response, it does not even attempt to establish the connection. My server does not respond to pings and that's why I was able to ssh using the command line, but smscon was not working.

I changed the code in smscon_daemon to try to connect even after a failed ping:

Code:

    if StatusSSH() == False:
        if StatusRemoteHost() == False:
            logging.error('ssh ping failure to "%s". Will try connect anyway' % REMOTEHOST)
            StartSSH()
            return
        else:
            StartSSH()
            return
    else:
        logging.info('ssh connection is already active')
        return

and now smscon can establish the connection.
Hope this helps.

I implement this in release 0.5-1 (see SMSCON wiki in "future release" section, lots of changes in SMSCON!


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

vBulletin® Version 3.8.8