maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] HeySms - Send and receive sms on your computer (https://talk.maemo.org/showthread.php?t=84705)

titilambert 2012-06-05 17:56

[Announce] HeySms - Send and receive sms on your computer
 
HeySms

SAILFISH PORT HERE

Application submitted to the 2012 Coding Competition

Hi everyone !
I made a small application to send and receive sms on your computer without a specific software.
You just have to use your instant messaging client ... Which have to be compatible with Bonjour protocol.

I made this application because my girlfriend send me a lot of sms when I'm working ...
Now I can answer her without taking my N900 ... :)

Feature list :
  • Send SMS from your computer (using your bonjour client)
  • Receive SMS on your computer (using your bonjour client)
  • Silent your phone when HeySms starts
  • Use Smssend to send SMS. Usefull if you can't send Sms wih standard method. (You need to install smssend package)
  • Connect your phone to your computer using the USB cable
  • Bonjour Bot to control your phone (called 'Controller')
  • Controller will notify you if someone call you (Usefull, if your N900 is in silent mode)
  • Set contact as favorite... This contact will appears in your active contact list at starting ...
  • All your messages/answers are stored in your conversation history... :p

Controller fonctions :
  • help : Show help
  • show : Show current active contact list
  • search : Search a contact in your address book in order to add a contact in your Bonjour contact list
  • add : Add contact to active contact list
  • del : Remove contact from active contact list
  • echo : Just reply your message ...
  • If you have any idea ... I can do it !!!

Mini manual :
  1. Launch your instant messaging client on your computer and activate your Bonjour account.
  2. Launch HeySms on your N900
  3. In HeySms select yourself (your Bonjour name) in the Bonjour contact list.
  4. If you are not in the Bonjour contact list, click on reload button ...
  5. Add contact in your active contact list (Menu -> "Add friend")
  6. You will see your friend in the active contact list
  7. Your friend will appears in your Bonjour client on your computer
  8. Write message to your friend (in fact, it send SMS...)
  9. .... Wait answer ....
  10. Receive SMS ... :)
  11. The message appears on your computer !
  12. Answer ...

Of course, only the selected bonjour contact can send/receive SMS from/to your phone... :D

Also, all your answers will be store in the N900 history. You will not lost your messages ! ;)

Tested :
  • N900 and Pidgin (on Linux)
  • N900 and Empathy (on Linux)
  • N900 and Kopete (on Linux) [ Need more feedbacks ]
  • N900 and Gajim (on Linux) [ Need more feedbacks ]
  • Please talk about you

Limitations
  • If you use Wifi, your N900 and your computer must be on the same network (subnet)
  • N900 only (If I get N950 or N9, I port it !)

Updates
  • 1.6.6-1 : Fix communications with Kopete, Empathy, Pidgin and Gajim
  • 1.6.5-1 : Fix my poor english
  • 1.6.4-1 : Fix call notifier
  • 1.6.3-1 : Fix search contact (Thanks to darodi)
  • 1.6.2-1 : Fix Controller stability
  • 1.6.1-1 : Fix stability
  • 1.6.0-1 : Add controller. You can now control your N900 using Bonjour
  • 1.5.1-1 : Cleaning code
  • 1.5.0-1 : Add option to use USB PC connection
  • 1.4.5-1 : Fix minor bugs

Roadmap
  • Clean bonjour client code (use XMPPPY ???)
  • Improve USB network activation stability
  • Port to N9/N950
  • Silent phone using the Controller
  • Add preference to don't show Yellow Popups
  • Translations
  • .... ???
  • Call forwarding using jingle library ??? :D ( maybe in version 42 )

Usefull links :
Thanks for your feedbacks !



Please, excuse my english ... :)

zimon 2012-06-05 18:08

Re: [Announce] HeySms - Send and receive sms on your computer
 
N900 and a PC has to be somehow in the same local net, I guess, so avahi, mdns, bonjour would work?

titilambert 2012-06-05 18:31

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by zimon (Post 1218011)
N900 and a PC has to be somehow in the same local net, I guess, so avahi, mdns, bonjour would work?

You right !!! I just edited my message ...

Maybe I should plan something (button ?) to automount the usb0 interface to simplify the connection...

benny1967 2012-06-05 19:15

Re: [Announce] HeySms - Send and receive sms on your computer
 
Need to try this as soon as possible. This would be reason enough for me to switch back to the n900 as my main phone. Or would it be possible to port this to the n9?

zimon 2012-06-05 19:36

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218021)
Maybe I should plan something (button ?) to automount the usb0 interface to simplify the connection...

Hmm...maybe, but if someone already has local net connection with some other means (usb, wlan, bluetooth) then it should be able to use that also. Maybe you just tell in the help button, one can use Mobile hotspot to make a local net connection?


Tried it.
I have USB-network connection to the PC (with Mobile Hotspot application). The local net is working. I can for example ssh both ways.

When I start HeySms, it just tells "Loading Bonjour contacts" and then quits.

I tried to run it in xterminal, and it gives this:
Code:

$ heysms
Unsupported date format character at 1 (%-d.%-m.)
Traceback (most recent call last):
  File "/usr/bin/heysms", line 32, in <module>
    main()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 184, in main
    ui.central_widget.reload_contacts()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 85, in reload_contacts
    self.parent.bonjour_users = list_presence_users()
  File "/usr/lib/python2.5/site-packages/heysms/lib/lib.py", line 201, in list_presence_users
    callBack=browse_callback)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 1409, in DNSServiceBrowse
    None)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 286, in _errcheck
    raise cls(result)
lib.pybonjour.BonjourError: (-65537, 'unknown')


fignew 2012-06-05 19:53

Re: [Announce] HeySms - Send and receive sms on your computer
 
Would love to see something like this for the N9. Nice work :)

davdav 2012-06-05 20:07

Re: [Announce] HeySms - Send and receive sms on your computer
 
A good idea
Can you make it send emails with the SMS content
And you can reply back by sending back an email with a prefix maybe like SMS: -N "phone number" -t "text here "

titilambert 2012-06-05 20:26

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by benny1967 (Post 1218044)
Need to try this as soon as possible. This would be reason enough for me to switch back to the n900 as my main phone. Or would it be possible to port this to the n9?

I just don't have N9 ...
I will present this application to meamo competition code 2012 to win a N9/N950 and port it ... :)

Thanks

titilambert 2012-06-05 20:32

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by zimon (Post 1218055)
Hmm...maybe, but if someone already has local net connection with some other means (usb, wlan, bluetooth) then it should be able to use that also. Maybe you just tell in the help button, one can use Mobile hotspot to make a local net connection?


Tried it.
I have USB-network connection to the PC (with Mobile Hotspot application). The local net is working. I can for example ssh both ways.

When I start HeySms, it just tells "Loading Bonjour contacts" and then quits.

I tried to run it in xterminal, and it gives this:
Code:

$ heysms
Unsupported date format character at 1 (%-d.%-m.)
Traceback (most recent call last):
  File "/usr/bin/heysms", line 32, in <module>
    main()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 184, in main
    ui.central_widget.reload_contacts()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 85, in reload_contacts
    self.parent.bonjour_users = list_presence_users()
  File "/usr/lib/python2.5/site-packages/heysms/lib/lib.py", line 201, in list_presence_users
    callBack=browse_callback)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 1409, in DNSServiceBrowse
    None)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 286, in _errcheck
    raise cls(result)
lib.pybonjour.BonjourError: (-65537, 'unknown')


Oh ! Maybe I forgot a dependency in packaging ...
Do you have avahi-daemon installed ?
What do you have with :
apt-cache show avahi-daemon

zimon 2012-06-05 20:36

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218091)
Oh ! Maybe I forgot a dependency in packaging ...
Do you have avahi-daemon installed ?
What do you have with :
apt-cache show avahi-daemon

Code:

$ dpkg -l | grep avahi
ii  libavahi-client3                                    0.6.24-0maemo5                            Avahi client library
ii  libavahi-common-data                                0.6.24-0maemo5                            Avahi common data files
ii  libavahi-common3                                    0.6.24-0maemo5                            Avahi common library
ii  libavahi-compat-libdnssd1                          0.6.24-0maemo5                            Avahi Apple Bonjour compatibility library

Yep, avahi-daemon was not installed.
....

edit:

After installing avahi-daemon:
Code:

$ dpkg -l | grep avahi
ii  avahi-daemon                                        0.6.24-0maemo5                            Avahi mDNS/DNS-SD daemon
ii  libavahi-client3                                    0.6.24-0maemo5                            Avahi client library
ii  libavahi-common-data                                0.6.24-0maemo5                            Avahi common data files
ii  libavahi-common3                                    0.6.24-0maemo5                            Avahi common library
ii  libavahi-compat-libdnssd1                          0.6.24-0maemo5                            Avahi Apple Bonjour compatibility library
ii  libavahi-core5                                      0.6.24-0maemo5                            Avahi's embeddable mDNS/DNS-SD library

But still no luck:
Code:

$ heysms
Unsupported date format character at 1 (%-d.%-m.)
Traceback (most recent call last):
  File "/usr/bin/heysms", line 32, in <module>
    main()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 184, in main
    ui.central_widget.reload_contacts()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 85, in reload_contacts
    self.parent.bonjour_users = list_presence_users()
  File "/usr/lib/python2.5/site-packages/heysms/lib/lib.py", line 201, in list_presence_users
    callBack=browse_callback)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 1409, in DNSServiceBrowse
    None)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 286, in _errcheck
    raise cls(result)
lib.pybonjour.BonjourError: (-65537, 'unknown')


titilambert 2012-06-05 20:36

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by davdav (Post 1218076)
A good idea
Can you make it send emails with the SMS content
And you can reply back by sending back an email with a prefix maybe like SMS: -N "phone number" -t "text here "

Thanks!
Hum ... good question !
I don't think, but I will check it !

titilambert 2012-06-05 21:36

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by zimon (Post 1218096)
Code:

$ dpkg -l | grep avahi
ii  libavahi-client3                                    0.6.24-0maemo5                            Avahi client library
ii  libavahi-common-data                                0.6.24-0maemo5                            Avahi common data files
ii  libavahi-common3                                    0.6.24-0maemo5                            Avahi common library
ii  libavahi-compat-libdnssd1                          0.6.24-0maemo5                            Avahi Apple Bonjour compatibility library

Yep, avahi-daemon was not installed.
....

edit:

After installing avahi-daemon:
Code:

$ dpkg -l | grep avahi
ii  avahi-daemon                                        0.6.24-0maemo5                            Avahi mDNS/DNS-SD daemon
ii  libavahi-client3                                    0.6.24-0maemo5                            Avahi client library
ii  libavahi-common-data                                0.6.24-0maemo5                            Avahi common data files
ii  libavahi-common3                                    0.6.24-0maemo5                            Avahi common library
ii  libavahi-compat-libdnssd1                          0.6.24-0maemo5                            Avahi Apple Bonjour compatibility library
ii  libavahi-core5                                      0.6.24-0maemo5                            Avahi's embeddable mDNS/DNS-SD library

But still no luck:
Code:

$ heysms
Unsupported date format character at 1 (%-d.%-m.)
Traceback (most recent call last):
  File "/usr/bin/heysms", line 32, in <module>
    main()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 184, in main
    ui.central_widget.reload_contacts()
  File "/usr/lib/python2.5/site-packages/heysms/heysms.py", line 85, in reload_contacts
    self.parent.bonjour_users = list_presence_users()
  File "/usr/lib/python2.5/site-packages/heysms/lib/lib.py", line 201, in list_presence_users
    callBack=browse_callback)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 1409, in DNSServiceBrowse
    None)
  File "/usr/lib/python2.5/site-packages/heysms/lib/pybonjour.py", line 286, in _errcheck
    raise cls(result)
lib.pybonjour.BonjourError: (-65537, 'unknown')


Stupid question ... Is it running ?

zimon 2012-06-05 21:40

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218124)
Stupid question ... Is it running ?

no, it (avahi-daemon) wasn't.

Now it is and heysms runs.
....
"No Bonjour contacts found."

What I should configure in PC Linux Pidgin-end?
Create a Bonjour-protocol account with what username?

titilambert 2012-06-05 22:33

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by zimon (Post 1218127)
no, it (avahi-daemon) wasn't.

Now it is and heysms runs.
....
"No Bonjour contacts found."

What I should configure in PC Linux Pidgin-end?
Create a Bonjour-protocol account with what username?

Yes ! launch Pidgin, create a bonjour account and use the username you want ! and active his account ...
Then click on reload button on HeySms and you will see your account ... :)

darodi 2012-06-05 23:36

Re: [Announce] HeySms - Send and receive sms on your computer
 
replying to a sms via bonjour/pidgin doesn't work for me.
I receive the message in pidgin from a phone number in the form +32477xxxxxx

when i reply, in the log i see :

Code:

new_message to    contact1
new_message content    it works?
send_sms
it works?
to
2477xxxxxx
Phone.SMS.Error.Generic: Invalid parameter
sending sms failed, retry
end sending


the first 2 digits '+3' are lost in the destination number.

titilambert 2012-06-06 00:05

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by darodi (Post 1218168)
replying to a sms via bonjour/pidgin doesn't work for me.
I receive the message in pidgin from a phone number in the form +32477xxxxxx

when i reply, in the log i see :

Code:

new_message to    contact1
new_message content    it works?
send_sms
it works?
to
2477xxxxxx
Phone.SMS.Error.Generic: Invalid parameter
sending sms failed, retry
end sending


the first 2 digits '+3' are lost in the destination number.

Hello !
Well well well.. I m from Montreal, my number is +1 514 xxxx ...

I never test HeySms with number outside america ...
Could you tell me where do you come from ? and what is the structure of your number ?

Thanks !!

titilambert 2012-06-06 01:12

Re: [Announce] HeySms - Send and receive sms on your computer
 
I confirm !
HeySms works only with american number... I will fix it to night ...

titilambert 2012-06-06 03:52

Re: [Announce] HeySms - Send and receive sms on your computer
 
I just update the package
This fix avahi dependency and number error ...

Also, I will create a roadmap on github

Scorpius 2012-06-06 04:54

Re: [Announce] HeySms - Send and receive sms on your computer
 
This is so awesome! I was thinking in making a program like this.

Since it's 12:22 am here and everybody's sleeping I sent myself an automated SMS. But these SMS are alphanumeric so it seems it doesn't get recognized by this little program.

In my country we receive a lot of alerts through alphanumeric SMS (Normal SMS just that they don't come from a number but from a word). Usually bills (reminders that you haven't pay something).

Does it only work with numbers? I'd have to wait to decent hours to test it.

darodi 2012-06-06 07:25

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218172)
Hello !
Well well well.. I m from Montreal, my number is +1 514 xxxx ...

I never test HeySms with number outside america ...
Could you tell me where do you come from ? and what is the structure of your number ?

Thanks !!

I'm in Europe. The format is usually

+ (intl code number) xxxxxx

In Europe, intl code number can be 2 or 3 digits long (For example, 3 digits in Luxembourg '352', 2 digits for Belgium '32' )
'1' is the intl code number for America. That one is only one digit long.

foobar 2012-06-06 09:54

Re: [Announce] HeySms - Send and receive sms on your computer
 
Hm, shouldn't the full international number always be used, regardless of (length of) prefix? That is, shouldn't the 'from' be totally opaque to HeySms? Just wondering...

titilambert 2012-06-06 12:50

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by foobar (Post 1218308)
Hm, shouldn't the full international number always be used, regardless of (length of) prefix? That is, shouldn't the 'from' be totally opaque to HeySms? Just wondering...

Hello !!! You right ! :D
in fact you can t send international sms for now ( i never tested it ...)
I will fix it !

Thanks !

enne30 2012-06-06 14:41

Re: [Announce] HeySms - Send and receive sms on your computer
 
Very good one, anyway I already used to VNC my N900 from PC (x11VNC) in order to send sms remotely :D

benny1967 2012-06-06 20:31

Re: [Announce] HeySms - Send and receive sms on your computer
 
Oh my God! Look at this!

http://talk.maemo.org/showthread.php?t=62897

I knew I liked the idea from the start LOL
(I should change the status from "sandbox" to implemented")

titilambert 2012-06-06 20:52

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by benny1967 (Post 1218578)
Oh my God! Look at this!

http://talk.maemo.org/showthread.php?t=62897

I knew I liked the idea from the start LOL
(I should change the status from "sandbox" to implemented")

Nice ! :D
Actually, I made this application last year ... I just didn't take the time to publish it ...
Next step : stabilization
Next step : Port to N9/N950

darodi 2012-06-06 23:22

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by foobar (Post 1218308)
Hm, shouldn't the full international number always be used, regardless of (length of) prefix? That is, shouldn't the 'from' be totally opaque to HeySms? Just wondering...

I totally agree.
removing the prefix is not a solution either.

In my case, Belgium.
sending a sms to +32 477 xxxxxx works
sending a sms to 477 xxxxxx wouldn't work.
sending a sms to 0477 xxxxxx would work

The rule in Belgium is:
if no intl prefix is used, the regional prefix 477 should be preceded with a 0.

Those kind of rules can change in every country.
Using the full number as stated in the contact list, regardless of its format, would be the better solution

Scorpius 2012-06-06 23:29

Re: [Announce] HeySms - Send and receive sms on your computer
 
I don't really get it why is there a distinction in numbers. Everything that is SMS should be forwarded via Bonjour. There's a way to differentiate SMS from IM in whatever method you're using for coding (python, Qt, GLIB).

titilambert 2012-06-07 04:10

Re: [Announce] HeySms - Send and receive sms on your computer
 
Hello !

I just made a new version which should work with all countries and all sms from all country ! :)
It's in devel repository : HERE

Please tell me if it's working for you guys !

I'm waiting your comment !

Thanks !

titilambert 2012-06-07 12:39

Re: [Announce] HeySms - Send and receive sms on your computer
 
Package is imported in testing !

benny1967 2012-06-07 14:48

Re: [Announce] HeySms - Send and receive sms on your computer
 
OK, there's somthing fishy here - but I need more input from other users and XMPP-experts before I call it a bug:

HeySMS (1.2.0-1) works fine when used together with Pidgin. (There is a message in the Pidgin debug window that looks like an error, but it doesn't seem to have any effect; the message is "jabber: XML parser error for BonjourJabberConversation 0x8ff0ac0: Domain 1, code 5, level 3: Extra content at the end of the document" and is issued after every SMS that's either sent or received.)

When used with Empathy, though, only some contacts/senders work. SMS-messages from other contacts never get through. What happens is that the contact appears in Empathy when the SMS comes in, but disappears immediately. The content of the SMS is not transmitted to the PC. Empathy then disconnects the link local account.

I tried to find something that the non-working contacts have in common. I found it: a space character. Messages from numbers that are not in my address book always work because they create a contact that consists of numbers only, no spaces. Messages from contacts that I stored as "Mum" or "David" also always work. Messages from contacts that have a space in either first or last name ("David jun.") or have both first and last name filled in ("David Miller") never work.
I changed existing entries in the address book to verify this, I'm almost 100% certain that the issue is the space character.

This made me check the XML that's sent. I found something like this:

Code:

<message from="David Miller" to="benny@myhome" type="chat" id="798420758213">
<body>Test</body>
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">Test</body>
</html>
</message>

Please not the "from" in the first line. Is this valid in XMPP? IIRC a space character is not, while a "@" followed by a host name is mandatory. I'm not sure, though, especially when Link Local messaging is involved.

Could it be that Pidgin is more forgiving about such issues than Empathy and that in fact the XMPP created by HeySMS is buggy?

Or is the XMPP message created by HeySMS correct and there's a bug in Empathy or the underlying telepathy framework?

I'd love to get it working with Empathy, because it's much better integrated with my Gnome desktop.

=== Edit:

Just for comparison, a hand-written message sent from the normal Link-Local account on my N900 looks like this:

Code:

<message from="chatwithme@Nokia-N900-42-11" to="benny@myhome" type="chat" id="68596804">
<body>Test </body>
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">Test </body>
</html>
</message>

No error message in Pidgin, no trouble with Empathy. Note the "from" attribute.

titilambert 2012-06-07 15:23

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by benny1967 (Post 1218966)
OK, there's somthing fishy here - but I need more input from other users and XMPP-experts before I call it a bug:

HeySMS (1.2.0-1) works fine when used together with Pidgin. (There is a message in the Pidgin debug window that looks like an error, but it doesn't seem to have any effect; the message is "jabber: XML parser error for BonjourJabberConversation 0x8ff0ac0: Domain 1, code 5, level 3: Extra content at the end of the document" and is issued after every SMS that's either sent or received.)

When used with Empathy, though, only some contacts/senders work. SMS-messages from other contacts never get through. What happens is that the contact appears in Empathy when the SMS comes in, but disappears immediately. The content of the SMS is not transmitted to the PC. Empathy then disconnects the link local account.

I tried to find something that the non-working contacts have in common. I found it: a space character. Messages from numbers that are not in my address book always work because they create a contact that consists of numbers only, no spaces. Messages from contacts that I stored as "Mum" or "David" also always work. Messages from contacts that have a space in either first or last name ("David jun.") or have both first and last name filled in ("David Miller") never work.
I changed existing entries in the address book to verify this, I'm almost 100% certain that the issue is the space character.

This made me check the XML that's sent. I found something like this:

Code:

<message from="David Miller" to="benny@myhome" type="chat" id="798420758213">
<body>Test</body>
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">Test</body>
</html>
</message>

Please not the "from" in the first line. Is this valid in XMPP? IIRC a space character is not, while a "@" followed by a host name is mandatory. I'm not sure, though, especially when Link Local messaging is involved.

Could it be that Pidgin is more forgiving about such issues than Empathy and that in fact the XMPP created by HeySMS is buggy?

Or is the XMPP message created by HeySMS correct and there's a bug in Empathy or the underlying telepathy framework?

I'd love to get it working with Empathy, because it's much better integrated with my Gnome desktop.

Hello !

When I started HeySms, i remember to get an error like this with Kopete ! But I didn't reproduce the bug with Pidgin ... So i think that was one of countless bigs of kopete ... ;)

So, I just need to know how "encode" space character and I think I have the same bug with accented characters ...

titilambert 2012-06-07 15:42

Re: [Announce] HeySms - Send and receive sms on your computer
 
Maybe a urlencode ???
=> From="firstname%20lastname" ???

foobar 2012-06-07 16:03

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by benny1967 (Post 1218966)
Please not the "from" in the first line. Is this valid in XMPP?

Nope. :)
A valid XMPP address is either of:

* host
* node@host
* node@host/resource

Spaces are not allowed in neither host nor node.

I would recommend something like +xxxxx@n900/sender's name, where +xxxxx is the sender's number. You will have to apply the resourceprep profile of stringprep to the resource part (i.e. the sender's name) to avoid trouble with accents etc. Since sender number can be alphanumeric it might be a good idea to apply the nodeprep profile of stringprep to the node part, too. If you can guarantee that those alphanumeric numbers use ASCII characters only then you can skip that part. But if you get resourceprepping working then this shouldn't be difficult to add and might make things easier if non-ASCII numbers should turn up in the future. :)

titilambert 2012-06-07 16:11

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by foobar (Post 1218991)
Nope. :)
A valid XMPP address is either of:

* host
* node@host
* node@host/resource

Spaces are not allowed in neither host nor node.

I would recommend something like +xxxxx@n900/sender's name, where +xxxxx is the sender's number. You will have to apply the resourceprep profile of stringprep to the resource part (i.e. the sender's name) to avoid trouble with accents etc. Since sender number can be alphanumeric it might be a good idea to apply the nodeprep profile of stringprep to the node part, too. If you can guarantee that those alphanumeric numbers use ASCII characters only then you can skip that part. But if you get resourceprepping working then this shouldn't be difficult to add and might make things easier if non-ASCII numbers should turn up in the future. :)

Thanks !
Is it possible to have "heysms@n900/sender1", "heysms@n900/sender2", ... ?
And how the contact will be shown in the pidgin/kopete/... client ?? "sender1" ? "heysms@n900/sender1"

benny1967 2012-06-07 16:11

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218977)
So, I just need to know how "encode" space character and I think I have the same bug with accented characters ...

Maybe this - or something completely different. I don't know if you use existing code for the whole XMPP-thing or if you wrote it yourself. So I don't know which options you have. But as far as I understand (I'm not sure!), the identifier in the "from"-attribute and the name that is displayed in the chat client (Pidgin etc) are 2 different things.

First name, last name and nickname are not supposed to be part of the ID that is transmitted in the "from"-attribute. According to the specification, they are part of the DNS TXT record that mDNS publishes.

The ID that's used for the "from" (or "to") attribute will normally not show up in the chat client. It seems it's used as a fallback only if everything else fails... which is the case with HeySMS.

Do you have avahi-discover installed? It gives you a nice comparison. For example, both the desktop account and the regular N900 account show up under "iChat Presence" as somthing like this:

type '_presence._tcp'
name benny@myhome
domain 'local'
Host myhome.local / 10.0.0.160:5298,
TXT txtvers=1
TXT 1st=Oskar G.
TXT last=Welzl
TXT port.p2pj=5298
TXT status=avail
TXT node=libpurple
TXT ver=2.10.4
TXT vc=!
TXT phsh=8917af748c3a0d52c7a0aadda54bde740e8ac3c0

What I know is that this account, created in Pidgin, shows up as "Oskar G. Welzl" in every other XMPP Link Local enabled client I use. It does not show up as "benny", although "benny@myhome" is used in the "from"-/"to"-attributes that are used during the conversation. All these data fields preceded by TXT come from the DNS TXT record.

When I examine one of the accounts created by HeySMS with avahi-discover, most of these TXT fields don't exist. I only find:

TXT port.p2pj=5299
TXT version=1
TXT txtvers=1
TXT status=avail


So what I assume would be the right thing to do is:
Find a way to create these TXT fields from within your code. In case it's a known contact from the address book, fill in
TXT last
TXT nick
TXT 1st
accordingly. If the sender is not found in the address book, maybe use
TXT nick
only and put the number there.
Then, create an ID based on the hostname and the phone numer of the sender - you'll end up with something like "+123456@Nokia-N900-42-11". Use this ID within the XMPP-conversation to fill "From"/"To".

And, above all, wait for input from other folks here. I'm not a real expert in XMPP and zeroconf.

titilambert 2012-06-08 04:04

Re: [Announce] HeySms - Send and receive sms on your computer
 
Hello !
Fix is in devel repository ! 1.2.1-1
I think it fixes the compatibility with client like Empathy (normal clients :D )

I'm waiting for you comments !

Thanks all !

benny1967 2012-06-08 09:48

Re: [Announce] HeySms - Send and receive sms on your computer
 
Works with Empathy and all the various name combinations that had not worked last time. Sweet! This should be on every phone! :)

titilambert 2012-06-08 12:30

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by benny1967 (Post 1219370)
Works with Empathy and all the various name combinations that had not worked last time. Sweet! This should be on every phone! :)

Yeah !!!
Imported to testing !

Thanks again !

(I use the "TXT nick" and i delete all special characters ...)

benny1967 2012-06-09 12:38

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218087)
I just don't have N9 ...
I will present this application to meamo competition code 2012 to win a N9/N950 and port it ... :)

Thanks

Takes far too long. Somebody here with knowledge about Python on Harmattan should submit required patches to github now. :)

(Of course I still think you should win a N9 or N950 for this.)

darodi 2012-06-09 17:12

Re: [Announce] HeySms - Send and receive sms on your computer
 
Quote:

Originally Posted by titilambert (Post 1218698)
Hello !

I just made a new version which should work with all countries and all sms from all country ! :)
It's in devel repository : HERE

Please tell me if it's working for you guys !

I'm waiting your comment !

Thanks !

still not working with HeySms v1.2.1-1

Code:

contact1
new_message to  contact1
new_message content test
content  test
send_sms  test
to  +32477xxxxxx
sent pdu [17, 0 , 11 ......................
sms sent
end sending

at the same time, I get a yellow n900 notification "incorrect number".

Yet the phone number printed and the new code in createPDUmessage seems OK. I don't get it.


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

vBulletin® Version 3.8.8