Re: Send, receive SMS through GSM Modem using visual basic 6.0
Yes it's quite easy. Use the MSComm control to establish communications with the modem/terminal. I don't know about GSM but I operated a Siemens M20 for that purpose. Works perfectly.
What I have to AT to initialize the M20 is: (only once after program start)
AT+CPIN="1234" to send the PIN
AT+CSCA="+491722270000" to set the number of the service center (here the german D2 net)
AT+CMS=1 to set the type of simple SMS
AT+CMGF=1 to set the text mode
AT+CSCS="8859-1" to select the character set (maybe obsolete for american)
To send an SMS
AT+CMGS="(number of partner to call)"
the device prompts ">" and you send the message string followed by chr$(26) to terminate.
Best you make a little terminal like testprog:
A TextBox as input line where you can type a command which is send to the modem when you press Enter
A TextBox as output window where you display the answers from the modem.
Then you can play around with it.
I'm quite confident that the AT commands I listet here apply also to other brands of modem.
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Originally Posted by WoF
Yes it's quite easy. Use the MSComm control to establish communications with the modem/terminal. I don't know about GSM but I operated a Siemens M20 for that purpose. Works perfectly.
Thanks Pal , I think i'll play with it now, I think i have some more doubts going on in my mind but i'll see
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Please help me
I connected my GSM Modem and then tested few AT Commands,
then got this AT set here to send an SMS, but i dont know how to read SMS, how to delete stored SMS
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Try to get the manual of the Siemens GSM modem somewhere from the internet. It almost certainly contains a list and descriptions of all supported AT commands. I have no manual handy at the moment but can try to find my command list from M20 tomorrow. M20 and GSM seem to have the same command set.
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Hello WoF,
Sorry I was away for few days.
Thank you very much, I found the Siemens GSM modem manual. I also found its different Model AT commands also. After I tryout with these commands as they are working and complete the application as I want it.
I will post the Manual, and a sample programme if it works may be it will help others also.
If I have any other doubts, I'll post it. I hope you and Other Gurus will find some time to answer me.
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Sorry again,
I was late
any way I have found some of the AT Commands Manual.
Seimens and other also, but I prefer the AVR manual as it is short and descriptive.
Sorry I could not attach the Sample programme, beacuse I was all the time working and correcting the AT commands in my software, which will not mean as an example, I'll prepare one and post it later.
Sorry, but I could not attach other PDF files as they are too large.
If any one requires, they can mail me to [email protected]
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Originally Posted by WoF
Yes, thanks. Seems to me, all Siemens modems have the same command set, at first look.
I'd love to see chunks of your code. Looking forward to it.
Sorry late again,
My God the bloody programme was giving me many errors, just because I added a Timer to do some other work.
At last now its working. I am attaching the code. It's (not chunks of code) just a sample programme.
Please suggest me if some more things have to be or can be added to it.
Thank you for giving me those links to AT commands without which I could not have done.
Moderators/Gurus :
Thank you for CodeGuru.com that my problem is solved. Hey but please don't mark it as resolved, because I want one more help.
Can any one of you teach me step by step how to make this GSM AT Programme as an ActiveX control, It can be posted on CG for everyone to download , free of Cost(At least AT supported GSM). Please...........
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Sorry, I had no time yet to look at your code. I've got a job too, you know?
And I ever only made user-controls, but it should not be soooo difficult to do an ActiveX from a working program. I'd like to learn that too. If nobody can teach us, we'll work that out by ourselves.
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Originally Posted by WoF
Sorry, I had no time yet to look at your code. I've got a job too, you know?
Congratulations WoF on your new Job, I hope everything goes fine there.
Thankyou very much for the Spirit too, you know why I told it to make anActiveX is , beacuse if it is made an ActiveX other process in the form can go on in syncronisation. Any way well see to that,
Moderators, please have you checked my thread and my sample programme, please let me know
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Thanks, but it's not a new job. I just wanted to say that I have also a job to do and therefore had had no time to look at your program.
But now I did.
I think, for an ActiveX component there must still be done a lot of more error trapping and handling.
But let us spin out some ideas:
I could imagine an ActiveX control for SMS sending and receiving, which wraps up the modems AT commands into an easy to use VB component.
Lets call it SMS.
It would have properties like:
SMS.PinNumber
SMS.ControlCenter
SMS.ReceiversPhoneNumber
and for operation
SMS.ConnectionQuality
SMS.IsLoggedIn
SMS.Initialize
but also for interface purposes
SMS.CommPortNumber
SMS.PortSettings
and methods for sending and retrieving SMs
SMS.SendMessage MessageText
SMS.ReadMessage(MessageNumber)
Ok. That was just some basic thinking of what an SMS ActiveX should consist. And it's only the start of it. Before actual implementation there should follow a lot more considerations and planning.
I had some functions for the Siemens M20 implemented as a standard module a while ago, but only for sending SMS. I shall dig that out and see if it gives some more ideas.
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Originally Posted by WoF
Thanks, but it's not a new job. I just wanted to say that I have also a job to do and therefore had had no time to look at your program.
But now I did.
Sure WoF, hope you get some very good ideas, and for the basic start of the ActiveX, I shall try, I'll tryout a simple ActiveX and send you very soon, let me know if some changes.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.