I'm having issues reading properties from devices on a BACNET IP router. For this I'm using .net library https://github.com/ela-compil/BACnet
If I'm interacting with multiple devices, each with its own ip and id (no router configuration), communication works and I'm able to read properties. But once a device in router mode is implemented and all other devices communicate throu this main router, I'm no longer able to read properties.
Main Bacnet router IP 192.168.2.222
Device 1, Ip: 192.168.1.1, ID: 10
Device 2, Ip: 192.168.1.2, ID: 11
My software is on IP 192.168.2.220
To read properties I'm using:
var targetObjId = new BacnetObjectId(BacnetObjectTypes.OBJECT_DEVICE, (uint)10);
var targetBacnetAddress = new BacnetAddress(BacnetAddressTypes.IP, "192.168.1.1");
var rez = await Bacnet_client.ReadPropertyAsync(targetBacnetAddress, targetObjId, BacnetPropertyIds.PROP_OBJECT_LIST);
This returns: "Error from device: ERROR_CLASS_SERVICES - ERROR_CODE_SERVICE_REQUEST_DENIED". If no router is used on the network, this code works and produces results. So I must be doing something wrong, while addressing the bacnet device?
Using Yabe browser all this works. So device configuration is setup corretly. Actualy devices behind router are discovered when I register foregin device throu Functions / IP Services / Foreign Device Registration.