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,

    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.

  2. #2
    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.

  3. #3


    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.

  4. #4
    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?

  5. #5


    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

  6. #6
    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...

  7. #7


    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

  8. #8


    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.....

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