×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    6

    Send & Receive sms Using MSComm, AT Commands

    The Nokia SDK not use the mscomm / At commands for sms. But I want to Send & Receive sms Using MSComm, AT Commands

    I try this code but it wont work,

    MSComm1.CommPort = 4 ' Com4 Port
    MSComm1.Settings = "115200,n,8,1"
    MSComm1.InputLen = 0
    MSComm1.PortOpen = True
    MSComm1.Output = "AT" & Chr$(13) & Chr(10)
    MSComm1.Output = "AT+CMGF=1" & Chr$(13) & Chr(10)
    MSComm1.Output = "AT+CMGS=" & Chr$(13) & "+94777567457" & Chr$(13) & ",129" & Chr(13) & Chr(10)
    MSComm1.Output = "This is a testing message " & Chr(26)
    MSComm1.PortOpen = False

    Please tell me whats wrong with this. If u can give me a sms receiving vb code It'll be grateful.

    And I want to know how to check the response from the mscomm
    For eg: If i send a AT command i want to check the response for it.
    tell me how to do that

    Thanx.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    590
    Hi,

    I would say that Your code seems to be good.
    Did You try these commands with Hyperterminal? Does it work?
    There is an example called VBTerm in the MSDN library SAMPLES\VB98\MSCOMM, which is similar to the Hyperterminal. Does it work with Your phone?

    Best regards,

    Barna
    Forum Nokia

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    2
    I am also trying to write similar code but not successful till now. Would like to know if we can communicate with phones without using the connective SDK as my experience with the Connectivity SDK is not very good,

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: Send & Receive sms Using MSComm, AT Commands

    Hello friends.

    I can send AT commands to my nokia 6230 using a DKU-2 cable and Visual Basic. I can send data, but i can not receive nothing from the phone.

    I'm using the cable, and when i plug in it, it appears a new com port called com5. It works good to send at commands, but not works (yet) to receive.

    Help me please, what can I do???

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    Re: Send & Receive sms Using MSComm, AT Commands

    You need to use a timer control to check the MSComm buffer on a regular basis to receive data from the phone. The phone will respond within a second or less to any input, the data is stored in the buffer for a very short space of time then cleared.

    The best way to do it is to have a timer set to clear the buffer every 10 miliseconds (or what have you) after a command has been sent.

    Experiment with that and you'll find a suitable solution for what you are trying to acheive.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Question Re: Send & Receive sms Using MSComm, AT Commands

    Quote Originally Posted by aahartley View Post
    You need to use a timer control to check the MSComm buffer on a regular basis to receive data from the phone. The phone will respond within a second or less to any input, the data is stored in the buffer for a very short space of time then cleared.

    The best way to do it is to have a timer set to clear the buffer every 10 miliseconds (or what have you) after a command has been sent.

    Experiment with that and you'll find a suitable solution for what you are trying to acheive.
    Thank you for your help, thanks for your answer. I will try it right now. But now i have another one question. I am sorry, but I need your help.

    I migrate from Visual Basic 6 to Visual Basic 2005. In VB2005 I can write correctly AT commands to my nokia 6230, but I can not receive all data. Now i can receive responses like OK and ID from nokia, but can not read short messages.

    In VB2005, when I wrote AT, received OK,
    I wrote AT+CMGF=1, received OK
    I wrote AT+CGMM, receiving Nokia 6230 (empty line) OK
    but I wrote AT+CMGR=1 and can not receive data, it does not received nohthing... (using hyperterminal it works right)

    What can i do to read messages from my Nokia 6230 using AT comands and VB2005?

    Thanks again

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    1

    Re: Send & Receive sms Using MSComm, AT Commands

    I am working on project in which I have to send and receive sms. I've done sending with VBS using MScomm control and AT commands, but I' am not sure how to do receiving. Problem that I have is, how to extract text of sms from received message. I would appreciate any help. If somebody have VBS or VB code it would be very helpful to me.

    Thanks

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    1

    Re: Send & Receive sms Using MSComm, AT Commands

    Hi,

    In the topic of AT Command for send/receive SMS. Anyone knows why some SMS read (eg. +GMGL, +CMGR) command doesnt work on some Nokia phones, +CPMS return empty value and it cannot be set? Are they not supported on some Nokia phones?

    AT+CPMS?
    +CPMS: ,,,,,,,,
    OK

    AT+CPMS=?
    +CPMS: (),(),()
    OK

  9. #9
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Question Re: Send & Receive sms Using MSComm, AT Commands

    Quote Originally Posted by Macolina View Post
    I am working on project in which I have to send and receive sms. I've done sending with VBS using MScomm control and AT commands, but I' am not sure how to do receiving. Problem that I have is, how to extract text of sms from received message. I would appreciate any help. If somebody have VBS or VB code it would be very helpful to me.

    Thanks
    Hi Macolina,
    Am trying to SEND sms through PC using MSComm.
    While searching a solution i found your thread that, Sending SMS works good for you.
    Can u pls help me in this issue.

    Thanks in advance.
    Arun

  10. #10
    Registered User
    Join Date
    Nov 2010
    Posts
    2

    Re: Send & Receive sms Using MSComm, AT Commands

    hello. this is firtst post on this forum. please excuse my english.i hope you understand. data base that can be acces with an sms to gsm modem.the modem is use based by ideea of at commands. i try this commands in hyperterminalit's ok..the next step?i hope you understand me. every ideea si useful. good luck.thanks

  11. #11
    Registered User
    Join Date
    Dec 2010
    Posts
    3

    Re: Send & Receive sms Using MSComm, AT Commands

    I require some help.

    I am working on a project. I need to read the contents of a SMS, send it to a Java program. The Java program then generates another message which I need to send as a reply to the SMS. Does anyone know how to do this?

    Please help!

  12. #12
    Registered User
    Join Date
    May 2010
    Posts
    4

    Re: Send & Receive sms Using MSComm, AT Commands

    Save your time. There exists already an application that can receive SMS and send automatic SMS replies. See it here:
    http://smsenabler.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×