• Support
  • Articles
  • Resources
  • Products

User a Macro for an SMS server- Multi-Tech Cell modem

Moderator: boris

1 postPage 1 of 1

celder
Newbie

Posts:
4
Joined: Fri Jan 22, 2010 11:47 am
by celder » Fri Jan 22, 2010 12:16 pm
Based on a wavecom Radio modem but should work on most cellular modems.

Code: Select all

  1.  
  2. ; #### Script for sending / Recieving an SMS using the MTSMC-G-F4 / MTMMC-G-F4, MTSMC-G2, MTCBA-G-F4
  3. ; Warning - This script will delete all stored SMS on the SIM when run.
  4. ; ------------------------------------------------------------------
  5.  
  6. setsync 1
  7.  
  8. ;reset modem
  9.  
  10.  
  11. sendln 'at&f'
  12. waitln 'OK'
  13.  
  14. ;Set DTR control
  15. sendln 'at&d2'
  16. waitln 'OK'
  17. ;############ check signal ################
  18.  
  19. sendln 'at+csq'
  20. waitln 'OK'
  21. pause 3
  22.  
  23. ;########## Check Registration ############
  24. sendln 'at+creg?'
  25. waitln 'OK'
  26. pause 3
  27.  
  28. ;########## Turn on diagnostics ###########
  29. sendln 'at+cmee=1'
  30. waitln 'OK'
  31.  
  32. ;##########################################
  33.  
  34. goto Recieve
  35. ;##### Send SMS routine ( Bypassed )
  36. pause 3
  37. messagebox 'type sms and send with ctrl z' 'SMS'
  38.  
  39. pause 5
  40.  
  41. :Newsms
  42.  
  43. inputbox 'Enter_Mobile_number' 'Mobile Number'
  44. send 'at+cmgs="'
  45. send inputstr
  46. sendln '"'
  47.  
  48. waitln 'OK'
  49.  
  50. yesnobox 'Send another?' 'Mobile_Numbers'
  51. if result goto Newsms
  52.  
  53.  
  54. ;##############################################
  55.  
  56. :Recieve
  57. ; Setup SMS storage
  58.  
  59. sendln 'AT+CPMS=?'
  60. waitln 'OK'
  61.  
  62. sendln 'at+cmgd=1,4'
  63. waitln 'OK'
  64.  
  65. waitln '+CMTI'
  66.  
  67. beep
  68.  
  69. pause 3
  70.  
  71. sendln 'at'
  72. waitln 'OK'
  73.  
  74. sendln 'AT+CMGR=1'
  75. waitln 'OK'
  76.  
  77. pause 5
  78.  
  79. yesnobox 'End Program?' 'Finish'
  80. if result goto Fin
  81.  
  82.  
  83. goto Recieve
  84.  
  85. :Fin
  86. End 
  87.  

1 postPage 1 of 1

Users browsing this forum: No registered users
cron