EtherCAT stopped working after Reboot
09 May 2024 15:55 #300226
by burnie
EtherCAT stopped working after Reboot was created by burnie
Hello,
I've followed rodw instructions for installing EtherCAT on a Pi 4 with the 2.9.2 Pi OS, afterThe activity lights on the Pi and the servo driver ethernet ports started blinking.recognized the servo driver, and all is good so far, but after I created the udev rule and rebooted the EtherCAT seemed to stop working.
Now returns "Failed to obtain number of masters: Failed to open master device /dev/EtherCAT0" No such file or directory" I've looked at the /dev folder and the EtherCAT0 file that was there before the reboot was gone and the activity lights on the Pi and the Servo driver stopped blinking.
Did not return any error and
returned this
I'm new to LinuxCNC and Linux in general, please let me know what command to run or what logs to get to help diagnose this, Thank you!
I've followed rodw instructions for installing EtherCAT on a Pi 4 with the 2.9.2 Pi OS, after
sudo systemctl start ethercat.service
ethercat slaves
ethercat slaves
sudo systemctl enable ethercat.service
sudo systemctl start ethercat.service
sudo systemctl status ethercat.service
returned this
I'm new to LinuxCNC and Linux in general, please let me know what command to run or what logs to get to help diagnose this, Thank you!
Please Log in or Create an account to join the conversation.
09 May 2024 21:51 #300246
by rodw
Replied by rodw on topic EtherCAT stopped working after Reboot
Sounds like you forgot the udev rule to load on startup. PLease read carefully.
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
Please Log in or Create an account to join the conversation.
10 May 2024 01:02 - 10 May 2024 04:34 #300262
by burnie
Replied by burnie on topic EtherCAT stopped working after Reboot
Hello rodw, thank you for the reply.
I've followed your instructions and did not forget to add the udev rule. I've checked after a reboot, the rule file and it is still in the /etc/udev/rules.d folder.
Edit:
I've tried following your instructions on an old desktop computer and there was no problem after a reboot. Maybe it's something to do with Pi or Pi OS?
I've followed your instructions and did not forget to add the udev rule. I've checked after a reboot, the rule file and it is still in the /etc/udev/rules.d folder.
Edit:
I've tried following your instructions on an old desktop computer and there was no problem after a reboot. Maybe it's something to do with Pi or Pi OS?
Last edit: 10 May 2024 04:34 by burnie.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
13 May 2024 10:43 #300500
by cekaa
Replied by cekaa on topic EtherCAT stopped working after Reboot
Hello dear members, I reinstalled it maybe 50 times and when it restarted, ethercat master raspberry pi 4 8gb ==== Failed to obtain number of masters:
Failed to open master device /dev/EtherCAT0" No such file or directory
There is no problem before restarting, it sees the server, everything is fine. Is this a raspberry pi problem?????
I tried many times before writing here, no matter what I did, Linuxcnc 2.9.2 Rasberry Pi is installed, please help.
Failed to open master device /dev/EtherCAT0" No such file or directory
There is no problem before restarting, it sees the server, everything is fine. Is this a raspberry pi problem?????
I tried many times before writing here, no matter what I did, Linuxcnc 2.9.2 Rasberry Pi is installed, please help.
The following user(s) said Thank You: burnie
Please Log in or Create an account to join the conversation.
13 May 2024 10:50 #300501
by burnie
Replied by burnie on topic EtherCAT stopped working after Reboot
This is exactly the same problem I had on the same 8 GB Pi 4, I've given up on the Pi and switched to an old desktop PC without this problem.
The following user(s) said Thank You: cekaa
Please Log in or Create an account to join the conversation.
13 May 2024 11:54 - 13 May 2024 12:52 #300508
by cekaa
Replied by cekaa on topic EtherCAT stopped working after Reboot
Attachments:
Last edit: 13 May 2024 12:52 by cekaa.
Please Log in or Create an account to join the conversation.
- scottlaird
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 155
17 May 2024 16:56 #300847
by scottlaird
Replied by scottlaird on topic EtherCAT stopped working after Reboot
If it's not working at boot but it does work after re-installing, then either the permissions in /dev are wrong or the module isn't getting loaded.
So, after rebooting, try `ls -l /dev/EtherCAT*`. Does that show anything? Are the permissions `rw-rw-rw-` or `rw
`? If the file exists, then you just have a permissions problem. Run `sudo chmod 666 /dev/EtherCAT*` to fix for this session and then share your udev rule so we can figure out why it's not working.
If there are no /dev/EtherCAT* files, then something's wrong with the underlying kernel module. First, let's see what systemd thinks: `systemctl status ethercat.service`. That *should* say something like this:
If it says that it's not running but there's no error then run `sudo systemctl enable ethercat.service` and `sudo systemctl start ethercat.service`, then re-verify that permissions are right, above.
If there's an error, then it's *probably* something related to the module not being available. Try `lsmod | grep ^ec_`. It should list `ec_master` and one other `ec_` module, depending on your Ethernet driver in the EtherCAT config file. If they aren't there, then try `sudo modprobe ec_master` and report the error that you get.
Also, try running `sudo apt install -y linux-headers-$(uname -r)`; if your kernel was upgraded recently, then there's a decent chance that you're missing one of the components needed to recompile the EtherCAT module, and that will fix it until the next kernel upgrade.
So, after rebooting, try `ls -l /dev/EtherCAT*`. Does that show anything? Are the permissions `rw-rw-rw-` or `rw
`? If the file exists, then you just have a permissions problem. Run `sudo chmod 666 /dev/EtherCAT*` to fix for this session and then share your udev rule so we can figure out why it's not working.
If there are no /dev/EtherCAT* files, then something's wrong with the underlying kernel module. First, let's see what systemd thinks: `systemctl status ethercat.service`. That *should* say something like this:
$ systemctl status ethercat.service
● ethercat.service - EtherCAT Master Kernel Modules
Loaded: loaded (/lib/systemd/system/ethercat.service; enabled; preset: enabled)
Active: active (exited) since Sun 2024-04-28 16:12:51 PDT; 2 weeks 4 days ago
Main PID: 642 (code=exited, status=0/SUCCESS)
CPU: 427ms
If it says that it's not running but there's no error then run `sudo systemctl enable ethercat.service` and `sudo systemctl start ethercat.service`, then re-verify that permissions are right, above.
If there's an error, then it's *probably* something related to the module not being available. Try `lsmod | grep ^ec_`. It should list `ec_master` and one other `ec_` module, depending on your Ethernet driver in the EtherCAT config file. If they aren't there, then try `sudo modprobe ec_master` and report the error that you get.
Also, try running `sudo apt install -y linux-headers-$(uname -r)`; if your kernel was upgraded recently, then there's a decent chance that you're missing one of the components needed to recompile the EtherCAT module, and that will fix it until the next kernel upgrade.
Please Log in or Create an account to join the conversation.
18 May 2024 19:57 - 18 May 2024 20:41 #300933
by cekaa
Replied by cekaa on topic EtherCAT stopped working after Reboot
They went out. is this? Can I provide enough information? Again, the results are as follows: ethercat is not connecting. The file path in the installation file is not /dev/EtherCAT* files =sudo geany /etc/udev/rules.d/99-ethercat.rules[img]chrome-extension://bpggmmljdiliancllaapiggllnkbjocb/logo/48.png[/img]
Last edit: 18 May 2024 20:41 by cekaa.
Please Log in or Create an account to join the conversation.
18 May 2024 20:28 #300934
by cekaa
Replied by cekaa on topic EtherCAT stopped working after Reboot
Attachments:
Please Log in or Create an account to join the conversation.
20 May 2024 19:54 #301028
by cekaa
Replied by cekaa on topic EtherCAT stopped working after Reboot
Hello . I took your precious time, my English is also poor.
I bought a THİNKCENTRE M70 S PC and now my Ethernet connection does not drop.
But thanks to you, I realized that I still have problems.
I will have to install from source ethercet0 appears as device
I will continue my experiments today and tomorrow, follow me regarding the Pi 4.
Thank you very much, I have taken your valuable time. Attached are the printouts of the new PC M70s. I will open a new topic and let you know if there is a problem after a clean installation.
RESPECTS
I bought a THİNKCENTRE M70 S PC and now my Ethernet connection does not drop.
But thanks to you, I realized that I still have problems.
I will have to install from source ethercet0 appears as device
I will continue my experiments today and tomorrow, follow me regarding the Pi 4.
Thank you very much, I have taken your valuable time. Attached are the printouts of the new PC M70s. I will open a new topic and let you know if there is a problem after a clean installation.
RESPECTS
Please Log in or Create an account to join the conversation.
Time to create page: 0.728 seconds