使用工業Intel® Edge控制文件中 的步驟 配置 EtherCAT 設備後,無法查看設備資訊。
$ ethercat master
Failed to get master information: The ioctl of the device is inappropriate
該錯誤表示 /etc/sysconfig/ethercat 檔未正確配置。 使用以下命令查詢 網路設備並 指定 所需的配置變數。
$ sudo ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether a4:ae:12:77:85:b6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0x8e100000-8e17ffff
$ cat /sys/class/net/eno1/device/uevent
DRIVER=igb
PCI_CLASS=20000
PCI_ID=8086:1533
PCI_SUBSYS_ID=FFFF:0000
PCI_SLOT_NAME=0000:6d:00.0
MODALIAS=pci:v00008086d00001533sv0000FFFFsd00000000bc02sc00i00
使用上述命令的輸出, 編輯 /etc/sysconfig/ethercat 中的 MAC 位址、PCI_SLOT_NAME和驅動程式。
#/etc/sysconfig/ethercat MASTER0_DEVICE="a4:ae:12:77:85:b6" DEVICE_MODULES="igb" REBIND_NICS="0000:6d:00.0" #eno1