Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 15, 2018 4:10 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to send SMS with RealBasic
PostPosted: Mon Jun 15, 2009 9:59 am 
Offline

Joined: Wed Sep 10, 2008 6:48 am
Posts: 108
Location: The Netherlands (LB)
Hi,

I want to create a send SMS (Textmessage) function. The application will be used from a notebook in the middle of the nature. Because of that I do not always have garantee for a good internet signal or a wired telephone line. Cellphones work good!
So I'm searching for sending a SMS from RealBasic using a cellphone (connected by USB, Serial or Bluetooth).
Anybody as suggestion how to do this?

Thanks in advance,

_________________
Marc
The Netherlands
___________________________________________________________________
Desktop / Web: RealStudio with MySQL, Ben's Listbox, MBS plugins, DynaPDF
Mobile: Basic4Android Use this code (cgtdsr) if you want to buy an enterprice license -50%


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Mon Jun 15, 2009 12:59 pm 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
Hi Marc

(1) Download my PDU example
http://www.devilliers.org.za/pdustuff.zip

(2) Read up about stuff.

You need to send a PDU to a cellphone to make it send the message. Not having the code at hand now, I can'[t just detail it but DL the example and see what happens. It works - that much I can tell you.

Greg


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Mon Jun 15, 2009 6:12 pm 
Offline

Joined: Wed Sep 10, 2008 6:48 am
Posts: 108
Location: The Netherlands (LB)
Hi GreGorGy,

Thanks for your reply.

I downloaded the pdustuff, but it seems to be incomplete.
On your website I found:
Quote:
PDU Decode/Encode: Two classes to encode or decode PDUs. A PDU is the SMS (text) command used to communicate on the serial port for most mobile devices. Decode receives and encode sends SMS messages

and in the message you wrote:
Quote:
Download the example and see what happens


In the downloaded zip I can only find Class1 with the TextToPDU method. Your message and website suggest there is also a DpuToText method and an example. Can you also provide these by download? On TSB I can see you 've got it working. That brings hope!
I have read some general information found by Google about PDU and sending AT commands. But that didn't gave me the clue yet.

I hope you can find some time to extract an example from your sending SMS code.

Best regards,

_________________
Marc
The Netherlands
___________________________________________________________________
Desktop / Web: RealStudio with MySQL, Ben's Listbox, MBS plugins, DynaPDF
Mobile: Basic4Android Use this code (cgtdsr) if you want to buy an enterprice license -50%


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Jun 16, 2009 3:03 am 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
Hi Marc

The class for DL is in fact incomplete. It was the last one I had left before a lovely system HD failure deleted lots of my stuff. That said, I do have a working example.

http://www.devilliers.org.za/PDUExample.zip

There has been a reasonable amount of interest in this of late so maybe I will open it up and detail how to go backwards, from a received PDU SMS back to the original text. That is quite a bit more involved than text to PDU.

Download the example. In Window1, you will see three EditFields. One is for the recipient's number. The next is the text message and the final one is merely the SerialPort throughput. In the example, select the serial port where the ME is connected, enter the number, type the message and click send. MsgBox break points (0,1 and 2) will appear. These are just there for debugging. 2 means that the PDU has been accepted by the ME and will be sent.

Download it, give it a try, and see how you can use the code. If you feel some parts require explanation, plesae tell me and then at least I will know what direction to take with this.

Good luck.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Jun 16, 2009 7:16 am 
Offline

Joined: Wed Sep 10, 2008 6:48 am
Posts: 108
Location: The Netherlands (LB)
Hey GreGorGy,

I've got it working. Your example is perfect!
Now I can send a SMS directly from my application using a bluetooth GSM.


Thanks, Thanks.....
Marc

_________________
Marc
The Netherlands
___________________________________________________________________
Desktop / Web: RealStudio with MySQL, Ben's Listbox, MBS plugins, DynaPDF
Mobile: Basic4Android Use this code (cgtdsr) if you want to buy an enterprice license -50%


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Jun 30, 2009 9:46 am 
Offline

Joined: Fri Jul 07, 2006 4:29 am
Posts: 6
Hi from France,

I'm totally newbie in Realbasic but I think I can do what I want with it : make a deamon that will receive SMS and store it into a MySQL database and also send SMS from this database.

How can I do this ?

Thanks for your help,

Alex


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Jun 30, 2009 12:09 pm 
Offline

Joined: Wed Sep 10, 2008 6:48 am
Posts: 108
Location: The Netherlands (LB)
This code can only send an SMS.
Receiving must be possible but then you have to complete the example code.

In my case I created a desktop application instead of an deamon/service.
If I start the application without anny parameter the I can send a message by a userinterface.
Using some commandline parameters I can run the same exe (windows) but then it sends the SMS without showing the user interface or showing a progress bar.

In detail:
My Application reads a ini file with the encrypted connection details for my MySQL database. Then it searchs for parameters /S (Silent - No UI) or /P(Only a Progressbar)
It connect to the database. In the database there is a table with my SMS messages and numbers. A tiny integer flagfield is set to 1 if the message is send.
An other application (my main app) stores messages into that table and the flag for sending remains zero. At a specific moment my app or the sheduler starts the SMS sender app with the /s parameters. That makes the app invisible. The sender selects all zero flag records and sends them by sms. After sending the record flag is updated to 1. As soon as all messages will be send the sender will be quit.

best regards,
Marc

_________________
Marc
The Netherlands
___________________________________________________________________
Desktop / Web: RealStudio with MySQL, Ben's Listbox, MBS plugins, DynaPDF
Mobile: Basic4Android Use this code (cgtdsr) if you want to buy an enterprice license -50%


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Thu Jul 02, 2009 12:10 am 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
If I get a break this weekend, I will work on the decode example. Can't promise though but if i get enough nagging it will be done :)


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Thu Jul 02, 2009 8:48 am 
Offline

Joined: Fri Jul 07, 2006 4:29 am
Posts: 6
Hi GreGorGy,

that would be great !!!!

Thanks,

Alex


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Fri Jul 10, 2009 9:03 am 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
Good intentions have paved my road. Rather than work on this for the past week, I accepted a last-minute offer to go on safari. So I went. Saw the usual animals one sees in Africa. It was a needed break. Sooooo - I did not work on the decoder. I will start this weekend though (unless another safari comes my way:))


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Sun Jul 12, 2009 3:52 am 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
Done. Examples still to be added but for now:

http://www.devilliers.org.za/pdustuff.zip

has been updated


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Jul 14, 2009 4:44 pm 
Offline

Joined: Fri Jul 07, 2006 4:29 am
Posts: 6
Hi GreGorGy,

didn't get the time yet to check but a big thanks !

How was your safari anyway ?

Thanks again,

Alex


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Wed Jul 15, 2009 12:41 am 
Offline

Joined: Fri Jul 14, 2006 1:38 am
Posts: 82
Location: South Africa
Safari was great. During my adventures, I ran in to one of my rugby heroes. He was kind enough to pose for a photo and sign my ticket for the Super 14 final match, which for those of you unfamiliar with the code, is the premier southern hemisphere competition which my home team won. In fact, the particular individual basically won it for us. That was sweet. It also motivated me to get home and do the PDU thing in no time at all. For more information on PDU and SMS, visit this resource:

http://www.dreamfabric.com/sms/

I used it years ago when I first wrote the code and again this weekend when I updated it. I have not upgraded to RB2009 (awaiting cocoa) so the code may fail in some places but I will start going through that shortly.

Greg


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Apr 10, 2012 7:01 pm 
Offline

Joined: Tue Sep 19, 2006 5:10 pm
Posts: 179
I was recently looking at using my AT&T Sierra Wireless, Inc Model: AirCard 313U and interfacing it to my computer using Real Studio and enable sending SMS or MMS messages. I searched through the board and found this. I realize this post is old but I was wondering if you had any idea why this app does not work.

Basically the app appears to work the first time as it responds with what is contained in the quotes. Afterwards the device will not send any more data. However the text is never sent and no error messages occur. I stepped through the debugger on a send and 0 errors are indicated in Serial1.Error

Here is the response from trying to send "Test" to my mobile # which is visible in the 'logger' TextArea
Quote:
~ F~~ıy}^SWI9200X_01.00.03.01BT R2748 CARMD-EN-10526 2011/07/25 19:22:25SWI9200X_01.00.03.01AP R2748 CARMD-EN-10526 2011/07/25 19:31:2503~~TbSWI9200X_01.00.03.01AP R2748 CARMD-EN-10526 2011/07/25 19:31:25SWI~


Here is an image of MakePDU from the debugger
Image

I made a few checks along the way but nothing seems the resolve this. Do you have any suggestions?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: How to send SMS with RealBasic
PostPosted: Tue Apr 17, 2012 8:28 am 
Offline

Joined: Mon Jul 19, 2010 6:59 pm
Posts: 4
Hey Guys,

I actually have a solution that makes it a lot simpler to send text messages minus the need for cell phones :) If anyone is interested just let me know and I will post an open source class on GitHub. My class uses Twilios API http://www.twilio.com/

I know this isn't exactly what the original poster needed but maybe this might help other people out


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group