Overview
There are some frequently asked questions about RS-485 configuration using Suprema G-SDK.
Here is a guide for RS-485 configuration with Suprema G-SDK Demo code.
Three different RS-485 modes are supported as below.
- Default: Factory default status for a device configuration.
- Master: Devices can search and add slave devices through RS-485
- Slave: Devices can be searched and added to a “Master” device through RS-485
The Slave device is not making a device match. It is just sending the credential input to a Master device, receiving the result, and showing it from the indicator or LCD display.
1. Devices Used and Preparations
- Programming Language: Python example code.
(PYTHON_CLIENT_SDK_VX.X.X._XXXXXXXX -> example -> rs485)
- Device: FaceStation F2, BioEntry P2
- Register users required for authentication.
** In this test, a Mifare CSN card was used.
2. How to configure RS-485 Master / Slave device using device SDK
Please refer to the attached file for the added source code to review the Master/Slave connection process.
1. Settings are required for the Master device.
1-1. Configure the device mode to be used as a Master.
Set the mode for the master device. You can find which values to set in the document below:
(https://supremainc.github.io/g-sdk/api/rs485/#setconfig)
2. Get and Set the Slave device.
First, connect to the master device. Search and add the slave device.
Search Device: https://supremainc.github.io/g-sdk/api/rs485/#searchdevice
Set Device: https://supremainc.github.io/g-sdk/api/rs485/#setdevice
When connecting a Slave device, you need to set enable to True for the connection to proceed. The connected status is automatically updated by the device once it is successfully connected. https://supremainc.github.io/g-sdk/api/rs485/#slave-devices
You only have to register slaves once. However, since this information is not stored in the device gateway, you have to use Connect.SetSlaveDevice or ConnectMaster.SetSlaveDevice when the device gateway is reconnected.
3. After completing the configuration, test the Master / Slave device.
Test using the credentials of the user on the Master device. The Slave device is just sending the credential input to a Master device. You can check authentication results by using a real-time monitoring log. (Log)
++ The attached file contains source code for connecting a Master device with a Slave device and modifying the authentication mode of the Slave device.