Set HID Output Mode


⚠️ Note: This document describes how to use the SDK's API to operate the scanning device and provides sample code in C language. Please note that the API is a synchronous operation and may block the main thread when used.

⚠️ Note: Before using the API, you need to connect the device first. For detailed steps, please refer to Connect Device.

1. Set HID Output Mode

Set the output mode of the barcode in HID mode. Usage is as follows:

const char* result = inateck_scanner_ble_set_hid_output(device_id, output_type);

The return result is in JSON format. If the call is successful, result will return:

{
    "status": 0,
    "error": "",
}

If the call fails, result will return:

{
    "status": 1,
    "error": "error message",
}

Input parameters:

2. Simulate HID Output

Use software to simulate HID output. Usage is as follows:

const char* result = inateck_scanner_ble_send_hid_text(text);

Input parameters: