-
Send, receive SMS through GSM Modem using visual basic 6.0
Hello friends , I am new to this site. I wanted some help.
Question : How do i send or receive SMS (GSM modem) using VB6 code, and not third party ActiveX controls?
Is it possible using Comm Control , if yes then what would be the ATL Commands for it. please........:(
-
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
Quote:
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
Thanks pal
-
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
SMS_AT_String = "AT+CMGF=1" & Chr(13) & "AT+CMGF=" & Chr(34) & Mobile_Number & Chr(34) & Chr(13) & SMS_Message & Chr(26)
please Help me as I dont have the extended AT Command List for the GSM Modem, It is cheap modem,
But it supports General AT Commands
Please Help Me, It's Urgent
-
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.
Thanks once again......
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
You're welcome.
Yes, I'd love to have a look at your sample program, since I still got some work to do with my modem section later this year.
-
1 Attachment(s)
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]
Buy for now.
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
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.
-
1 Attachment(s)
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Quote:
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...........
Thank you WoF once again
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Hello!!!
anybody there , Moderators 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
Quote:
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
Quote:
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.
Ok , Hey you can email me tooo..............
Bye............
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
HI,
I am trying to develop a prog same as urs....... but its only to send the sms........ I will use niokia phone....
I saw ur SMS prog and u have used MSComm can u give ne tutorial based on MSCOMM control........ and how can i use it to send sms......
Please i need ur help urgently
Also my prog send an email through internet.... Can u temme how to do it... or atleast gimme a link to a code...
-
1 Attachment(s)
Re: Send, receive SMS through GSM Modem using visual basic 6.0
I'm sure, if you search this forum for both issues (MSCOMM and sending email) you will find lots of references.
But to get you going, I've attached a little MSComm Testprogram which might work as a tutorial. It was made for demo purposes and to test serial ports. You can run it on 2 computers and link them up by their com ports. It shows basic setup and basic communication routines for rs232. I think you can also run tqo instances on one computer, if it has 2 com ports (com1 and com2). You have to link com ports with a null-modem cable, that is a 3 wire line where Rxd on one side is connected to TxD on the other and vice versa. (Look it up in the web).
For sending emails you could use some freeware email control. Best search in the internet. Try search for SMTP.ocx. It is an easy to use VB control to send and receive emails.
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Hello there,
I have been working on project in wich I have to send and receive sms. I've done sending sms with VBS using MScomm control, but I am not sure how to do receiving. If you have any VBS code it would be very helpful to me.
Thanks
-
Re: Send, receive SMS through GSM Modem using visual basic 6.0
Hello Guys,
I am new to the SMS world. I want to sent sms and read sms from mobile phone. can u pls provide me vb6 code or application to connect mobile phone send and received sms.
Thanks in advance.