Originally Posted by Ziki
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
Bookmarks