Siemens c55 sms control help please


Closed Thread
Results 1 to 40 of 86

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Please explain what you said.
    Now i want to read a sms line code HSEROUT ["AT+CMGR=1",13,10]
    but i do not now read it and compare with the IF SMS="pdu array" then .....
    Can you please hellp me on that?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    pbp does not have string comparison commands (Hey Darrel, what about a macro for this??)

    So you have to compare one character at a time using nested if-then.

    Ioannis

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Sow i can not store the sms full received pdu array as var word and then compar it with IF...THEN... ?
    Im very new at all this can you please give me a example sow i can see how to do?

    Thanks
    Last edited by camolas; - 7th July 2008 at 19:17.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    You ca store in an array of bytes whatever you want, but cannot do this if myarray="1234567890" then do that.

    You have to do a nested if-then comparison like that:

    if myarray[1]="1" then
    if myarray[2]="2" then
    if myarray[3]="3" then
    ....
    if myarray[0]="0" then
    goto success
    endif
    ....
    endif
    endif
    endif

    no_success:


    success:


    Of course this can be done with a for-next loop more elegant, but for the sake of simplicity I left it like that.

    Ioannis

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Thanks for caring one more time sow i need:

    ...............
    myarray var byte
    ...........
    ...........
    Loop:
    HSEROUT ["AT+CMGR=1",13,10]
    Pause 1000
    Hserin 6000,loop,[STR myarray]

    if myarray[1]="1" then
    if myarray[2]="2" then
    if myarray[3]="3" then
    ....
    if myarray[0]="0" then
    goto success
    endif
    ....
    endif
    endif
    endif

    no_success:


    success:


    Is ok the code?
    Thanks

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    ...............
    myarray var byte
    No. You need array not byte variable. Read the Manual. I am not going to teach you the abc's of PBP! That is what YOU have to do! Sorry...

    Quote Originally Posted by camolas View Post
    HSEROUT ["AT+CMGR=1",13,10]
    Pause 1000
    Hserin 6000,loop,[STR myarray]
    I wrote on a previous post that you have to read back what the module is responding. By waiting 1 sec. I am sure, don't know about you, that you are quaranteed to lose data. Wait for the OK and read immediately.

    Quote Originally Posted by camolas View Post
    if myarray[1]="1" then
    if myarray[2]="2" then
    if myarray[3]="3" then
    ....
    if myarray[0]="0" then
    goto success
    endif
    ....
    endif
    endif
    endif

    no_success:


    success:
    The above was an example! You have to complete the puzzle...


    Quote Originally Posted by camolas View Post
    Is ok the code?
    Thanks
    No, I don't think is 100% OK, as I don't know PDU as I stated before and the example I gave has nothing to do with PDU that needs to be decoded first.

    Last, you are welcome, but please, read, read, read the PBP manual as to how the compiler is used. Blink a LED and then try this hardcore stuff...

    Ioannis

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Im lost now

Similar Threads

  1. sms to control pic..pls help...
    By Ziki in forum mel PIC BASIC Pro
    Replies: 53
    Last Post: - 12th April 2010, 21:19
  2. Replies: 11
    Last Post: - 19th August 2009, 15:23
  3. SMS control for Relays
    By charudatt in forum Code Examples
    Replies: 15
    Last Post: - 2nd May 2009, 00:08
  4. Reading a SMS to an array
    By KA5MAL in forum GSM
    Replies: 3
    Last Post: - 17th June 2008, 17:24
  5. Control RC servo via Parallax Servo Control
    By cibotsan in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th September 2005, 08:18

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