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.

How to configure the RavenXT -> SC105 -> CR6 for PPP


Bluegrass Mar 4, 2016 03:20 AM

To Whom It May Concern,

I like to use function EmailSend() to send email from CR6. The original settings, which were configured by CSI, for my RavenXT -> SC105 -> CR6 -> (2)VW305 worked well before I tried to set up PPP mode. SC105 connected to CS I/O port on CR6.

I followed instruction from Appendix B of "RavenXTV CDMA Sierra Wireless Cellular Modem, Revision: 7/15" to set up my modem. But, there is not any instructions for setting up SC105 and CR6. I have guessed a couple of days, failed and messed up my system. I cannot connect to this system by using cellular modem now.

Can anyone give me help on following settings:

For screen of Development of SC105:

CS I/O Mode:

CS I/O Baud Rate:

RS-232 Mode:

Baud Rate:

Parity:

Stop Bitts:

Data Bits:

And, is there any change required on screen of Settings Editor of SC105?

On CR6, under tab of Development -> PPP, what selection should I have for "Config/Port Used"? Should it be RS-232, or CS I/O ME, or CS I/O SDC7? The rest of parameters are set up as following:

IP address: 0.0.0.0

User Name: (Blank)

Password: (Blank)

Confirm Password: (Blank)

Modem Dial String: PPP

Modem Dial Response: CONNECT

Similar to CR1000 settings, I need to set up Baud Rate to "115200 Fixed" on corresponding ComPort Settings; and set up PakBus/TCP Port to "6785" on screen of Development -> Network Services on CR6.

Are those settings correct?

Thank you very much in advance and best wishes.

Charlie


Bluegrass Mar 4, 2016 05:48 PM

It gets connected! The settings are:

For screen of Development of SC105:

CS I/O Mode: Modem Enable   <-- This is not Factory Default

CS I/O Baud Rate: 115.2k

RS-232 Mode: Modem (Default)

Baud Rate: 115.2k

Parity: None (Default)

Stop Bitts: 1 bit (Default)

Data Bits: 8 bits (Default)

On CR6, under tab of Development -> PPP:

Config/Port Used: CS I/O ME

IP address: 0.0.0.0

User Name: (Blank)

Password: (Blank)

Confirm Password: (Blank)

Modem Dial String: PPP

Modem Dial Response: CONNECT

They are working.

However, I still cannot send email from CR6. It is said that CR6 can use gmail server send email. The following codes are what I modified based on EmailSend() example. The results I got always are: EmailSuccess = 0; Result = "Error: Failed to connect". Did I do anything wrong in my codes? Can anyone give me help? Thanks.

'Main program variables
'Declare variables
Public PtempC1, PtempF1, BattVolt1
Const TemperatureThreshold = 90

'declare Email parameter strings (as constants), Message String & Result Variable
Const ServerAddr="smtp.gmail.com:587" 'gmail requires port 587 to send
Const ToAddr="xxx.xxx@uky.edu"
Const FromAddr="xxx.xxx@gmail.com"
Const Subject="Email Message Test"
Const Attach=""
Const UserName="xxx.xxx@gmail.com"
Const Password="xxxxxx"
Const CRLF = CHR(13)+CHR(10)

Public Result As String * 50
Public AlarmTrigger As Boolean
Public Message As String * 250
Public EmailSuccess As Boolean

DataTable (SysDat1,1,-1)
  Sample (1,PtempF1,FP2)
    Minimum (1,BattVolt1,FP2,0,False)
  Sample (1,EmailSuccess,FP2)
  Sample (1,Result,String)
EndTable

BeginProg
    Scan (5,Sec,3,0)
          PanelTemp (PtempC1,250)  'read datalogger panel temperature
          PtempF1 = ((PtempC1*9)/5)+32  'convert panel temp to degrees F
          Battery (BattVolt1)  'store system supply voltage
    NextScan

    SlowSequence
    Scan(120,sec,1,0)
      If AlarmTrigger = False Then
       If PtempF1 < TemperatureThreshold Then AlarmTrigger = True
       If AlarmTrigger Then
         Message = "Warning!" + CRLF + CRLF
         Message = Message + "This is a automatic email message from the datalogger station " + Status.StationName + ". "
         Message = Message + "An alarm condition has been identified. "
         Message = Message + "The temperature is " + PtempF1 + " degrees E." + CRLF + CRLF + CRLF
         Message = Message + "Datalogger time is " + Status.Timestamp
         EmailSuccess=EmailSend (ServerAddr,ToAddr,FromAddr,Subject,Message,Attach,UserName,Password,Result)
       EndIf
      EndIf
      If PtempF1 > TemperatureThreshold Then AlarmTrigger=False
          CallTable SysDat1  'store system data
    NextScan
EndProg


GaryTRoberts Mar 4, 2016 05:52 PM

Have entered ip addresses into the DNS settings in the datalogger.  This is usually the culprit.  You can use Googles by entering 8.8.8.8 and 8.8.4.4.  If you have OS 4, a dns setting is automatically added by default.


Bluegrass Mar 4, 2016 06:34 PM

Thank you, Gary.

I got some progress. After I entered 8.8.8.8 and 8.8.4.4 on DNS settings, the results I receievd: EmailSuccess = 0; Result = "534-5.7.14 <https://accounts.google.com/ContinueSig". It cannot send email from CR6. Do I need to change ToAddr="xxx.xxx@uky.edu" to ToAddr="xxx.xxx@gmail.com" which is same as FromAddr="xxx.xxx@gmail.com"?

Best wishes,

Charlie


GaryTRoberts Mar 4, 2016 06:38 PM

Charlie,

No, you should not have to change the email address.  Make your Result string bigger so we can see more of the error message.  That should give us a better clue as to what we need to do.  Make it Result As String * 400 for now.


GaryTRoberts Mar 4, 2016 06:55 PM

You might also have to do the following on your GMail account:

Log into your Google email account and then go to this link:https://www.google.com/settings/security/lesssecureapps and set "Access for less secure apps" to ON. Test to see if your issue is resolved.


Bluegrass Mar 4, 2016 06:58 PM

Gary,

It works now. I guess, Google stopped sign-in attempt from my cellular modem with CR6, and sent me a warning email. After I accept that cellular modem, it starts to work. The results I receievd now are: EmailSuccess = -1; Result = "221 2.0.0 closing connection n84sm2817364oig.14 - gsmtp". Thank you so much.

Have a wonderful weekend.

Charlie


Bluegrass Mar 4, 2016 07:03 PM

You are right. I turned on "Access for less secure apps" before for my web application. But, even that, Google still stopped sign-in from new device. Thanks.

Charlie


Bluegrass Mar 4, 2016 07:19 PM

I have successfully sent email by using Yahoo server as well. Changes are ServerAddr="smtp.mail.yahoo.com:587", Const FromAddr="xxx.xxx@yahoo.com" and Const UserName="xxx.xxx@yahoo.com"

I could fall sleep tonight :)

Charlie

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