Adding a M.2 ethernet port

More
1 year 7 months ago - 1 year 7 months ago #325090 by Hakan
For some time I have been setting up a plasma system using a N100 mini-PC and ethercat drives 3xECT60 and one of my own Metalmusing EaserCAT-7000 board for IO and torch height. It is working fine, but there is the occasional, sometimes more than occasional message in dmesg/journal, datagrams UNMATCHED

In this case it is not a catastrophe, the ethercat cards easily recovers.
It means that the EtherCAT server sends out a packet and expects a packet back. For some reason it doesn't come back in time (I think).

So the focus is on this mini-PC, a T8 Firebat pro plus. It has two network ports, both Realtek. It is small, draw around 10 W, three HDMI and three USB 3 ports. Had the network worker better it would have been good, but no.
 
The network ports are
Code:
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
I have of course tested with the realtek dkms driver, and added boot options. It gets better with the dkms driver but there is still the occasional datagram UNMATCHED. I don't want them.

I have seen in the past that all Intel network adapter perform better than this. So I will add an Intel network adapter to this mini-PC.
What I have in mind is to replace the WiFi card with some kind of ethernet card. The WiFi is an M.2 card, size 2230.
That's the options I have. No PCIE, no mini-PCIE. Just a M.2 2230 E-key WiFi card position.


 
Last edit: 1 year 7 months ago by Hakan.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #325093 by Hakan
Replied by Hakan on topic Adding a M.2 ethernet port
My first experiment was to add an M.2 to PCIE adapter, and put in an Intel I210 card I have.Here is what that looks like 

There is the small M.2 card that goes in the slot and then there is the rather stiff cable that connects to the PCIE slot. And I plugged in the I210 there.

The biggest problem with this setup is that relatively stiff cable. It runs right over the screw that secures the M.2 board in place. I had to bend the cable, it is quite stiff. The cable became sandwiched between the adapter board and the M.2 system disk that sits on top. I got it there in the end but not ideal. 
 

As for the function - brilliant! After startup, the I210 showed up as a PCIE network adapter, it showed up in the interfaces list. I did nothing, just started the mini-PC. 

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #325094 by Hakan
Replied by Hakan on topic Adding a M.2 ethernet port


I put in the MAC-address for the new adapter into /etc/ethercat.conf, and restarted ethercat service.
There were no initial datagram UNMATCHED messages, so I use the plasma table for some minutes.
Even after a day there were no datagram UNMATCHED messages, so I call that a win.
I even went back from isolcpus=1,2,3 to no isolpcus, it works just fine without that.

 
 

The verdict is: it works.
The stiff cable is a problem. And overall making a nice package of this will be a challenge.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #325099 by Hakan
Replied by Hakan on topic Adding a M.2 ethernet port
Next I tested a M.2 ethernet adapter, Intel I226 on a M.2 card and a cable to lead out to the RJ45 connector.
It's the same M.2 A+E key 2230 size card.
 
It turns out the cable runs over the screw also in this case. The cables are now much thinner and much easier to bend so it isn't particularly easy to make room for the securing screw but can be done. I think I broke the connector on the board but it continues to work.
 
 
 
 

The function was just as good with this M.2 network adapter. The adapter showed up in the pci listing automatically, showed up in the interfaces list also automatically and when I switched ethercat config to this new network adapter, ethercat worked just as well.

I decided to use this one, mostly because it was easier to make a nice installation. Here it is where the RJ45 connector is in a plastic housing, glued to the top of the T8.
 
The verdict: It works. Tricky with the cables on the M.2 board. Easier to make a nice installation of the RJ45 connector.

For both these ways of adding a network board to a mini-PC I must say that there are many ifs and buts and maybes that need to be figured out beforehand. The absolute recommendation is to buy the right system to start with.
I  tried to follow that advice and looked around for another N100-based motherboard and there are a few out there, even with Intel network adapter.
I test-fitted it in the cabinet, I used my old trusty J1900 board. And while there is room for it, there isn't much extra room. And the QtPlasma interface can use more CPU power me think.
In the end I thought this could be a fun experiment. And as i happens both products work.
 
The following user(s) said Thank You: tommylight, rodw

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #325113 by unknown
Replied by unknown on topic Adding a M.2 ethernet port
Great work :)

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #325149 by rodw
Replied by rodw on topic Adding a M.2 ethernet port
Great stuff. I have always maintained the more efficient Ethercat protocol makes it more robust than the hm2_eth protocol used by Mesa and I think you proved that with your tests.

There are a few additional optimisations you can do for either Intel or Realtek NIC's and I cover them here
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
Some settings to disable  Energy Efficient Ethernet which causes latency excursions and the forum scripts to set IRQ affinity
I might also suggest disabling coalescing as discussed in man hm2_eth as I think it might also help
linuxcnc.org/docs/devel/html/man/man9/hm2_eth.9.html

Anyway, my J1900 PC with Realtek NIC's is loving these settings and it running Ethercat perfectly. Currently running Trixie on it.

With regard N100 PC's with Intel NIC's, this one looks interesting even though it has a few too many NIC's. What is interesting is the RS485 serial port already built in for plasma cutters and VFD's
www.alibaba.com/product-detail/Linkleaps...N_1601225258750.html

This will be my next Linuxcnc PC

 
Last edit: 1 year 7 months ago by rodw.

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds
Powered by Kunena Forum