bnjmnp / pysoem

Cython wrapper for the Simple Open EtherCAT Master Library
MIT License
95 stars 36 forks source link

ConnectionError: could not open interface #106

Closed mpratikk closed 1 year ago

mpratikk commented 1 year ago

I have listed adapter from my PC using cmd ipconfig/all and copy the description of interface and put it in pysoem code for connection to EtherCAT network.

Even after trying out multiple combination I am getting same issue, Can anyone help me out how can I do this? I am having adapter: master.open('Intel(R) Ethernet Connection (14) I219-LM')

Please let me know If I am doing anything wrong.

bnjmnp commented 1 year ago

What operating system are you using? Try to run the examples/find_adapters.py. You will get a list of adapter IDs. Then just copy the ID of the desired adapter to the open() function.

mpratikk commented 1 year ago

I am using Windows 11, I have tested with findadapters.py and added the adapter as below Adapter 4 \Device\NPF{Adapter_ID} Intel(R) Ethernet Connection (14) I219-LM

Do we only need to use id as 'Adapter_Id' ?

bnjmnp commented 1 year ago

No, everything from the first backslash to the closing curly brace.

mpratikk commented 1 year ago

No, everything from the first backslash to the closing curly brace.

Thank You so much, It is working now

master.open(r'\Device\NPF_{Adapter_ID}')