-
Notifications
You must be signed in to change notification settings - Fork 7
Error Messages
王大脸 edited this page May 17, 2024
·
93 revisions
NOTE: For Connect and Pair APIs, avoid calling a new API before the previous API call has finished, otherwise the router will respond with a “chip is busy” error.
For HTTP 500 error, the following are the common error codes:
Message | Description |
---|---|
parameter invalid |
Reason: a) chipId invalid b) MAC address format is invalid c) length of the data to be read or written is invalid, such as reaching length limitation or in odd-length. d) length of key for pair-input is invalid. for example, expect 0/1 for confirmation, but input is 6 digits. Checks: a) chipId can only be 0, 1 or all for firmware version >=2.1.1 b) MAC address format includes :, for example CC:1B:E0:E0:01:02 c) For advertising data, data is Hex String in write handle request, and the length should be even. d) passkey length in pair-input could be the followings, 1--confirm,6--passkey input,32--legacy oob. It should be consistence with pair return value. |
device not found |
Reason: Device is not connected with gateway when a GATT (read/write) request is sent, or getting RSSI for BLE Connection. Checks: a) The device is already connected and no disconnect events (timeout or device disconnect) is recevied in connection state SSE. b) Try to reconnect the device in case of receiving this error. |
memory alloc error |
When the Bluetooth chip does not have enough memory to complete the operation it will return this error. |
operation timeout |
Each operation has a time-out value, especially those timeconsuming operations, such as connection. When connecting to a device that does not exist, the operation will timeout after the 20s. |
chip is not ready |
This error will be reported when sending commands to the chip fails. |
chip is busy |
Reason: a) Multiple connection requests are received by gateway. Multiple connection requests cannot be handled simultaneously by one BLE chip of the gateway. b) pair request can trigger connecting action automatically if the device is not connected. In this case, multiple pair requests can not be handled simultaneously. Checks: a) User needs to handle requests in serial, which is to wait for the response and then invoke the next connection request. Refer to sample code for details: /~https://github.com/CassiaNetworks/CassiaSDKGuide/blob/master/node_examples/connectDevices.js b) If gateway(X2000/X1000/E1000) has two chips, two chips can handle connection requests from two devices in parallel. c) use batch API to handle concurrent connection requests. Refer to sample code for details: /~https://github.com/CassiaNetworks/CassiaSDKGuide/blob/master/node_examples/acBatchMultipleByTimer.js |
incorrect mode |
Reason: a) When gateway is set to 'Pure Scan Mode', connection request to gateway will return this error. b) When gateway receives connection or pair request, the same device is in the middle of connecting or disconnecting. Checks: a) The scan mode in BLE paramaters of gateway settings is not pure scan. b) Connection request for the same device is not sent in parallel. |
operation not supported |
Reserved for future use. |
need pair operation |
Some devices require an operation for pairing after a successful connection. If a GATT function call happens prior to the pairing, the system will return this error. From v2.0.3 “Need pair operation” will be placed the following 3 error code, "ATT insufficient Authentication", "ATT insufficient Authorization", "ATT insufficient Encryption", Depending on response message from device side, router will reply one of the above error. |
pair in process |
Reason: Pair request is processing. Need additional pair input to complete pair operation. Checks: provide pair input such as passkey according previous pair return value (such as Passkey Input Expected, Passkey Display Expected, Numeric Comparison Expected, LE Legacy Pairing OOB Expected) |
connect failed |
Reason: gateway return this error immediately after connection established, due to switching to data channel failure. Checks: a) reconnect device. b) specify retry parameter 'fail_retry_times=3' in connection API to reduce this error. |
ATT insufficient Authentication |
The attribute requires authentication before it can be read or written |
ATT insufficient Authorization |
The attribute requires authorization before it can be read or written |
ATT insufficient Encryption |
The Encryption Key Size used for encrypting this link is insufficient |
no resources |
Reason: a) Concurrent connection numbers reaches to gateway limitation. b) Gateway does not have enough buffer resource. Checks: a) Concurrent connection numbers. b) Too many concurrent API requests, reduce the concurrent requests. |
Service Not Found |
Couldn't find a Characteristic inside a Service. |
type not supported |
When Bypass scan was set up, the protocol type you specified is not supported by this firmware. |
please set bypass params first |
Bypass mode is enabled, but no bypass parameters have been set. |
failure |
An error for all other failures not specified yet. |
device can not scan |
Reason: Gateway is not able to scan the advertising packet from the device. Checks: a) Device MAC address and type (public/random) could be wrong, the default type value is public. b) The default timeout value of connection API is 5000 (ms). Increase the timeout value according to device's advertising interval. It is recommeded to set to 10000 ms for 1 second adv interval, set to 20000 ms for longer adv interval. |
host disconnect |
manually disconnect device, will report in connection-state SSE reason field |
authenticate miss key |
crypt data failed using and existing key, will report in connection-state SSE reason field |
Copyright © 2021 Cassia Networks, Inc.
RESTful API
-
Traffic Related API
- Scan Bluetooth Devices
- Filter Scanned Data based on Device MAC, RSSI, Name, and UUID
- Enhanced Scan Filter (v2.0 and above)
- Connect/Disconnect to a Target Device
- Batch Connect to a Target Device (v2.0 and above)
- Discover GATT Services and Characteristics
- Read/Write the Value of a Specific Characteristic
- Send Advertise Data
- Get Device Connection Status
- Receive Notification and Indication
- Get RSSI for BLE Connection (v2.0 and above)
-
Secure Pairing API
-
Router Auto-Selection API