You will notice that using the functions of BS_AddAccessGroupEx and BS_AddTimeScheduleEx with RS-485 connection will fail most times.
This is because the data sent through the connection is too large to be sent within the default timeout.
You can configure the default timeout as follows:
BS_SetDefaultTimeout( int handle, int timeout )
There is no GetDefaultTimeout function.
Increase the timeout as required to make the transfer succeed.
The timeout will have to be set on each handle before running your functions.
The data is transferred to the slave through the master. Hence the handle is the connection with the master.
Hence before using AddAccessGroupEx you have to set the device id and default timeout.
If the Master Device ID was 100 and slave Device ID was 200,
Configuring the master:
BS_SetDeviceID(handle, 100, deviceType);
Configuring the slave:
BS_SetDeviceID(handle, 200, deviceType);