Started
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide provides clear and concise steps to seamlessly integrate and fully utilize our hardware SDK.
The web terminal can communicate with hardware only after a hardware bridge is installed.
You can use a USB connection to the device for debugging APIs.
Select the appropriate version of the SDK for your platform. .
Download and install the latest version of the SDK for timely technical support.
After the hardware is successfully connected:
Configure the necessary global events (Events).
Handle events, for example:
FIRMWARE_EVENT
is pushed when there is a firmware update.
Entering the hardware unlock PIN code in the software is implemented through the corresponding EVENT
.
Requests requiring hardware confirmation will also inform the client through EVENT
, like opening or closing confirmation windows.
By default, the device's PIN code input is handled by the software. if you need the hardware to handle related EVENTs, additional steps are required.
Before using the API, ensure:
The response type is Promise
.
A successful method returns the Success
type; a failure returns the Unsuccessful
type.
Use response.success
to determine if the method executed successfully.
Thus, the normal process for adding a new device is:
In the returned results, there will be information such as connectId
, deviceType
, and name
that you need to save. For USB devices, there will also be a DeviceId
.
Later, for other business operations, you only need to call the relevant APIs and pass in the ConnectId and DeviceId.
To ensure that you can fully understand and correctly handle these events, we recommend that you thoroughly refer to our .
You understand the API call instructions and common parameters. See .
Invoke the API, including the common parameters ().
Select the appropriate API based on the hardware firmware version. See .
In case of failure, check the error information in payload
and the error code in response.payload.code
. For a list of error codes, see .
First, you need to understand and be clear about ConnectId and DeviceId, as almost every method in subsequent business will require them. Therefore, you need to call the method to save the relevant information.
Use to find nearby devices.
If it is a Bluetooth device, you will need to additionally use the to obtain DeviceId
relevant information and persistently save it.