sms to control pic..pls help...


Results 1 to 40 of 54

Threaded View

  1. #6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ziki
    thx for the info ... i believe t610 can support text mode ? izzit true ?

    No the t100, t68, t681, t610 I can say with definate authority only support PDU mode.

    This makes them a total pain for sms controllers.

    You have to type the sms command very carefully......

    If you sent alarm arm it would be 09417658DE0685E56D
    if you sent alarm arm. it would be 0A417658DE0685E56D17
    If you sent alarm arm it would be 09A0203B2C6F83DE6E


    Just one extra space makes it totally different.....

    You have to be very strict on how messages have to be sent, which also means you can just check parts of the string like this as most of it will always be the same.

    Alarm arm 0AD09417658DE0685E56D
    Alarm off 0AD09417658DE06BDCD66

    You can just test at various points to parse it IE

    0AD09 (4176) 58DE06B (DCD) 66
    0AD09 (4176) 58DE068 (5E5) 6D

    Put it all in a byte array and then 'if then it'



    If buf(6)<>"4" then wait_for_command
    if buf(6)<>"1" then wait_for_command
    If buf(6)<>"7" then wait_for_command
    If buf(6)<>"6" then wait_for_command

    ' Ok so we have a command, now which one

    If buf(17)<>"D" then not_arm_command
    If buf(18)<>"C" then not_arm_command
    If buf(19)<>"D" then not_arm_command

    ' OK we got here so its 'arm' command



    Gosub arm_the_alarm

    goto wait_for_commands

    not_arm_command: ' so check for 'off' command


    If buf(17)<>"5" then not_off_command
    If buf(18)<>"E" then not_off_command
    If buf(19)<>"5" then not_off_command


    Gosub alarm_off

    goto wait_for_commands


    not_off_command:

    ' if we got here the command was not understood

    gosub error_comand

    goto wait_for_commands
    Last edited by f_lez; - 24th August 2006 at 09:14.

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. HELP ME, SMS controlled relay using PIC
    By pazko1125 in forum mel PIC BASIC
    Replies: 14
    Last Post: - 2nd October 2008, 15:26
  3. Siemens c55 sms control help please
    By camolas in forum mel PIC BASIC Pro
    Replies: 85
    Last Post: - 20th August 2008, 01:13
  4. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 07:59
  5. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 00:34

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