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.

IPRoute problem with CR1000


luisfgranada Dec 3, 2019 07:20 AM

Hello,

I'm having problems with IPRoute in a CR1000 datalogger with firmware version 32.02.

I have the following setup:

- CR1000 with a NL116. Ethernet settings are IP: 192.168.21.32, Subnet Mask: 255.255.224.0, IP Gateway: 192.168.1.0.

- Ethernet cable connected from NL116 port to my computer.

- Computer with IP: 192.168.21.33, Subnet Mask: 255.255.224.0, IP Gateway: 192.168.1.0.

- Modem connected to RS232 port. Datalogger has PPP connection.

In the ethernet and PPP tabs of device configuration utility, it reads "Ethernet is the default network."

The following functions don't work with firmware versions 32.02 or 32.04 but it works with version 31.02:

IPRoute ("www.google.com",1)
PingGoogle = PingIP("www.google.com",5000)

I have a datalogger on site from which I need to send emails via PPP since the ethernet is connected to a Scada network (no internet). The datalogger has version 32.02 and I'm trying to avoid downgrading/upgrading the firmware (the datalogger is in Jordan and I am in Spain) and I can't send emails because the datalogger is trying to send them over ethernet.

I've tried using the third parameter of IPRoute avaiable in latest versions with no success.

I've been trying to explain this problem to Campbell Sci. Spain for the past two weeks and they don't seem to understand the problem, they have done some tests in which they say it works but it's not the same setup. Just yesterday after a phone discussion with them I realized they were not setting the Ethernet IP Gateway (0.0.0.0) resulting in a message in the Ethernet and PPP Tabs "PPP is the default network" and they also were connecting the datalogger to a working internet network (via ethernet) so of course the Ping/emailrelay will work for them but it's not the same setup I have.

Could anybody help? Is this a problem in a CR1000 with last firmware versions?

For your information, I just tested a CR1000x with last firmware and the IPRoute works. When I upload the program, in the ethernet and PPP tabs of device configuration utility, it reads "Ethernet is the default network." but as soon as the IPRoute command is executed the message changes to "PPP is the default network". This doesn't happen with CR1000.

Thanks in advanced,

Luis


JDavis Dec 3, 2019 07:43 PM

OS version 32.03 added an optional parameter to IPRoute that allows exclusive forcing of a connection. I believe if you set that parameter to 1, and run your program on OS 32.03 or 32.04, it will work as you expect.


luisfgranada Dec 3, 2019 08:11 PM

Hi JDavis,

Thanks for replying.

As I said in the post:

"I've tried using the third parameter of IPRoute avaiable in latest versions with no success."

I've tried that setting in v32.04 (I havent tried it in 32.03) and it doesn't make a difference. And as I said, I'm not in position of upgrading the firmware, so the best option for me would be that it works with the fimrware the datalogger has (v32.02). In a extreme case I will request the customer to downgrade the firmware to 31.02 but just in a extreme case.

Anyways, as I said, IPRoute works with with version 31.02, but it doesnt with v32.02 or 32.04.

I'd like to know if you can help me, if this is a known problem and how can I solve it.

Thanks in advanced.


Nathanael Dec 4, 2019 11:51 PM

Luis,

My apologies this isn’t working for you. IPRoute is unfortunately broken by development in OS 32.02. The 32.03 update was released primarily to resolve this issue. Unfortunately you will need to change your OS version.

I performed some tests this morning using Ethernet and PPP on my desk on OS 32.04 and it works. However there was more that I had to do. I’ve attached my code sample to this email. Assuming everything else is correct the one thing you will need to do is set the route for your DNS servers on the PPP interface. In short the www.google.com address needs to be resolved via DNS in order for that route to work, so we need to add additional rules to route the DNS traffic for the resolution of that address out the PPP interface to the DNS servers. If you need to know the DNS server addresses look on the PPP tab in the Device Configuration Utility.  

I added my DNS Routes:

                IPRoute ("198.224.173.135",1,1)

                IPRoute ("198.224.174.135",1,1)

                IPRoute ("208.67.222.222",1,1)

 

IPRoute ("www.google.com",1,1)

PingGoogle = PingIP("www.google.com",5000)

 

One additional question: Are you putting your statements before the scan or inside the scan loop? The reason I ask is that in my tests with another customer we sometimes had trouble because the instructions executed before the PPP interface had started up. When we put the instructions within the scan loop we seemed to completely resolve the issue.

 

Feel free to send me a copy of your datalogger program if you would like. I would love to look at it.

Thanks,

Nathanael Wright

Customer Support/Implementation Engineer: Telecommunications Specialist


luisfgranada Dec 5, 2019 08:39 AM

Hi Nathanael,

Thanks for replying. I've sent you an email with all the details you asked and some questions.

Thanks,

Luis Granada


StuRobinson Dec 9, 2019 09:45 PM

Uisfgranada, I just viewed your post. Can you confirm your IP setup as it looks incorrect?

With a subnet mask of 255.255.224.0 the usable Host IP Range is 192.168.0.1 - 192.168.31.254 so your gateway (192.168.1.0) falls out of this range as you can only ever use x.x.x.1 to x.x.x.254 as the last digit.

If (indeed) your gateway is configured on the CR1000 to be 192.168.1.0 then you won’t be able to send IP packets out to another subnet – i.e. the internet

I am thinking? That your gateway should be 192.168.0.1 – can you confirm?


luisfgranada Dec 12, 2019 01:34 PM

Hi StuRobinson,

You are right. The correct gateway is 192.168.0.1.

Anyways, the problem here is that the logger is not redirecting the traffic via PPP so changing the ethernet gateway doesnt affect the outcome and I still have the same problem.

Thanks.

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