Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Email Realy with CR1000X and Wavecom


Alromar Oct 26, 2021 12:57 PM

Hi I am in Egypt and need to send emails with the data of a met mast.

I have CR1000X conected with the CPI port with de Wavecom Modem.

The modem is configured as follow:

AT&F Reset to factory default settings.

AT+IPR=9600
ATX0 Basic connect messages only
ATS0=1 Set the COM110 modem to auto-answer incoming calls
AT+IFC=0,0 Handshaking off
AT+CICB=0 Force incoming calls to data mode if no bearer declared
AT&W Saves all of the above settings in non-volatile memory.

With the Device Utility I configured

Com port settings

RS232 9600 Fiexed

And in modem dial string

AT+CFUN=1;;;;;;;;;;;AT+CGDCONT=1,"IP","internet.vodafone.net";ATD*99***1#

User internet

pass: internet

What I see in the modem is that when is going to send the data it´s stay blink for 10 secs (that's OK), but it suppose that after that must blink quickly but it doesn't is like if don't receive the order  or something is wrong.

This is the program file

//////////////////////////////////

CallTable Table_10_Min
CallTable Table_24_Hr
'CallTable Table_emails

'+++++++++++++++++++++ EMAIL TRIGGER TIMED ACTIVATION ++++++++++++++++++

' RealTime( rTime )
' If rTime(4)=1 AND rTime(5)=00 AND rTime(6) = 0 Then 'poner hora minutos y segundos.
' email_trigger=true
' EndIf
' If rTime(4)=2 AND rTime(5)=30 AND rTime(6) = 0 Then 'poner hora minutos y segundos.
' email_trigger=true
' EndIf
' If rTime(4)=3 AND rTime(5)=30 AND rTime(6) = 0 Then 'poner hora minutos y segundos.
' email_trigger=true
' EndIf

NextScan

SlowSequence
Scan (1,Min,3,0)

now = Public.Timestamp(1,1)
nowStr = SecsSince1990(now,5)

email_tx_success = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_10_Min",0,10,Min,8)

' email_tx_success = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_10_Min","Table_24_Hr",0,1,Hr,8)

email_tx_success_2 = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_24_Hr",0,24,Hr,8)

'If EmailRelay was not successful, lets try one more time.

If email_tx_success <> -1 Then

'2nd attempt

email_tx_success = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_10_Min",0,10,Min,8)

' email_tx_success = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_10_Min","Table_24_Hr",0,1,Hr,8)

email_tx_success_2 = EmailRelay ("alfredo.pascual@alromar-energia.es",nowStr,nowStr,email_relay_server_response,"Table_24_Hr",0,24,Hr,8)

EndIf

'Human readable error messages

Select Case email_tx_success

Case -1

email_relay_results_human_readable = "EmailRelay server received the message from the datalogger successfully!"

Case 0

email_relay_results_human_readable = "The connection to the EmailRelay server failed."

Case -2

email_relay_results_human_readable = "Execution of the EmailRelay function did not occur due to lack of records or not enough time."

Case -3

email_relay_results_human_readable = "A connection to the EmailRelay server was made but there was an error in communication."

EndSelect

NextScan

EndProg

////////////////////////////////////////////////////////

Previously I define:

'EmailRelay() variables

Public email_relay_server_response As String * 100

Public email_relay_results_human_readable As String * 100

Public email_tx_success, email_tx_success_2

Thanks for your help

Log in or register to post/reply in the forum.