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

Cann't connect with network adapters ID #98

Open
SukritMachineTools opened this issue Feb 8, 2023 · 4 comments
Open

Cann't connect with network adapters ID #98

SukritMachineTools opened this issue Feb 8, 2023 · 4 comments

Comments

@SukritMachineTools
Copy link

SukritMachineTools commented Feb 8, 2023

`import pysoem

master = pysoem.Master()

master.open('Your network adapters ID')

if master.config_init() > 0:
for device in master.slaves:
print(f'Found Device {device.name}')
else:
print('no device found')

master.close()`

Shows error :
ConnectionError: could not open interface 00-E0-4C-16-C4-58

I had replaced network adapters ID with every mac address and ip address of my PC (in Raspberry Pi Os & Linuxcnc), but Things doesn't work.

Please guide me how to use this code in my application ??

@bnjmnp
Copy link
Owner

bnjmnp commented Feb 9, 2023

Hi. you could simply use the find_adapters.py script to print out all available IDs and then copy the right one into you code.

@SukritMachineTools
Copy link
Author

Your method works in Windows 10 but It doesn't work in Raspberry Pi Os and Linuxcnc os.

In that os, by find_adapters.py it show eth0 as adapter name but when i put it in place of Your network adapters ID. It doesn't work .

there it shows error:
ConnectError : could not open interface eth0 .

@bnjmnp
Copy link
Owner

bnjmnp commented Feb 10, 2023

It is not nice but did you try running you Python code with administrator privileges? Could be that it will work then. SOEM uses lower level OS drivers and Linux limits the access to this stuff.

@SukritMachineTools
Copy link
Author

SukritMachineTools commented Feb 11, 2023

Yes I have given excitable privileges to Python code. It can execute python files and PymodbusTcp modules easily. But It show error when use pysoem master.open('eth0').

there it shows error:
ConnectError : could not open interface eth0 .

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