• Support
  • Articles
  • Resources
  • Products

Send an e-mail from Wavecom based cellular Modem

Moderator: boris

3 postsPage 1 of 1

celder
Newbie

Posts:
4
Joined: Fri Jan 22, 2010 11:47 am
by celder » Fri Jan 22, 2010 11:58 am
The attached referance Macro wil allow you to send an e-mail usingthe on-board IP stack from a wavecom based Celular GPRS modem. This one was tested using Multi-Tech embedded and desktop variants ( As I work for Multi-Tech ), but should work for other Wavecom cellular Radio based devices.

Code: Select all

  1.  
  2. ;  ### Script for sending an e-mail using the MTSMC-G-F4 / MTMMC-G-F4 / MTSMC-G2
  3. ;; UK o2 cellular SIM. Tested with Wipsoft 3.11
  4. ;---------------------------------------------------------------------------------------------
  5.  
  6.  
  7. setsync 1
  8. timeout = 5
  9.  
  10. sendln 'at+cfun=1'
  11.  
  12. pause 3
  13.  
  14. sendln 'at&f'
  15. waitln 'OK'
  16. ; Open the IP stack-
  17. sendln 'at+wopen=1'
  18. ;waitln 'OK'
  19. pause 3
  20.  
  21.  
  22. sendln 'at+cmee=1'
  23. waitln 'OK'
  24.  
  25. :RERUN
  26. sendln 'at+wipcfg=1'
  27. waitln 'ERROR' 'OK'
  28.  
  29. if result = 0 goto RERUN
  30. If result = 1 goto RERUN
  31. if result = 2 goto PROCEED
  32.  
  33. :PROCEED
  34. sendln 'at+wipbr=1,6'
  35. waitln 'OK'
  36.  
  37. ;sendln 'at+wipbr=2,6,11,"internet"'
  38. sendln 'at+wipbr=2,6,11,"mobile.o2.co.uk"'
  39. waitln 'OK'
  40. pause 1
  41. SENDLN 'AT+WIPBR=2,6,0,"mobileweb"'
  42. WAITLN 'OK'
  43. pause 1
  44. SENDLN 'AT+WIPBR=2,6,1,"password"'
  45. WAITLN 'OK'
  46. pause 1
  47.  
  48.  
  49. :AGAIN
  50. pause 3
  51. sendln 'at+wipbr=4,6,0'
  52. wait 'OK' '+CME'
  53. if result = 0 goto AGAIN
  54. if result = 1 goto NEXT
  55. if result = 2 goto AGAIN
  56. :NEXT
  57.  
  58. sendln 'at'
  59. waitln 'OK'
  60. ;####################################################
  61. ;WIPOPT notes 6,x,2,y
  62. ;x=socket id
  63. ;y=option number
  64. ;61=sender email address
  65. ;62=sender name
  66. ;63=receiver email address
  67. ;64=CC address
  68. ;65=BCC address
  69. ;66=subject
  70. ;#######################################################
  71. senderaddr="<support@multitech.co.uk>"
  72. sendername="MTEMEA"
  73. receiveraddr="<support@multitech.co.uk>"
  74. ccaddr="<support@multitech.co.uk>"
  75. bccaddr="<support@multitech.co.uk>"
  76. subject="Test e-mail from Multi-Tech via GSM module"
  77.  
  78. ;sendln 'at+wipcreate=6,1,"204.26.122.2"'
  79. :SetSMTP
  80. sendln 'at+wipcreate=6,1,"smtp.o2.co.uk"'
  81. wait '+WIPREADY' '+CME'
  82. if result = 0 goto SetSMTP
  83. if result = 1 goto Who
  84. if result = 2 goto SetSMTP
  85.  
  86. :Who
  87.  
  88. sendln 'AT+WIPOPT=6,1,2,61,"'senderaddr'"'
  89. waitln 'OK'
  90. sendln 'AT+WIPOPT=6,1,2,62,"'sendername'"'
  91. waitln 'OK'
  92. sendln 'AT+WIPOPT=6,1,2,63,"'receiveraddr'"'
  93. waitln 'OK'
  94. sendln 'AT+WIPOPT=6,1,2,64,"'ccaddr'"'
  95. waitln 'OK'
  96. sendln 'AT+WIPOPT=6,1,2,65,"'bccaddr'"'
  97. waitln 'OK'
  98. sendln 'AT+WIPOPT=6,1,2,66,"'subject'"'
  99. waitln 'OK'
  100.  
  101.  
  102. messagebox 'After Connect Message type e-mail and send with ctrl c' 'Mail'
  103. sendln 'AT+WIPFILE=6,1,2'
  104.  
  105. waitln 'OK'
  106.  
  107.  
asrofi
Newbie

Posts:
1
Joined: Thu Jan 13, 2011 2:52 am
by asrofi » Thu Jan 13, 2011 3:01 am
I try command :

AT+WOPEN=1
OK
AT+WIPCFG=1
ERROR

ati3
652a09gg.Q2406B 1489876 060706

why,please help me?
dobara
Newbie

Posts:
1
Joined: Wed Oct 31, 2012 5:14 am
by dobara » Wed Oct 31, 2012 5:21 am
This one was tested using Multi-Tech embedded and desktop variants ( As I work for Multi-Tech ), but should work for other Wavecom cellular Radio based devices.
"StewarD"
Display posts from previous:
Sort by:

3 postsPage 1 of 1

Users browsing this forum: No registered users
cron