SMS Number Save


+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: SMS Number Save36 days old

  1. #1
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default SMS Number Save

    Hi Folks,
    I need some help with a GSM problem, which seems to be to do with Cntrl Z. But may not be. I am trying to text a number to a GSM module ( with a Z in front of it).
    I want the PIC to save the No in EEPROM & then read it out & save it in a second string Variable.
    Then send me a confirmation text using this saved number. So far the program receives the number & saves it, reads it out of EEPROM & saves it in a different string variable. When it tries to use this number in the variable & send the message, which looks like it is happening when you monitor the RX / TX lines via an RS2323 module & use the compiler Serial COM monitor or Hyperterminal. After sending the text a > appears, then after sending CNTRL Z it still receives a > (indicating it is waiting for more text. So it never sends the message.
    Now if you put an actual mobile number into the code instead of "Str String2", then it completes the sending the text. When seeing the Str String2 number on the LCD & Hyper terminal etc. it all looks correct. Perhaps it needs to be changed to a text format.
    I am not sure how to make the contents of a string variable into text. Has any one any experience with this. I have been on this for days & got no where.

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,675
    Thumbs Up
    Received: 47
    Given: 95
    Total Downloaded
    1.32 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Can you clarify the bit "I am not sure how to make the contents of a string variable into text"

    A string is ascii eg text

    Tim
    Tim

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Tim,
    Ok so what is the difference between the read out code of the EEPROM number which is in HEX i.e. 0 = 30 etc. & the number I am inserting, instead of the string. When you print the string on an LCD it is correct & when you see it appear on Hyper terminal it is correct.
    Regards,
    Gary
    Last edited by bravo; 13th October 2019 at 10:35.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #4
    Junior Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    79
    Thumbs Up
    Received: 2
    Given: 3
    Total Downloaded
    230.41 MB

    0 Not allowed!

    Default Re: SMS Number Save

    I think there are hidden characters on your message.
    Perhaps it may take to investigate what is the exact message sent to the module including non printable characters.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #5
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,779
    Thumbs Up
    Received: 83
    Given: 34
    Total Downloaded
    4.30 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Gary,
    Forgive me if I'm telling you what you already know.
    All information in a micro is stored in binary. It is just the viewing device that makes it look like hex or decimal or ASCII.
    That is why when sending data to an LCD you have to use a modifier like DEC or HEX for display purposes. In other words a viewing program has an inbuilt translator.

    John

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #6
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Guys,
    Thanks for taking an interest. I took a step back today & put the code which just sends me a test message onto an 18F452 which is on one of the Proton boards that Lester sent me. I let it run, & it sent me a test text, while I watched what being sent on the Proton Com port terminal. All was as expected. Then I created an 11 byte string & put my number into the string i.e. Number [0] = 0, Number [1] = 2, etc. I then put this Str Number into where the normal digits of the phone should go & ran that. You can guess what happened------- Instead of sending out digits, it sent out "Str Number".
    The line of code that "dials" the number is as follows: HSerOut ["AT+CMGS=",Str Number,"\r\n"]
    HSerOut [13]
    So I am not up to speed on how you would translate & shift out the contents of the string. I was thinking of putting Number [0], Number [1], etc. but I haven't tried that. I tried putting Dec in front of Number & in front of Str but that is obviously not acceptable, although Dec Number [0] may be ?
    Any ideas would be greatly appreciated.
    Regards,
    Gary

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #7
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,779
    Thumbs Up
    Received: 83
    Given: 34
    Total Downloaded
    4.30 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Sounds like you're having fun Gary.
    I'm experimenting with an Amicus18 from the same source. Still found time to mow the lawns and keep in the good books with the wife
    John

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #8
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Keytapper,
    This is my code from another board but it is the same with the same result.
    Code:
    SMSTx:       
               Low led4 : Low led1 : Low led2 : Low led5
               Set GSMSW
               DelayMS 1000
               Inc tic    
               HSerOut ["AT" ,13]
               HSerIn 2000, SMSTx,[Wait("OK")] 
               High led4
               DelayMS 100
               HSerOut ["AT+CMGF=1" ,13]
               HSerIn 2000, SMSTx,[Wait("OK")] ' wait for response ok for 5 seconds 
                                      ' if it times out, it will go back to SMS and retry
              High led2
              DelayMS 100
              HSerOut ["AT+CMGS=\0", Str phoneNo,"\r\n"]     ' #### No for the CMD55 test set
              HSerOut [13]
              DelayMS 200
              High led1
              HSerOut [ "New Phone No 0", Str phoneNo]
             HSerOut [26] ' this is ASCII for Ctrl+Z

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #9
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi John,
    I tried the HSerOut ["AT+CMGS=",Dec Number [0],"\r\n"] which compiled, when I added the rest of the bytes all the way to Dec Number [10] - & tried to compile it, the compiler gets to 82% & stops working, & comes up with a message " A problem has caused the program to stop working correctly" with options to debug or close the program. So guess that possibility is down the tubes............................................. ........but it had potential !!!!

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #10
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,402
    Thumbs Up
    Received: 290
    Given: 141
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Without seeing the variable types used for the code snippets I can give no real answers.

    However, if you are using String variables, there is no need for the Str or StrN functions. These were added many, many years ago for the old 14-bit core devices to imitate a string from a byte array. But the enhanced 14-bit core devies and the the 18F devices have true String variables.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #11
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Les,
    The string is created with Dim Number [11] as byte.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #12
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,779
    Thumbs Up
    Received: 83
    Given: 34
    Total Downloaded
    4.30 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi Gary,
    You create a string like this:
    Dim MyString as String * 20
    You have created a byte array. The difference is that a string has a character 0 at the end of the data which signifies the end of the string.
    So if you try to send a character array as a string the code won't know when to stop.
    Cheers
    john

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #13
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Thanks John,
    Unfortunately I didn't get around to much on the Proton stuff today. I will be back on to it in the morning. It is 1.42 AM here now. I think you are at least 3 hours behind us across the ditch.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #14
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,779
    Thumbs Up
    Received: 83
    Given: 34
    Total Downloaded
    4.30 GB

    0 Not allowed!

    Default Re: SMS Number Save

    Two and a half hours - we're into daylight saving now. Body is still adjusting.
    I'm in the south east corner of South Australia.
    John

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #15
    Junior Member bravo's Avatar
    Join Date
    Apr 2019
    Posts
    30
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    161.75 MB

    0 Not allowed!

    Default Re: SMS Number Save

    Hi John,
    I am 100 kms South of Christchurch now, after retiring from Babcock at the Navy Dockyard. The good news I have made some progress. I changed the array to a string, but although it sent out the string, it did not make a call because the string was not in inverted commas. So I had to make the string longer by 6 which ended as follows : Dim NUM as String * 16 : NUM = " \"020-------061\" "
    Using this & putting Str NUM where you normally put the number works & monitoring it with the Com port terminal, you see it come with inverted commas.

    This is not not the end of the solution yet, but it is a major step forward.
    I will let you know how the rest goes.
    Best regards,
    Gary

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. which W register is save to use
      By hadv215 in forum Proton 24
      Replies: 2
      Last Post: 13th June 2019, 15:21
    2. Save memory
      By Leonard in forum Absolute Beginners Section
      Replies: 2
      Last Post: 4th February 2013, 23:02
    3. [SOLVED !] Save lib
      By Roshan in forum Labcenter Proteus VSM
      Replies: 2
      Last Post: 31st August 2005, 16:25

    Members who have read this thread : 41

    Actions :  (Set Date)

    You do not have permission to view the list of names.

    Posting Permissions

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