background image

Appendix D.  EmailSend Using the Gmail Outgoing SMTP Server 

D.3  Sending a Text Message to a Phone 

To send a text message to a phone, the email needs to be converted to a text 
message via an email to text message gateway.  Most cellular providers have 
an email to text message service for their phone subscribers.  To send a text 
message to AT&T Wireless phone subscribers, send an email to the (10 digit 
phone number of the person’s phone)@vtext.com (

[email protected]

). 

Most text messages are limited to 160 characters, so any email messages 
greater than 160 characters will be truncated. 

Email-to-Text Message Gateways 

T-Mobile: 

[email protected]

 

Virgin Mobile: 

[email protected]

 

AT&T: 

[email protected]

 

Sprint: 

[email protected]

 

AT&T: 

[email protected]

  

EmailSend Program Example 

The following example sends an email message when an alarm condition is 
True.  

Both the CR1000 and RavenXTG modem must be configured as 

PPP as described in Appendix C, 

Configuring the RavenXTG Modem for 

PPP

.  Transport Layer Security (TLS) must be enabled in the datalogger 

to use the Gmail mail server.

 

'Main program variables 

Public Batt, RefTemp, Temp 
Public Socket AS Long 

'declare Email parameter strings (as constants), Message String & Result Variable 

Const ServerAddr="smtp.gmail.com:587" 
Const UserName="gmail account name" 
Const Password="datalogger" 
Const ToAddr="[email protected], [email protected]
Const FromAddr="[email protected]
Const Subject="Email Message Test" 
Const Attach="" 
Const CRLF = CHR(13)+CHR(10) 
Public Result as String * 100 
Public AlarmTrigger As Boolean 
Public Message As String * 250 
Public EmailSuccess As Boolean 
DataTable (TenSecData,True,-1) 
DataInterval (0,10,Sec,10) 
Sample (1,Batt,FP2) 
Sample (1,Temp,FP2) 
EndTable 
BeginProg 
Scan (1,Sec,3,0) 
Battery (Batt) 
PanelTemp (RefTemp,250) 
TCDiff (Temp,1,mV2_5C,1,TypeT,RefTemp,True ,0,250,1.0,0) 
CallTable TenSecData 
NextScan 
SlowSequence 
Scan(1,sec,1,0) 
If AlarmTrigger = False Then 

D-2 

Summary of Contents for RavenXT G2212-C

Page 1: ...RavenXTG GPRS EDGE Sierra Wireless Cellular Modem Revision 5 13 C o p y r i g h t 2 0 0 6 2 0 1 3 C a m p b e l l S c i e n t i f i c I n c...

Page 2: ......

Page 3: ...emoving reinstalling and shipping defective products to Campbell Campbell will return such products by surface carrier prepaid within the continental United States of America To all other locations Ca...

Page 4: ...ng container Campbell Scientific s shipping address is CAMPBELL SCIENTIFIC INC RMA _____ 815 West 1800 North Logan Utah 84321 1784 For all returns the customer must fill out a Statement of Product Cle...

Page 5: ...er Site Equipment 3 4 3 Wiring and Connections 6 4 3 1 Modem Connections Using PN 18663 Null Modem Cable 6 4 3 2 Modem Connections Using the SC105 7 4 3 3 Modem Connections Using the SC932A 8 4 4 Powe...

Page 6: ...g a Text Message to a Phone D 2 E Troubleshooting Flowchart E 1 Figures 4 1 Antennas for use with the Raven modems 5 4 2 Connections using PN 18663 Null Modem Cable 6 4 3 Connections using the SC105 7...

Page 7: ...henever the RavenXTG connects to the Internet A Dynamic IP address is assigned on a need to have basis A dynamic IP address is used with a service such as IP Manager Section 5 1 Configuring the RavenX...

Page 8: ...to the SIM card you should receive 10 digit MSISDN number used for billing IP Address and APN for GPRS EDGE service AT T can also setup a Custom APN A Custom APN takes 4 6 weeks to setup and costs abo...

Page 9: ...R510 CR10 X CR23X CR7 CR1000 CR5000 CR3000 CR800 Modem Interface If connecting to CS I O port SC105 or SC932A Interface connects the modem to the 21X CR510 CR10 X CR7 or other dataloggers CS I O port...

Page 10: ...bands and is strongly recommended where cellular coverage is strong The 18285 includes a mount u bolt assembly for attaching the antenna to a mast post or crossarm up to 3 8 cm 1 5 in in diameter o T...

Page 11: ...ireless Cellular Modem PN 20679 Omni Directional Antenna PN 18285 1 dBd Omni Directional Antenna PN 14454 9dBd Directional Yagi Antenna PN 21831 Half Wave Dipole Whip Antenna FIGURE 4 1 Antennas for u...

Page 12: ...nections 4 3 1 Modem Connections Using PN 18663 Null Modem Cable PN 18663 Null Modem Cable is used to connect the modem to the CR23X CR3000 CR800 CR2XX CR1000 or CR5000 RS 232 port not compatible with...

Page 13: ...s operating system The SC105 interface is used to connect the modem to a datalogger s CS I O port and is recommended for dataloggers with the PakBus operating system Wiring Red 12V or switched 12V Bla...

Page 14: ...O port and is recommended for dataloggers with the mixed array operating system e g the CR10X The SC932A interface is used to connect the modem to the CS I O port and is recommended for dataloggers w...

Page 15: ...field NOTE One of the special features of your RavenXTG is the ability to activate itself automatically When you first power on the RavenXTG it will check to see if it has been activated with account...

Page 16: ...the RavenXTG The Reset button on the left side of the RavenXTG has two functions If it is quickly depressed and released the modem will simply power cycle the internal hardware If however the reset is...

Page 17: ...es from CSI s website www campbellsci com downloads are used to configure the RavenXTG modem to function as a serial server or in Point to Point protocol PPP Template files for the RavenXTG Descriptio...

Page 18: ...owing screen Click the Connect icon in the Configuration Panel to open the connection options dialogue box Select PPP and choose the COM port the modem is connected to Do not change the Password the d...

Page 19: ...name select RavenXTG GPRS EDGE Template 115200 RavenXTG GPRS EDGE Template 9600 or RavenXTG GPRS EDGE PPP Template 115200 The following screens show the settings for the Miscellaneous and Serial sett...

Page 20: ...lue field for NETAPN and 1 IP internet in the New Value field for CGDCONT After the template file has been loaded and the APN entered click the Write icon to save the changes in the modem Click the Re...

Page 21: ...ranslates a dynamic IP address to a fully qualified domain name so you can contact your RavenXTG by name as if it had a static IP If the RavenXTG is configured for Dynamic IP when the RavenXTG first c...

Page 22: ...anager update interval How often you want the address sent to IP Manager If this is set to zero the modem will only send an update if the IP changes i e if the modem is reset or is assigned a differen...

Page 23: ...scribed below 1 Select Add Root IPPort 2 Add a datalogger to the IPPort PakBus dataloggers e g the CR1000 require a PakBusPort 3 On the IPPort page add the IP address or Domain Name and the Port numbe...

Page 24: ...eless s IP Manager enter the Internet IP address as xxxx yyyy 3001 where xxxx is the modem name yyyy is the Domain name and 3001 is the port number For modems configured as PPP the port number is 6785...

Page 25: ...nnection using the Connect screen as shown below Click on the appropriate station then click the Connect button to initiate a call to the datalogger If the call is successful the connectors at the bot...

Page 26: ...tered using AceManager Section 5 Using AceManager to Program the Modem After the RavenXTG GPRS EDGE template file has been loaded you can verify settings in the Status Misc Serial and GPRS EDGE groups...

Page 27: ...ort using AceManager a If the modem has been configured for PPP see Appendix C Configuring the RavenXTG Modem for PPP then you may have to check the Use SOS Mode box b From the Status group make sure...

Page 28: ...GPRS EDGE Template 9600 template file sets the baud rate to 9600 which is the maximum baud rate for the CR10X and older dataloggers For newer dataloggers the baud rate can be changed to the highest ba...

Page 29: ...nfigured for 115200 baud baud rate is set by the template file Baud rate of the SC105 must match the baud rate in the modem which has to be supported by the datalogger SC105 settings for use with the...

Page 30: ...ice Port configuration b Try adding a few seconds to the extra response time on the IP Port in LoggerNet you should not need more than 5 seconds c If you are trying to communicate to a PakBus datalogg...

Page 31: ...compare the current values with the previous values If the values are the same the modem is not attempting to make a connection with the datalogger Check that the GPRS EDGE_XXX xml template file has b...

Page 32: ...RavenXTG GPRS EDGE Sierra Wireless Cellular Modem 26...

Page 33: ...mpbellsci com downloads The procedure for sending the template files is described in Section 5 Using AceManager to Program the Modem When the template files are not available AceManager can be used to...

Page 34: ...For a CR10X 9600 8N1 and for a CR1000 115200 8N1 Q Serial Port Flow Control This should be set to None V AT Verbose Mode Set this to Verbose for CR800 CR1000 CR3000 Numeric for CR10 X CR510 CR23X D D...

Page 35: ...the modem Installing the SIM To install the SIM you will only need a small Phillips head screw driver Opening the Case 1 Unplug the modem power and all cables 2 Using a small Phillips head screw driv...

Page 36: ...Appendix B Installation of SIM Card in the RavenXTG 4 Replace the faceplate the installation of the SIM is complete B 2...

Page 37: ...r HTTP 23 for Telnet and 21 for FTP These ports can be disabled in the datalogger s configuration After the RS 232 port on the modem has been configured as PPP use AceManager with a TCP or UDP connect...

Page 38: ...Appendix C Configuring the RavenXTG Modem for PPP MD 02 PPP C 2...

Page 39: ...the Device Configuration Utility configure the following setting on the PPP tab Config Port Used RS 232 IP Address 0 0 0 0 Modem Dial String PPP Modem Dial Response CONNECT User Name and Password are...

Page 40: ...ect the Network Services tab The PakBus TCP Service Port default is 6785 This is the Port number that will follow the IP address for LoggerNet to communicate with the datalogger Using the Device Confi...

Page 41: ...Appendix C Configuring the RavenXTG Modem for PPP LoggerNet Settings Enter the IP address of the RavenXTG and the PakBus TCP Service Port number of the datalogger e g 6785 as explained above C 5...

Page 42: ...Appendix C Configuring the RavenXTG Modem for PPP C 6...

Page 43: ...o the Settings Editor in the Device Configuration Utility to enable TLS in the datalogger NOTE Early in 2013 Gmail changed the way they receive email The changes require a port number of 587 to be add...

Page 44: ...ondition is True Both the CR1000 and RavenXTG modem must be configured as PPP as described in Appendix C Configuring the RavenXTG Modem for PPP Transport Layer Security TLS must be enabled in the data...

Page 45: ...LF Message Message An alarm condition has been identified Message Message The temperature is Temp degrees C CRLF CRLF Message Message Datalogger time is Status Timestamp EmailSuccess EmailSend ServerA...

Page 46: ...Appendix D EmailSend Using the Gmail Outgoing SMTP Server D 4...

Page 47: ...covered May be out of Verizon s native network Self provisioning may not work in this case though this is increasingly rare Try setting up the modem in an area with strong cellular coverage and then...

Page 48: ...ave been assigned IP behind Verizon s firewall do you have a mobile terminated IP Weak signals are more affected by RF noise This may prevent making a strong enough connection to send receive data Ver...

Page 49: ...Sent Received try to connect to logger check Host sent received again Is DPort AceManager Misc Group set to 3001 Or 6785 Is LoggerNet trying to connect to same Could be wrong baud rate Should be corre...

Page 50: ...to the modem and the modem reset Was APN entered and correct Go to page D 2 Contact AT T if don t have Yes Yes Yes I2Gold is best for static IP outside firewall but extra mo Note I2Gold does not allo...

Page 51: ...oggerNet is IP port Callback enable checked Connect with AceManager under Status what does HostMode say If none of these fix the issue the customer should check their firewall Uncheck Uncheck Somethin...

Page 52: ...Appendix E Troubleshooting Flowchart E 6...

Page 53: ......

Page 54: ...ific Canada Corp CSC 11564 149th Street NW Edmonton Alberta T5M 1W7 CANADA www campbellsci ca dataloggers campbellsci ca Campbell Scientific Centro Caribe S A CSCC 300 N Cementerio Edificio Breller Sa...

Reviews: