Set Debug Mode¶
⚠️ Note: This document describes how to use the SDK's API to operate scanning devices and provides sample code in C language. Please note that the API is synchronous and may block the main thread during use.
1. Set Debug Mode¶
Set the debug mode for the scanning device. Usage is as follows:
int result = inateck_scanner_ble_set_debug(debug_mode);
Input parameter:
debug_mode
is the debug mode,1
to enable,0
to disable.
The return result is result
. If it is 0
, the call is successful; if it is 1
, the call fails.
2. Current SDK Version¶
Get the current SDK version. Usage is as follows:
const char* version = inateck_scanner_ble_sdk_version();
The return result is a string in the format like "2.0.3".
3. Sample Code¶
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include "inateck_scanner_ble.h"
int main() {
// Set Debug Mode
int result = inateck_scanner_ble_set_debug(1);
if (result == 0) {
printf("Set Debug Mode successfully\n");
} else {
printf("Failed to set Debug Mode\n");
}
// Get Current SDK Version
const char* version = inateck_scanner_ble_sdk_version();
printf("Current SDK Version: %s\n", version);
return 0;
}