Siemens c55 sms control help please - Page 2


Closed Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 86
  1. #41


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Used this

    LOOP:

    HSEROUT["at+cpms=",34,"SM",34,13]
    HSERIN [WAIT("OK")]
    HSEROUT["AT+CMGR=1",13,10]
    HSERIN [WAIT("OK")]




    HSERIN 5000,POR,[WAIT("OK"),STR myarray\62]

    POR:
    if myarray[0]="0"then
    '0791539126010000240C91539166392101000080707081934 1400453FA1B0E

    goto success

    endif
    goto LOOP

    success:
    High PortD.2

    End



    And it stops in the.

    at+cpms="SM"
    +CPMS: 1,15,1,15,1,15

    OK

    and dont continue

  2. #42
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Are you supposed to wait for an OK, then get the actual response, and then another OK?
    Or just wait for the response and an OK?

    And one more thing...are you sure your phone is even capable of what you want? And if it is, are you absolutely sure that your circuit is communicating properly with said device?

  3. #43
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Skimask got me on the turn!
    Pheww! Yes at last... 8-)
    Always do this kind of check. It is the only way to communicate. Otherwise you may well be talking but no-one listening!
    Ioannis
    Wouldn't it be a kick to find out that all of this was being done on some sort of 'simulator' or something?

  4. #44


    Did you find this post helpful? Yes | No

    Default

    Hi,



    Its supposed to send:

    at+cpms="SM" 'and get:
    +CPMS: 1,15,1,15,1,15
    OK


    then its supposed to send:

    AT+CMGR=1 ' and get:
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    OK


    By put the code like this
    .................................................
    LOOP:

    HSEROUT["at+cpms=",34,"SM",34,13]
    HSERIN 2000,IP,[WAIT("OK")]

    IP:
    HSEROUT["AT+CMGR=1",13,10]
    HSERIN 2000,LI,[WAIT("OK")]

    LI:
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]

    POR:
    if myarray[0]="0"then
    'pdu sms in the phone 0791539126010000240C915391663921010000807070819341 400453FA1B0E


    goto success

    endif
    goto LOOP

    success:
    High PortD.2

    End
    .......................

    Its give on hterminal the good info
    at+cpms="SM"
    +CPMS: 1,15,1,15,1,15
    OK

    AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    OK

    But still cand find the myarray[0]="0" to high the led

  5. #45
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    So, you send:
    at+cpms="SM"
    HSEROUT["at+cpms=",34,"SM",34,13]

    Then the phone sends:
    +CPMS: 1,15,1,15,1,15
    OK
    HSERIN 2000,IP,[WAIT("OK")]
    (But all you're checking for is the OK, not the rest of the items. How do you know the items are actually there?)

    Then you send:
    AT+CMGR=1
    HSEROUT["AT+CMGR=1",13,10]

    And the phone sends:
    +CMGR: 1,,23
    HSERIN 2000,LI,[WAIT("OK")]
    (Where's the OK?)

    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    OK
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
    (Where's the OK that the line is supposed to start off with? I see it at the end, not at the beginning.)

    It looks to me like you need to rethink your code...a bunch. The order in which you are sending and receiving items to and from the phone doesn't match up with the order in which the phone is actually going to receive and send those items, at least not the way you've written your program.

  6. #46


    Did you find this post helpful? Yes | No

    Default

    Hi,

    The HSEROUT["at+cpms=",34,"SM",34,13] is to change the momory of the cell phone and phone send back comfirmaction on the change +CPMS: 1,15,1,15,1,15
    OK

    The HSERIN 2000,IP,[WAIT("OK")] is to for the above ok and then goto next step

    The IP: HSEROUT["AT+CMGR=1",13,10] is the next step and reads the pdu sms phone send back the comfirmaction AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E (my message)
    OK (the ok by the phone)

    HSERIN 2000,LI,[WAIT("OK")] whaits for the above ok and goto


    LI:
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
    here i have some ??? because i dont have a ok input from the cell phone


    Then if myrray zero posiction are zero like its in pda array next goto so sucess if not goto lop
    POR:
    if myarray[0]="0"then
    'pdu sms in the phone 0791539126010000240C915391663921010000807070819341 400453FA1B0E

    goto success

    endif
    goto LOOP

    success:
    High PortD.2
    End
    Last edited by camolas; - 10th July 2008 at 16:05.

  7. #47
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    And you've just answered your own question and/or fixed your own...if you knew where to look for it...or if you could see the forest through the trees.
    Where are you filling myvar and where are you getting the last OK? And when are you going to reorder your code to match what you want?

  8. #48


    Did you find this post helpful? Yes | No

    Default

    Hi ,

    Big mess please give me some hellp

  9. #49
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Hi,
    The HSEROUT["at+cpms=",34,"SM",34,13] is to change the momory of the cell phone and phone send back comfirmaction on the change +CPMS: 1,15,1,15,1,15
    OK
    The HSERIN 2000,IP,[WAIT("OK")] is to for the above ok and then goto next step
    The IP: HSEROUT["AT+CMGR=1",13,10] is the next step and reads the pdu sms phone send back the comfirmaction AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E (my message)
    OK (the ok by the phone)
    HSERIN 2000,LI,[WAIT("OK")] whaits for the above ok and goto
    LI:
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
    here i have some ??? because i dont have a ok input from the cell phone
    Then if myrray zero posiction are zero like its in pda array next goto so sucess if not goto lop
    POR:
    if myarray[0]="0"then
    'pdu sms in the phone 0791539126010000240C915391663921010000807070819341 400453FA1B0E
    goto success
    endif
    goto LOOP
    success:
    High PortD.2
    End
    Quote Originally Posted by camolas View Post
    Hi ,
    Big mess please give me some hellp
    Anything yet? Do you understand the format of the HSERIN command? The time-out, the WAIT, the rest?

  10. #50


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Nothing me head is exploding.......... i put HSERIN [STR myarray\62] and nothing ...........


    Thanks for STILL caring

  11. #51
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Hi,
    Nothing me head is exploding.......... i put HSERIN [STR myarray\62] and nothing ...........
    Thanks for STILL caring
    AND your code is flawed because the timeouts in the HSERIN, I believe, are used incorrectly in this case.
    Think about it...
    What direction does the code go if you don't receive the OK?
    What direction does the code go if you DO receive the OK?

  12. #52


    Did you find this post helpful? Yes | No

    Default

    Hi,

    In this case the with the HSERIN [STR myarray\62] i send this (only 1 time it stop looping)

    at+cpms="SM"
    +CPMS: 1,15,1,15,1,15

    OK
    AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E

    OK
    What time out shell i put? i have tryed 500,1000,2000,5000
    on 1st Hserin to IP and the secund to LI

    Can you please put me the good command line? please.....



    Quote Originally Posted by skimask View Post
    AND your code is flawed because the timeouts in the HSERIN, I believe, are used incorrectly in this case.
    Think about it...
    What direction does the code go if you don't receive the OK?
    What direction does the code go if you DO receive the OK?

  13. #53
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Zero BYTE ARRAY ?

    Zero BYTE ARRAY ? Is that right? Seems like an Array of "no" bytes . . . seems to me, a standard byte var is an array of 1, MyVarArray[1] or MyVarArray var BYTE . . . did I miss something here ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  14. #54
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Can you please put me the good command line? please.....
    LOOK AT YOUR CODE!!! READ YOUR CODE!!!
    Have you looked at your code lately? Have you read it?
    Are you just assuming it will work because you wish it to be true?
    Code:
    LOOP:................
    HSERIN 2000,IP,[WAIT("OK")]
    If this line times out, where does the flow of the code go?
    If this line doesn't time out, where does the flow of the code go?


    Code:
    IP:..................
    HSERIN 2000,LI,[WAIT("OK")]
    If this line times out, where does the flow of the code go?
    If this line doesn't time out, where does the flow of the code go?


    Code:
    LI: 
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
    If this line times out, where does the flow of the code go?
    If this line doesn't time out, where does the flow of the code go?
    And what is the phone going to send first? The OK or the string you wish to put in the array?



    I'm out....
    http://en.wikipedia.org/wiki/What_we...to_communicate

  15. #55


    Did you find this post helpful? Yes | No

    Default

    Hi,

    The array is [62] byte the 0 byte in the array is 0 as you can see here "0791539126010000240C91539166392101000080707081934 1400453FA1B0E"

    by


    Quote Originally Posted by Joe S. View Post
    Zero BYTE ARRAY ? Is that right? Seems like an Array of "no" bytes . . . seems to me, a standard byte var is an array of 1, MyVarArray[1] or MyVarArray var BYTE . . . did I miss something here ?

  16. #56


    Did you find this post helpful? Yes | No

    Default

    Ok

    Thanks for the hellp skimask i will try and hope that some one give me a litle push to this pbp newbi.

  17. #57
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Zero BYTE ARRAY ? Is that right? Seems like an Array of "no" bytes . . . seems to me, a standard byte var is an array of 1, MyVarArray[1] or MyVarArray var BYTE . . . did I miss something here ?
    Yep! It's just referencing the first byte of the array, not a one byte array (which could just be nothing more than an 8 BIT array )
    At least THAT part of the program is done correctly.

  18. #58
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Thanks for the hellp skimask i will try and hope that some one give me a litle push to this pbp newbi.
    I pushed, prodded, pulled, pointed, highlighted, high-fived, colorized, colon-ized, smelt it and dealt it...
    All of your answers (assuming your hardware is working correctly), every single one of them, including the fixes, are in the posts above...

  19. #59


    Did you find this post helpful? Yes | No

    Default

    Cant get it, but thanks any way (learning Inglish and Pbp at the same is not easy)

  20. #60
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Cant get it, but thanks any way (learning Inglish and Pbp at the same is not easy)
    Your grasp of English is fine as far as I can tell, not perfect, but much much better than my grasp of any other language besides English, so in that respect, you are light years ahead of me. It's your grasp of the obvious that escapes me...

  21. #61


    Did you find this post helpful? Yes | No

    Default

    i try hard to, please tell me how to.....pleazzzzzzzzz

    Quote Originally Posted by skimask View Post
    Your grasp of English is fine as far as I can tell, not perfect, but much much better than my grasp of any other language besides English, so in that respect, you are light years ahead of me. It's your grasp of the obvious that escapes me...

  22. #62
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    i try hard to, please tell me how to.....pleazzzzzzzzz
    Re-Read Post #54...

    What does this statement mean to you?
    Code:
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
    How is this statement going to act? There are 3 ways this statement can end up...

  23. #63


    Did you find this post helpful? Yes | No

    Default

    Hi, that a whait for a ok 2s if dont came goto POR if came then store the "file" to mydata.

    AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    OK

    Its beter like this i think HSERIN 2000,POR,[WAIT("+CMGR: 1,,23"),STR myarray\62] ??


    LOOP:................
    HSERIN 2000,LOOP,[WAIT("OK")] Like this?

    IP:..................
    HSERIN 2000,IP,[WAIT("OK")] Like this ?

    I do not at home the pic/gsm...... to test it only tomorow

    Thanks for caring
    Last edited by camolas; - 10th July 2008 at 21:21.

  24. #64
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    I do not at home the pic/gsm...... to test it only tomorow
    Thanks for caring
    You haven't answered any questions yet...only skirted the issue.
    What do each of those lines in Post #54 and that last post do? And in what sequence?
    That's the issue...

  25. #65


    Did you find this post helpful? Yes | No

    Default

    What does this statement mean to you?

    Code:
    HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]

    That mins to me that code whaits for a ok 2s if dont came gos to POR if it came then store the "file" to mydata. (have answered on the before post alredy)

    After realise that a change the code like i posted in the before post.

    Please give me you feedback on this.

    ..............................................
    LOOP:
    HSEROUT["AT+CPMS=",34,"SM",34,13]
    HSERIN 2000,LOOP,[WAIT("OK")]

    IP:
    HSEROUT["AT+CMGR=1",13,10]
    HSERIN 2000,IP,[WAIT("OK")]

    IT:
    HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),STR myarray\62]

    POR:
    if myarray[0]="0"then
    '0791539126010000240C91539166392101000080707081934 1400453FA1B0E

    goto success

    endif
    goto LOOP

    success:
    High PortD.2

    End
    ...............
    Last edited by camolas; - 10th July 2008 at 21:52.

  26. #66
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Here you have to skip two bytes: HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),STR myarray\62]

    Why? because the string is on the next line as you show. So the phone is sending two more bytes after the 1,,23 and these bytes are.... surprise invisible!! They are 13 and 10. That's why your string appears on the next line. So correct the line as this:

    HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),skip 2, STR myarray\62]

    Now you will not lose your first and precious "0" byte!

    As for the timeouts, I cannot tell you if 100, 200, 500 or 5000 are enough, as each phone has its own respond times. Some phones have even 15 sec to start responding after reset, or 50sec to erase all messages!

    You can test it with timer, but that is another big issue...

    Ioannis
    Last edited by Ioannis; - 10th July 2008 at 22:45.

  27. #67


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Thanks a lot men with out the all hellping and caring people and i do not made to this point.

    Tomorow i will test it and post it.

    Thanks a lot

  28. #68
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Hi,

    The array is [62] byte the 0 byte in the array is 0 as you can see here "0791539126010000240C91539166392101000080707081934 1400453FA1B0E"

    by
    OK that makes sense, since you only posted snippets, I wasn't sure you had set up a 62 byte array, and if you did post it all, then woops, I missed it.
    EDIT: Yep you did, post 26.
    Last edited by Archangel; - 11th July 2008 at 04:57.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  29. #69


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Code stop working at this last line:
    HSERIN 5000,IT,[WAIT(13,10), STR myarray\62] or using this line HSERIN 5000,IT,[WAIT("+CMGR: 1,,23"),skip 2, STR myarray\62]
    is the same
    If i put the command line success: High PortD.2 (to see where code stops) on the next line

    IT:
    HSERIN 5000,IT,[WAIT(13,10), STR myarray\62]
    success: High PortD.2

    Nothing but if a only put

    HSERIN 5000,IT,[WAIT(13,10)]
    success: High PortD.2


    Led lights so the code is good before that line and specialy the " , STR myarray\62]" command , please give me you input on this.

    Thanks

  30. #70
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Why not try pulling just part of the string first...like the first few characters and make sure you can get those correctly before you try grabbing the whole thing...
    And if your 13,10 is actually 13,10, then you're ok...but what if your 13,10 is actually 10,13?

  31. #71


    Did you find this post helpful? Yes | No

    Default

    Hi,

    If i compriend you i have to try a small array like:

    ............................
    myarray var byte[4]
    ............................

    HSERIN 5000,IT,[WAIT(13,10), STR myarray\4]


    The 13,10 situaction as i said i put after that this line command

    ..............
    success:
    High PortD.2
    ..............

    and it works sow i bealive that is no problem on that.

  32. #72
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    If i compriend you i have to try a small array like:
    ............................
    and it works sow i bealive that is no problem on that.
    Yes, yes, and, yes, so...

    And how much of your 'program' are you leaving out? I get the feeling that you're not showing everything and that something else is screwing up this whole operation.

  33. #73


    Did you find this post helpful? Yes | No

    Default

    Tha small array do not work i mod the line from HSERIN 5000,IT,[WAIT(13,10), STR myarray\4] to:

    IT:
    HSERIN 5000,IT,[WAIT("OK")]
    success:
    High PortD.2

    End


    to get the last ok aftar the phone sends the pdu array was i use to see if the others hserout/hserin lines , and try to with the all pda array and with the 1sts 4 bytes and and nothing i have seen the hterminal and the code stops at last OK dont go back to IT: thats strange.....

  34. #74


    Did you find this post helpful? Yes | No

    Default

    Code:
     
     @ Device HS_OSC         ' High Speed Crystal
    define OSC 20     ' Check the spelling of OSC, must be in capital letter
            
    Include "modedefs.bas" ' Include serial modes
    
    ' Define LCD registers and bits
    Define	LCD_DREG	PORTB           'Lcd D 4-bit parallel register starts at PortB.4 to PortB.7
    Define	LCD_DBIT	4              
    Define	LCD_RSREG	PORTB
    Define	LCD_RSBIT	2
    Define	LCD_EREG	PORTB
    Define	LCD_EBIT	3
    Define  LCD_COMMANDUS   2000	      ' Command Delay (uS)
    Define  LCD_DATAUS      50 	     ' Data Delay (uS)
    DEFINE  OSC         20                'Define oscilator frequency
    DEFINE LCD_LINES 4 'Number lines on LCD 
    
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
            
    
    
    
    myarray var byte[4]
    
    
    TrisD.2=0
    TrisC.6=0
    TrisC.7=1
    B0 var byte
    
    High portD.2
    Pause 500
    Low portD.2
    Pause 500
    High portD.2
    Pause 500
    Low portD.2
    Pause 500
    
    
    
    LOOP:
    HSEROUT["AT+CPMS=",34,"SM",34,13] 
    HSERIN 5000,LOOP,[WAIT("OK")]
    ' have add   success:High PortD.2   and works
    
    IP:
    HSEROUT["AT+CMGR=1",13,10] 
    HSERIN 5000,IP,[WAIT("OK")]
    ' have add   success:High PortD.2   and works
    
    
    
    IT:
    HSERIN 5000,IT,[WAIT("OK")] ' from here stops and dont go to IT: , have puted HSERIN 5000,IT,[WAIT(13,10), STR myarray\4] tha same resolt and have puted HSERIN 5000,IT,[WAIT(13,10)] works led ligth and final have puted HSERIN 5000,IT,[WAIT("OK")] wait for the last OK afther pdu array and do not work and do not goto IT
    
    
    
    
    success:
    High PortD.2
    
    End

    Hterminal gives this:


    AT+CPMS="SM"
    +CPMS: 1,15,1,15,1,15

    OK
    AT+CMGR=1
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E

    OK




    Quote Originally Posted by skimask View Post
    Yes, yes, and, yes, so...

    And how much of your 'program' are you leaving out? I get the feeling that you're not showing everything and that something else is screwing up this whole operation.
    Last edited by camolas; - 11th July 2008 at 19:12.

  35. #75
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    IP:
    HSEROUT["AT+CMGR=1",13,10] 
    HSERIN 5000,IP,[WAIT("OK")]  ' have add   success:High PortD.2   and works
    If that's true, then the line failed, because a timeout would've actually gone back to IP: and then, after NOT receiving the 2nd "OK" would've failed.

    Code:
    IT:
    HSERIN 5000,IT,[WAIT("OK")] ' from here stops and dont go to IT: ,
    The only way it'll go back to IT: is if the line times out. If it gets the "OK" successfully, it won't go to IT:, it'll go to the next line.

    See what I'm getting at here? You are contradicting yourself. Either you don't have enough tests in the loops, or you are seeing something that isn't actually happening because it's being covered up by something that is happening, or the other way around. OR...you don't understand how the time outs and labels are supposed to work.


    You type:
    AT+CPMS="SM"


    It responds:
    +CPMS: 1,15,1,15,1,15
    OK


    You type:
    AT+CMGR=1


    It responds:
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    OK

    Correct?

  36. #76


    Did you find this post helpful? Yes | No

    Default

    IP:
    HSEROUT["AT+CMGR=1",13,10]
    HSERIN 5000,IP,[WAIT("OK")] ' have add success:High PortD.2 and works
    success:High PortD.2

    Let me say ti see if i now woh it works, if the ok dont come in 5s it will go to IP and do it again (wait for ok)??
    And as i get i light the led in my experience.


    IT:
    HSERIN 5000,IT,[WAIT("OK")] ' from here stops and dont go to IT: ,
    success:High PortD.2

    Yes that is what i think sow why das it dont goto to the next line success:High PortD.2
    or go back to IT (the code stops here)


    You type:
    AT+CPMS="SM"


    It responds:
    +CPMS: 1,15,1,15,1,15
    'one line space down
    OK


    You type:
    AT+CMGR=1


    It responds:
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    'one line space down
    OK

  37. #77
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    IP:
    HSEROUT["AT+CMGR=1",13,10]
    HSERIN 5000,IP,[WAIT("OK")] ' have add success:High PortD.2 and works
    success:High PortD.2

    Let me say ti see if i now woh it works, if the ok dont come in 5s it will go to IP and do it again (wait for ok)??
    And as i get i light the led in my experience.
    Ok, fine, so the first part seems to be working...

    IT:
    HSERIN 5000,IT,[WAIT("OK")] ' from here stops and dont go to IT: ,
    success:High PortD.2

    Yes that is what i think sow why das it dont goto to the next line success:High PortD.2
    or go back to IT (the code stops here)
    It probably is STOPPING RIGHT THERE! It's just looping around timing out. BUT...YOU have no way to tell what it's doing, because you have absolutely no 'indicator' there to blip and LED, make a sound or anything.

    It responds:
    +CPMS: 1,15,1,15,1,15
    'one line space down
    OK
    And one line space down...hmmm...would that be a 13,10 or a 13,10,10?

    It responds:
    +CMGR: 1,,23
    0791539126010000240C915391663921010000807070819341 400453FA1B0E
    'one line space down
    OK
    Same thing...

  38. #78


    Did you find this post helpful? Yes | No

    Default

    Hi,

    "And one line space down...hmmm...would that be a 13,10 or a 13,10,10?"

    I only send the 13,10 but outputs in hterminal as 13,10,10 (10 is line feed)but as i have used the wait on last ok to turn leed on and it did not do the problem as i think is not in there.


    Thanks

  39. #79


    Did you find this post helpful? Yes | No

    Default

    Code is now full working for people that want to do a sms controled......... thanks to all you that haved hellp me and care for starts as me.


    Many thanks 2u

    Code:
    @ Device HS_OSC         ' High Speed Crystal
    define OSC 20     ' Check the spelling of OSC, must be in capital letter
            
    Include "modedefs.bas" ' Include serial modes
    
    ' Define LCD registers and bits
    Define	LCD_DREG	PORTB           'Lcd D 4-bit parallel register starts at PortB.4 to PortB.7
    Define	LCD_DBIT	4              
    Define	LCD_RSREG	PORTB
    Define	LCD_RSBIT	2
    Define	LCD_EREG	PORTB
    Define	LCD_EBIT	3
    Define  LCD_COMMANDUS   2000	      ' Command Delay (uS)
    Define  LCD_DATAUS      50 	     ' Data Delay (uS)
    DEFINE  OSC         20                'Define oscilator frequency
    DEFINE LCD_LINES 4 'Number lines on LCD 
    
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
            
    myarray var byte[62]
    
    TrisD.2=0
    TrisC.6=0
    TrisC.7=1
    
    High portD.2
    Pause 500
    Low portD.2
    Pause 500
    High portD.2
    Pause 500
    Low portD.2
    Pause 500
    High portD.2
    Pause 500
    Low portD.2
    Pause 500
    
    LOOP:
    HSEROUT["AT+CPMS=",34,"SM",34,13] 
    HSERIN 5000,LOOP,[WAIT("OK")]
    
    IP:
    HSEROUT["AT+CMGR=1",13,10] 
    HSERIN 5000,IP,[WAIT("+CMGR: 1,,23"),skip 2, STR myarray\62] 
    
    '079153 9 126010000240C915391663921010000807070819341400453FA1B0E
    
    IF myarray[6]="9" then
    goto success
    endif
    
    goto IP:
    
    success:
    High PortD.2
    
    End
    Last edited by camolas; - 12th July 2008 at 22:33.

  40. #80
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by camolas View Post
    Code is no full working
    Are you just typing to fast to care or what's up?

    'Code is no full working', while not proper English (and again, your grasp of English is obviously thousands of times better than my grasp of anything but English) means to me that it's NOT working.

    'Code is now full working' (again, while it's not proper English) means that it IS working.

    Which one is it?

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 : 1

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