Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to connect the SOEM to virtual network interface in Linux #828

Open
monishekar518 opened this issue Jun 24, 2024 · 5 comments
Open

how to connect the SOEM to virtual network interface in Linux #828

monishekar518 opened this issue Jun 24, 2024 · 5 comments

Comments

@monishekar518
Copy link

Hello has someone tried or know to do the following implementation on EtherCAT, please help!

SOEM master <--> virtual nic <--> physical nic <--> slave

i am able to initalize but the master is not able to read and configure the slave on the network

@ArthurKetels
Copy link
Contributor

It all depends on the implementation of the virtual nic. In principle it could work. But if the implementation relies on standard Ethernet traffic with tcp or udp or even MAC addresses for routing, it will not work. SOEM uses RAW Ethernet sockets.

@monishekar518
Copy link
Author

So I want a set up a network like shown below.
Libethercat master <--> virtual nic <--> physical nic <--> slave

i am able to initalize but the master is not able to read the slaves and configure the slave on the network.
virtual interface is created as below.
#sudo modprobe dummy
#sudo ip link add eth0 type dummy
#sudo ip link set eth0 up

the binding between virtual to physical nic is operated using raw sockets.
I have created 2 threads,
thread 1 > binding function with 2 sockets, source as virtual nic and destination as physical nic, then forward frames
thread 2 > binding function with 2 sockets, source as physical nic and destination as virtual nic, then forward frames

Physical connection is connected to Beckhoff slave.

Could you please tell me why the master doesn't detect slaves with above setup.

@ArthurKetels
Copy link
Contributor

As far as I know you can not use dummy interfaces to transmit anything. That is why they are called "dummy".

@monishekar518
Copy link
Author

But I checked using wireshark and was able to capture the frames from master on this interface. Also after transmitting frames from master with the above network configuration the slave coupler (EK1101) indicates with a led which has a higher frequency of blinking.

@ArthurKetels
Copy link
Contributor

Connect another computer to the physical port and transmit some packets. Capture your virtual nic with wireshark. You will see that no packets arrive. For EtherCAT to work you need two way communication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants