Features
The SDK supports the following features:
- Automatically detect and pair with devices via Bluetooth;
- Set Bluetooth name;
- Set Beeper volume: silent, low, medium, high;
- Set vibration: off, weak, strong
- Control the illuminative light: Light up when scanning; Stay on/off.
- Control the navigation light: Light up when scanning; Stay on/off.
- The navigation light flashing: Stay on/off
- Barcode setting;One-click enable or disable all barcodes,Restore defaults with one click;
- Read battery level;
- Read firmware version;
- Read/clear the buffer quantity;
- Restore the factory setting;
- Return the barcode scanned;
API
The SDK provides the following APIs:
scan()
connect(...)
disconnect(...)
get_basic_properties(...)
get_properties_info_by_key(...)
edit_properties_info_by_key(...)
get_all_barcode_properties(...)
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
device_id
- The unique identifier of the deviceapp_id
/developer_id
/app_key
- The Developer registration information(Currently, the developer information being empty is also able to connect and verify successfully)callback
- Callback method, event_type: 1 for scanned barcode, 2 for device disconnection, and 3 for electricity monitoring.
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
device_id
- The unique identifier of the device
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
device_id
- The unique identifier of the deviceproperty_key
- The propertyKey parameter is' battery 'or' firmware_version'
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
device_id
- The unique identifier of the deviceproperty_key
- View PropertyKeyList for the propertyKey parameter
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
device_id
- The unique identifier of the deviceproperty_key
- View PropertyKeyList for the propertyKey parameterdata
- The data parameter is the value of the propertyKey
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
device_id
- The unique identifier of the device
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":""}
device_id
- The unique identifier of the devicestatus
- The status of the device.0:success;1:fail;2:not connecteddata
- The data returned by the device
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" |