bacpypes icon indicating copy to clipboard operation
bacpypes copied to clipboard

Cant get parameter right from ini file

Open sansal54 opened this issue 4 years ago • 3 comments

I try to use misty wrapper library to communicate with mstp network. When I define configurtion file as below :

[BACpypes]
objectName: BACClient
; MSTP Local address
address: 25
; The serial port device
interface: /dev/ttySC0
; other mstp config parameters max_masters, baudrate, maxinfo
max_masters: 127
baudrate: 76800
maxinfo: 1
objectIdentifier: 599
maxApduLengthAccepted: 1024
segmentationSupported: segmentedBoth
vendorIdentifier: 15
foreignPort: 0
foreignBBMD: 128.253.109.254
foreignTTL: 30

I get such error :

Initialized the socket
mac_address = 25 
max master = 127
baud rate = 76800 
max info frames = 1 
/: Is a directory
RS485: Initializing /

My RS485 port is ok. I checked it with other devices and communication protocols. I tried the find the problem in bacpypes.local.device - LocalDeviceObject but there was no succeed.

    # make a device object
    mstp_args = {
        '_address': int(args.ini.address),
        '_interface':str(args.ini.interface),
        '_max_masters': int(args.ini.max_masters),
        '_baudrate': int(args.ini.baudrate),
        '_maxinfo': int(args.ini.maxinfo),
    }

    this_device = LocalDeviceObject(ini=args.ini, **mstp_args)

So I need a help here. Why I get "/: Is a directory" while it should try to connect to "/dev/ttySC0"? It sortof sees only "/" part.

sansal54 avatar Nov 23 '20 09:11 sansal54

I'm working my way through this, but this is new territory, and the /: Is a directory isn't coming from BACpypes. Inside the MSTPDirector it is looking for an _mstp_dir attribute of the device object, but I don't understand how that is related to the _interface attribute. If you can build the library and provide the -DDEBUG option it should turn on lots of debugging output from the MSTP agent (in mstp_agent.c).

Please open a new issue with misty and reference this issue, I would like to see how it gets resolved.

JoelBender avatar Nov 24 '20 03:11 JoelBender

Any update on this?

WeiTangLau avatar Nov 02 '21 10:11 WeiTangLau

You need to open a new issue with misty if you haven't yet.

JoelBender avatar Nov 03 '21 01:11 JoelBender