Features

The SDK supports the following features:

API

The SDK provides the following APIs:


scan()

Description

Search Inateck scanner via bluetooth

Response

Return to the list of bluetooth devices, including the device name, device id, and product name

Response : [{"device_id":"**","name":"Test-scanner","product":"ST-73"}]


connect(...)

Description

Connect devices through unique identifiers.To connect to the computer, you need to switch the scanner to GATT mode or the computer Bluetooth first matches the scanner and then connects through the code.

Parameters

connect(device_id: *const c_char,app_id: *const c_char,developer_id: *const c_char,app_key: *const c_char,callback: Option) -> *const c_char

Response

If the connection is successful, the cached barcode count and battery information will be returned.
Response :{"device_id":"**","status":"0","data":"{\"battery\":\"82\",\"cache\":\"10\"}"}


disconnect(...)

Description

Disconnect from a scanner.

Parameters

disconnect(device_id: *const c_char) -> *const c_char

Response

See CommonResponse


get_basic_properties(...)

Description

Read the current battery level or firmware version of the specified scanner

Parameters

get_basic_properties(device_id: *const c_char,property_key: *const c_char) -> *const c_char

Response

The data is the current property_key value of the scanner. Response :{"device_id":"**","status":"0","data":"BCST-73 V2.1.3"}


get_properties_info_by_key(...)

Description

Read the current settings of the specified scanner

Parameters

get_properties_info_by_key(device_id: *const c_char,property_key: *const c_char) -> *const c_char

Response

The data is the current property_key setting of the scanner. Response :{"device_id":"**","status":"0","data":"0"}


edit_properties_info_by_key(...)

Description

Modify the current settings of the specified scanner

Parameters

edit_properties_info_by_key(device_id: *const c_char,property_key: *const c_char,data:*const c_char) -> *const c_char

Response

See CommonResponse


get_all_barcode_properties(...)

Description

Get all barcodes settings of the specified scanner

Parameters

get_all_barcode_properties(device_id: *const c_char) -> *const c_char

Response

The data is the all barcodes setting of the scanner.0:disable;1:enable

Response :{"device_id":"**","status":"0","data":"{\"Aztec\":\"0\",\"Chinese Post\":\"0\",\"Codabar\":\"1\",\"Code 11\":\"0\",\"Code 128\":\"1\",\"Code 39\":\"1\",\"Code 93\":\"1\",\"Data Matrix\":\"1\",\"EAN-13\":\"0\",\"EAN-8\":\"1\",\"GS1-128\":\"1\",\"Han Xin\":\"0\",\"IATA 25\":\"0\",\"Interleaved 25\":\"1\",\"MSI\":\"0\",\"Matrix 25\":\"0\",\"Maxi\":\"0\",\"PDF 417\":\"1\",\"QR Code\":\"0\",\"Standard 25\":\"0\",\"UPC-A\":\"1\",\"UPC-E0\":\"1\",\"UPC-E1\":\"0\",\"USPS/FedEx\":\"1\"}"}


CommonResponse

Response : {"device_id":"**","status":"0","data":""}

Enums

PropertyKeyList

Members Description
"cache" read barcode cache quantity or clean barcode cache value is 0
"restore_factory" Restore factory settings value is 1
"enable_or_disable_all_barcodes" enable or disable all barcodes 1 is enable 0 is disable
"restore_default_barcode" restore default barcode type value is 1
"bluetooth_name" read/update bluetooth name key
"volume" read/update volume value 0 is mute, 2 is low, 4 is middle, 8 is loud
"lighting_lamp_control" Illumination key value 00 is scanning, 01 is Stay on,10 is Stay off
"positioning_lamp_control" Navigation Light key value 00 is scanning, 01 is Stay on,10 is Stay off
"shake_reminder" Vibration reminder 0 is close,1 is open
"shake_intensity" Vibration strength 0 is mute,1 is loud
"position_light_twinkle" Navigation Light flashing 0 is close,1 is opens
"start_up_clean_cache" This key Clear data from buffer at start-up 1 is enable 0 is disable
"auto_upload_cache" This key Auto uploading barcode cache 1 is enable 0 is disable
"motor_swing_grade" Motor PWM vibration intensity level 1-8 value 0000,0001,0010, 0011,。。。。1000 is loud
"Codabar" barcode type key value 1 is enable 0 is disable
"Code 11"
"Code 128"
"Code 39"
"Code 93"
"GS1-128"
"USPS/FedEx"
"EAN-8"
"EAN-13"
"MSI"
"UPC-A"
"UPC-E0"
"UPC-E1"
"Chinese Post"
"IATA 25"
"Interleaved 25"
"Matrix 25"
"Standard 25"
"QR Code"
"Data Matrix"
"PDF 417"
"Aztec"
"Maxi"
"Han Xin"