How to decode an SMS which looks like this ...


Results 1 to 13 of 13

Threaded View

  1. #8
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    In your code you use the byte variable "C" but I don't see it declared.

    Did you include "MODEDEFS.BAS" in your code?


    Code:
    num var byte[12]
    
    For c=0 to 12 ' you will need 13 bytes here
    sum[c+8]=num[c]
    next c
    How long is your phone number? You have declared an array (num) of 12 bytes but the for/next loop is trying to use 13 bytes!

    Also the array sum is declared for 21 and you are attempting to use 22 (you have sum[21]= 13) This is an array of 22 bytes!
    Remember that you have to count also the zero.

    So adjust both the arrays as per the lenght of your phone number ( if 13 digits then you need 13 in the declaration and 13 in the string numerical. If on the contrary the phone lenght is 12 digits then modify the for/next loop to For c=0 to 11 and put byte array sum var byte[22]


    Al.
    Last edited by aratti; - 7th October 2009 at 23:18.
    All progress began with an idea

Similar Threads

  1. Replies: 11
    Last Post: - 19th August 2009, 15:23
  2. Replies: 0
    Last Post: - 21st May 2009, 00:58
  3. Replies: 13
    Last Post: - 12th May 2009, 17:26
  4. Siemens c55 sms control help please
    By camolas in forum mel PIC BASIC Pro
    Replies: 85
    Last Post: - 20th August 2008, 01:13
  5. Reading a SMS to an array
    By KA5MAL in forum GSM
    Replies: 3
    Last Post: - 17th June 2008, 17:24

Members who have read this thread : 0

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