This is an old revision of the document!


SSL API

As API that configures the SSL communication, there are communication interfaces include LAN, USB, and RS485. To get real-time device connectivity and search results, please register the callback function via the BS2_SetDeviceEventListener function.

   * BS2_SearchDevices: Search for devices in subnet.    * BS2_SearchDevicesEx: Search for devices in a specific IP address band.    * BS2_GetDevices: Gets the managed device information.    * BS2_ConnectDevice: Connects the device using the device identifier.    * BS2_ConnectDeviceViaIP: Connect devices using IP address and Port.    * BS2_DisconnectDevice: Disconnects from the device.    * BS2_SetKeepAliveTimeout: Sets the keep-alive timeout.    * BS2_SetNotificationListener: Sets the Notification listener.    * BS2_SetServerPort: Set the Server Port.

typedef void (*GetRootCaFilePath)(uint32_t deviceId);
typedef const char* (*GetServerCaFilePath)(BS2_DEVICE_ID deviceId);
typedef const char* (*GetServerPrivateKeyFilePath)(uint32_t deviceId);
typedef const char* (*GetPassword)(uint32_t deviceId);
typedef const char* (*OnErrorOccured)(BS2_DEVICE_ID deviceId, int errCode);

1. GetRootCaFilePath
Callback function that is called when to retrieve the root CA file directory.

2. GetServerCaFilePath
Callback function that is called when to retrieve the server CA file directory.

3. GetServerPrivateKeyFilePath
Callback function that is called when to retrieve the server private key file directory.

4. GetPassword
Callback function that is called when to retrieve the password.

5. OnErrorOccured
Callback function that is called when an error has occurred.