BAC0 icon indicating copy to clipboard operation
BAC0 copied to clipboard

IP Address provided (xxx.xxx.xxx.xxx) invalid

Open Ferkelcode opened this issue 1 year ago • 0 comments

Hello,

I tried bacnet = BAC0.connect(ip='xxx.xxx.xxx.xxx')

but it shows: BAC0.core.io.IOExceptions.InitializationError: IP Address provided (xxx.xxx.xxx.xxx) invalid. Check if another software is using port 47808 on this network interface. If so, you can define multiple IP per interface. Or specify another IP using BAC0.lite(ip='IP/mask')

Do you know what could be the reason?

I got 2 IP addresses (xxx.xxx.xxx.x47 and xxx.xxx.xxx.x48), I only know that one of them is correct for the device. But I tried both of them with bacnet = BAC0.connect(ip='xxx.xxx.xxx.xxx').

For xxx.xxx.xxx.x47, it shows: 2022-10-09 13:41:24,798 - INFO | Starting BAC0 version 21.12.03 (Complete) 2022-10-09 13:41:24,798 - INFO | Use BAC0.log_level to adjust verbosity of the app. 2022-10-09 13:41:24,798 - INFO | Ex. BAC0.log_level('silence') or BAC0.log_level('error') 2022-10-09 13:41:24,798 - INFO | Starting TaskManager 2022-10-09 13:41:24,813 - INFO | Using ip : xxx.xxx.xxx.39 Traceback (most recent call last): File "C:\Users\mmg-yho\PycharmProjects\bac0_test\main.py", line 8, in bacnet = BAC0.connect(ip='xxx.xxx.xxx.x47') File "C:\ProgramData\Anaconda3\lib\site-packages\BAC0\scripts\Complete.py", line 170, in init Lite.init( File "C:\ProgramData\Anaconda3\lib\site-packages\BAC0\scripts\Lite.py", line 152, in init Base.init( File "C:\ProgramData\Anaconda3\lib\site-packages\BAC0\scripts\Base.py", line 143, in init raise InitializationError( BAC0.core.io.IOExceptions.InitializationError: IP Address provided (xxx.xxx.xxx.39) invalid. Check if another software is using port 47808 on this network interface. If so, you can define multiple IP per interface. Or specify another IP using BAC0.lite(ip='IP/mask')

Process finished with exit code 1

For xxx.xxx.xxx.x48, it shows:

Traceback (most recent call last): File "C:\Users\mmg-yho\PycharmProjects\bac0_test\main.py", line 8, in bacnet = BAC0.connect(ip='xxx.xxx.xxx.x48') File "C:\ProgramData\Anaconda3\lib\site-packages\BAC0\scripts\Complete.py", line 170, in init Lite.init( File "C:\ProgramData\Anaconda3\lib\site-packages\BAC0\scripts\Lite.py", line 150, in init ip_addr = Address("{}/{}:{}".format(ip, mask, port)) File "C:\ProgramData\Anaconda3\lib\site-packages\bacpypes\pdu.py", line 71, in init self.decode_address(args[0]) File "C:\ProgramData\Anaconda3\lib\site-packages\bacpypes\pdu.py", line 190, in decode_address addrstr = socket.inet_aton(local_ip_addr) OSError: illegal IP address string passed to inet_aton 2022-10-09 13:43:20,391 - INFO | Starting BAC0 version 21.12.03 (Complete) 2022-10-09 13:43:20,391 - INFO | Use BAC0.log_level to adjust verbosity of the app. 2022-10-09 13:43:20,391 - INFO | Ex. BAC0.log_level('silence') or BAC0.log_level('error') 2022-10-09 13:43:20,391 - INFO | Starting TaskManager

Process finished with exit code 1

Can I say that xxx.xxx.xxx.x47 is the correct IP for the device, but there is another software using port 47808, so I cannot connect? And why the IP changed from xxx.xxx.xxx.x47 to xxx.xxx.xxx.39?

Thank you very much.

Ferkelcode avatar Oct 08 '22 17:10 Ferkelcode