NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet loopback jack is not detected by NI Linux RT

Hi,

 

In an industrial environment, I use a self-made Ethernet loopback cable to test the cabling that goes from the ethernet port of a machine to the ethernet port that is accessible to the user.

The Ethernet loopback cable I always use is basically a bridge between the TX and RX pins of an RJ45 jack. This way, when you branch the cable to an ethernet port, the OS sees that another machine has been connected to the port (obviously it is himself).

I have tested lots of machines this way, mainly switches, hubs and Windows-based PCs. Now, I need to test a cRIO-9034 the same way, but surprisingly, the NI Linux RT does not recognize the connection when I plug the loopback cable.

The cable is OK (it still works with Windows PCs and switches), and the port of the cRIO works (it recognizes the connection if I wire it to a switch or Windows PC).

So, any idea why the loopback cable is not working with the cRIO (NI Linux RT)?

0 Kudos
Message 1 of 7
(3,320 Views)

To my knowledge this isn't a workflow that we test, so I can't state what behavior is expected here. Do you see activity on the port LEDs? What are you behavior are you expecting to see when this works? The cRIO to detect itself somehow? Could you clarify the goal of this test? 

0 Kudos
Message 2 of 7
(3,291 Views)

The cRIO is inside a trunk, which is closed and at a considerable distance from the working spot. Therefore, we pass usb and ethernet cables from the cRIO to a user interface board located in the spot. The goal is to test the cable that goes from the cRIO ethernet port to the ethernet port that is actually available to the user (the green cable here). 

syst.png

A loopback jack connected to the user interface board enables to see that the green cable is correctly connected, because the leds on the ethernet port of the cRIO should turn on when it recognizes that it is connected to another machine (which is actually itself).

If we had a Windows machine or ethernet switch/hub instead of the cRIO, this would work (I check systems this way regularly). However, it is not working with the cRIO. Any idea why?

0 Kudos
Message 3 of 7
(3,285 Views)

Hey i.ayestaran,

You shouldn't need to use a loopback cable as almost every modern network interface should have built-in crossover detection. I grabbed a cRIO and tested connecting the ports together using a standard ethernet cable, and was able to ping between the two without any issue. 

 

How are you testing the loopback cable? Are you using ping from the command line on the cRIO? Or are you just looking for the link lights? What does the "ip a" or "ifconfig" command return when you have the loopback cable connected?

Charlie J.
National Instruments
Message 4 of 7
(3,276 Views)

Hi,

I will not be able to connect the two ports together with an ethernet cable in the final installation because I only have one port available in the user interface board. But yes, if I connect the two ports together now (I still did not mount the cRIO in its definitive place), I see that the connection is stablished (ports lights are on).

 

To test the loopback cable, I just check whether the operating state of the port is 'up' or 'down', by the following command:

cat /sys/class/net/eth1/operstate

The ifconfig shows that there is no IP assigned to the port when the loopback cable is connected, same as if nothing was connected. However, I set an static IP to that port via NI MAX, which is properly assigned to the port when an ethernet cable is connected to another machine.

eth1      Link encap:Ethernet  HWaddr 00:80:2F:23:49:E2
          inet6 addr: fe80::280:2fff:fe23:49e2/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7156 (6.9 KiB)  TX bytes:7776 (7.5 KiB)
          Memory:d0800000-d087ffff

 

0 Kudos
Message 5 of 7
(3,265 Views)

Hi i.ayestarn,

Could you open a service request with our support channel to take a closer look at this behavior? It could be a bug, and they should be able to help evaluate this and discuss your use case in more detail. 

You should be able to create a support ticket from the "Open a Service Request" link on the following page, assuming you have an active support contract:

http://www.ni.com/contact-us/en-us

 

Charlie J.
National Instruments
0 Kudos
Message 6 of 7
(3,255 Views)

Ok thank you, I will report the problem.

0 Kudos
Message 7 of 7
(3,253 Views)