LTE Beacon: Micro-app error reference
Error handling in micro-apps can be performed with standard JavaScript try ... catch
, for example:
var RECORD_ID_MY_DATA = 0;
var myData = {foo: 'bar'};
try {
storage.save(RECORD_ID_MY_DATA, myData);
} catch (error) {
if (error.code === 'ESR0202') { // ESR0202 = No storage space
print('out of space');
// free up some space, then retry storage.save
} else {
cloud.enqueue('storage-save-error', {code: error.code});
}
}
Here we try to save some data to beacon’s persistent memory. In the event of an error, we check the error code to determine if it’s an “out of space” error, or something else. Based on the outcome, our app can take an appropriate action: for example, maybe it can remove some unused or less important data. Or, if this is not an “out of space”, report the error to the cloud.
All errors are objects which look somewhat like this:
{code: 'ESR0202',
message: 'ESR0202 No storage space'}
You can also register a “global” error handler, to have any uncaught errors delivered to it:
app.setErrorHandler((type, error) => {
print('uncaught error: ' + error.message);
cloud.enqueue('uncaught-error', {code: error.code});
});
Below is a list of all documented errors.
- System errors
- VM errors
- Storage errors
- Modem errors
- Function call errors
- Cloud synchronization errors
- Type conversion errors
- NFC errors
- GNSS errors
- BLE errors
- UWB errors
- Sensors errors
- Crypto errors
- Firmware update errors
Error codes list
System errors
ESR0001 Unknown error
Type: application
Detailed description:
Source of error cannot be determined
ESR0002 Reboot loop detected.
Type: application
Detailed description:
Device started rebooting itself in a loop. To prevent this app was stopped. Now you can connect to device using WebIDE and upload new micro-app.
ESR0003 Unsupported feature.
Type: application
Detailed description:
Feature is unsupported on this hardware version.
Reported by:
sensors.imu.onMotion(eventType, callback, options)
ESR0004 Not enough resources
Type: application
Detailed description:
There are not enough resources (like timers or advertisers) to perform operation. Make sure you released all resource handles (eg. setting them to null) and stopped advertisers.
Reported by:
ble.advertise(data)
crypto.hash(hashType, key)
timers.at(timestamp, callback)
timers.count(interval, count, callback)
timers.repeat(interval, callback)
timers.single(interval, callback)
ESR0005 Time is not valid
Type: warning
Detailed description:
Current system time is not synchronised yet and its value is incorrect. It will be synchronised during next Cloud sync via LTE or when using GNSS.
ESR0006 Deprecated function {name} at line {line}
Type: warning
Detailed description:
This function is deprecated. Use other function instead because it may be removed in future releases.
Variables:
name - string - Function name
line - integer - Line in which this function was invoked
ESR0007 Scheduler error
Type: internal
Detailed description:
Scheduler is probably full and cannot accept more tasks into its queue. Try to execute some of your tasks one after another instead of running them at once.
VM errors
ESR0101 Internal VM error
Type: internal
Detailed description:
Internal assertion caused JS VM to throw a fatal error. VM and app will be restarted.
ESR0102 Out of VM memory
Type: application
Detailed description:
Out of virtual machine heap memory, VM and app will be restarted. Try to reduce size of objects. Make sure you have no soft memory leaks.
ESR0103 VM executed too long
Type: application
Detailed description:
User code executed for longer than few seconds (depending on firmware release) and was interrupted. Probably caused by infinite loop or too many nested loops.
ESR0104 Execution interrupted
Type: application
Detailed description:
Execution was interrupted by another app being uploaded and installed. No action is required.
Reported by:
cloud.enqueue(type, message, options)
ESR0105 Out of slot execution
Type: internal
Detailed description:
VM code was executed as it was running as native. This is an internal error and should not happen in normal use.
ESR0106 App install error {error_code}
Type: internal
Detailed description:
VM was unable to install application. There might be not enough storage space left.
Variables:
error_code - integer - Internal error code
ESR0107 Forbidden
Type: application
Detailed description:
Execution of this method is forbidden in current conectext with current execution privilidges.
Storage errors
ESR0201 Storage error
Type: application
Detailed description:
Storage system is not able to persistently save data. Probably it is overloaded with requests.
Reported by:
cloud.enqueue(type, message, options)
storage.add(key, data)
storage.readAll(id, handle)
storage.save(key, data)
ESR0202 No storage space
Type: application
Detailed description:
Storage system is full. You need remove user data and/or synchronize device with Cloud.
Reported by:
cloud.enqueue(type, message, options)
storage.add(key, data)
storage.save(key, data)
ESR0203 Not serializable
Type: application
Detailed description:
Provided object cannot be converted to stream of bytes because it contains not serializable elements like handles or functions. Construct a new object that does not have such fields and try to serialize it.
Reported by:
cloud.enqueue(type, message, options)
cloud.setVar(name, message)
preview(data)
storage.add(key, data)
storage.save(key, data)
ESR0204 Message too big (max {max_size}b).
Type: application
Detailed description:
Message is too big to be stored persitently (does not fit into internal buffers). Reduce message size by removing unnecessary elements and using more compact data structures (like ArrayBuffer instead of hexadecimal String).
You may also consider splitting one big message into several smaller.
Variables:
max_size - integer - Maximum message size in bytes
Reported by:
cloud.enqueue(type, message, options)
cloud.setVar(name, message)
preview(data)
storage.add(key, data)
storage.save(key, data)
ESR0205 Data store timeout
Type: application
Detailed description:
Waiting for previous message to be stored has timed out. Consider less frequent storage write operations.
Reported by:
storage.add(key, data)
storage.readAll(id, handle)
storage.save(key, data)
ESR0206 No more variables
Type: application
Detailed description:
There are no more slots for new Cloud variables. Consider joining variables in objects under same name.
Reported by:
cloud.setVar(name, message)
ESR0207 Data store internal error {error_code}
Type: internal
Detailed description:
Low level internal error prevented function from completing. Report error code to technical support.
Variables:
error_code - integer - Internal error code
Modem errors
ESR0401 Modem unknown error
Type: internal
Detailed description:
Not able to pin point source of an modem error
ESR0402 Modem timeout
Type: internal
Detailed description:
Modem was processing command for more than maximum expected time.
ESR0403 Modem command error
Type: internal
Detailed description:
Modem responded with an error, but was not kind enough to provide an error code.
ESR0404 Modem init error
Type: internal
Detailed description:
Modem initialization procedure have failed. Usually trying again helps. If not you may try to reboot or power cycle device.
ESR0405 SIM card error/missing
Type: application
Detailed description:
SIM card is missing or is damaged. Check if it sits properly in the slot.
ESR0406 Modem too low voltage
Type: application
Detailed description:
Battery voltage is too low to allow the modem to work properly. Please charge the device.
ESR0407 Modem forced stop
Type: application
Detailed description:
Modem was forced to stop currently processed command by hardware reboot.
ESR0410 Airplane mode is on
Type: application
Detailed description:
Airplane mode is on and all radio operations are forbidden.
ESR0411 Invalid tech: {value}
Type: application
Detailed description:
Invalid radio access technology value.
Variables:
value - integer - Invalid RAT value
ESR0412 Invalid bandplan
Type: application
Detailed description:
Invalid bandplan enum or wrongly constructed bands object.
ESR0415 Not registrered
Type: internal
Detailed description:
Modem was unable to register with cellular network within reasonable time. Signal strength and quality might be low so the best strategy is to try again some time later.
ESR0416 Initial config failed
Type: internal
Detailed description:
Modem initial config failed. Try again.
ESR0413 Modem unlisted error: {error_code}
Type: internal
Detailed description:
Not able to find a error text for that internal code.
Variables:
error_code - integer - Internal error code
Function call errors
ESR0601 Bad args
Type: application
Detailed description:
Number, type or length of arguments does not match function signature and contract.
ESR0602 New operation
Type: application
Detailed description:
Previous async operation is still pending and there can be only one operation in progress. Previous promise has been rejected.
ESR0603 JS error:
Type: application
Detailed description:
JavaScript generic error (usually using unknown function or variable). Please refer to ECMA Script documentation.
Cloud synchronization errors
ESR0701 Registration timeout
Type: application
Detailed description:
Modem was unable to register in cellular network. Radio signal might be too weak.
ESR0702 Firmware check failed
Type: internal
Detailed description:
Device was unable to check for firmware update.
ESR0703 Modem fatal error
Type: internal
Detailed description:
Modem stopped to respond to commands and timed out.
ESR0704 Request failed: {error_code}
Type: internal
Detailed description:
Synchronization request to the server failed. There might be some problems with infrastructure or Cloud.
Returned code is a HTTP response code. Special codes:
- 702 - HTTP timeout
*709- network deactivated
*714 - DNS error
*719 - socket closed
Variables:
error_code - integer - Internal error code
ESR0705 Sync timeout
Type: internal
Detailed description:
Synchronization takes too much time and will be forcefully stopped. It is probably some internal error.
ESR0706 Handler timeout
Type: application
Detailed description:
Sync handler returned a promise that took to long to resolve/reject and synchronization needed to continue.
Type conversion errors
ESR0502 Value out of range: {value}
Type: application
Detailed description:
Provided value is out of range of supported values.
Variables:
value - float - Value that is out of range
ESR0503 Value out of enum range: {value}
Type: application
Detailed description:
Provided value is out of supported values defined by enum object. Try to use enum object instead of raw values.
Variables:
value - integer - Value that is out of range
ESR0504 Invalid interval: {value}
Type: application
Detailed description:
Provided interval string is invalid and does not conform to expected format.
Variables:
value - string - Invalid interval value
ESR0510 Odd char number
Type: application
Detailed description:
Trying to convert hex-encoded string, but it has odd number of characters.
ESR0511 Not hex number: {char} at {position}
Type: application
Detailed description:
Trying to convert hex-encoded string, but one of the characters is not hex: 0-9 A-F.
Variables:
char - hex_char - Invalid non-hex character
position - integer - Position in string
NFC errors
ESR1103 Message too big. Max {max_size}b
Type: application
Detailed description:
NDEF message is too big to fit into internal buffer.
Variables:
max_size - integer - Maxium size of NDEF message in bytes
Reported by:
nfc.setMsg(null)
ESR1104 Invalid format
Type: application
Detailed description:
Invalid NDEF record format. It should be an array with object describing each NDEF record or an ArrayBuffer
with its raw content.
Reported by:
nfc.setMsg(null)
ESR1105 Invalid record type: {type}
Type: application
Detailed description:
Bad NFC NDEF record type. Please check available options in NFC documentation.
Variables:
type - integer - Value of invalid record type
Reported by:
nfc.setMsg(null)
ESR1106 Missing field: {field_name}
Type: application
Detailed description:
Missing required field to compose NDEF record
Variables:
field_name - string - Missing a field that is required to compose NDEF record. Check NFC documentation.
Reported by:
nfc.setMsg(null)
ESR1107 Bad ID
Type: application
Detailed description:
Device NFC identifier can only be 4, 7 or 10 bytes length. Any onther size is invalid
Reported by:
nfc.config(config)
GNSS errors
ESR1202 minInterval longer than timeout: {timeout} > {min_interval}
Type: application
Detailed description:
Minimal reporting interval is smaller than location process timeout value. It means it was set to finish before it even began.
Variables:
min_interval - integer - Minimum reporting interval in s
timeout - integer - Timeout value in s
ESR1203 Position not found
Type: application
Detailed description:
GNSS subsystem was not able to obtain geographical position with provided options
BLE errors
ESR1501 Scan start error: {error_code}
Type: internal
Detailed description:
Device is unable to scan for BLE packets due to internal error.
Variables:
error_code - integer - Internal error code
ESR1502 Invalid adv packet
Type: application
Detailed description:
Invalid advertising packet format. Function that constructs packet did not provide a valid object (it may returned null or undefined).
ESR1505 Invalid UUID len
Type: application
Detailed description:
UUID for iBeacon is longer or shorter than 16 bytes
ESR1506 Invalid ID len
Type: application
Detailed description:
Invalid identifier length. It is longer or shorter.
UWB errors
ESR1701 Bad args for role
Type: application
Detailed description:
Given arguments are not valid for selected UWB role.
Reported by:
uwb.restart(role, options)
uwb.start(role, options, callback)
ESR1703 Invalid options
Type: application
Detailed description:
Invalid UWB configuration options. Check UWB documentation.
Reported by:
uwb.restart(role, options)
uwb.start(role, options, callback)
ESR1704 Warning: Using default PAN ID: {pan_id}
Type: warning
Detailed description:
Pan ID has default value. UWB will still work, but to future-proof your solution to avoid conflicts with other Estimote devices you should use unique PAN ID value for all your devices you with to communicate over UWB.
Variables:
pan_id - hex - Default PAN ID
ESR1705 Not started
Type: application
Detailed description:
UWB must be started before that function is used.
Reported by:
uwb.blink(userData)
uwb.restart(role, options)
ESR1706 Bad role: {role}
Type: application
Detailed description:
This feature is not available in this role. Change role or don’t call this function in current role. Also this role might not be supported on given hardware.
Variables:
role - integer - Invalid role value
Reported by:
uwb.blink(userData)
uwb.start(role, options, callback)
Sensors errors
ESR1801 Unsupported event: {event_code}
Type: application
Detailed description:
Event type is not supported on this hardware revision
Variables:
event_code - integer - Event type number
Reported by:
sensors.imu.onMotion(eventType, callback, options)
ESR1802 Bad event options
Type: application
Detailed description:
Event was provided with bad options. In case of MLC event check if model was defined and it contains non-zero, even number of bytes.
Reported by:
sensors.imu.onMotion(eventType, callback, options)
ESR1803 Internal sensor error
Type: internal
Detailed description:
Sensor returned error state. Probably its internal state got damaged.
Reported by:
sensors.imu.onMotion(eventType, callback, options)
ESR1804 Data too big. Max {max_size}b
Type: application
Detailed description:
Provided data is too big to fit into memory buffer. Try to make you model smaller.
Variables:
max_size - integer - Maximum size in bytes
Reported by:
sensors.imu.onMotion(eventType, callback, options)
ESR1805 Bad data format
Type: application
Detailed description:
Provided model data is in wrong or unrecognized format
Reported by:
sensors.imu.onMotion(eventType, callback, options)
Crypto errors
ESR2001 Unsupported type: {algorithm_id}
Type: application
Detailed description:
Unsupported hash function or encoding algorithm. Some hardware revisions might not support it.
Variables:
algorithm_id - integer - Algorithm ID that is invalid
ESR2002 Message too big. Max {max_size}b
Type: application
Detailed description:
Encoded/decoded message is too big to be processed (more then few kB).
Variables:
max_size - integer - Maximum size of message to encrypt/decrypt in bytes
ESR2003 Bad data or key length
Type: application
Detailed description:
Selected algorithm may accept data or keys only in specified length. Please provide data or key with length padded or stirpped to required length.
Firmware update errors
ESR2101 Internal DFU error {error_code}
Type: internal
Detailed description:
Internal firmware update error with code.
Variables:
error_code - integer - Internal error code
ESR2102 Invalid checksum
Type: internal
Detailed description:
Calculated checksum does not match checksum provided with firmware image. This may indicate bad image or error during upload.
ESR2103 Bad hardware: {firmware_hw_revision} != {device_hw_revision}
Type: application
Detailed description:
Firmware image was prepared for different hardware revision.
Variables:
firmware_hw_revision - string - Hardware revision that the firmware was supposed to run on
device_hw_revision - string - Device hardware revision
ESR2104 Min version not meet
Type: application
Detailed description:
Current firmware is too old to be upgraded with provided update file.
ESR2105 Firmware update timeout
Type: internal
Detailed description:
Firmware update procedure waited too long for next data chunk. This cloud happen due to Bluetooth connection issues. Please try again to update firmware.
ESR2106 Image too big: {firmware_size}b>{max_firmware_size}b
Type: application
Detailed description:
Firmware image won’t fit into memory. Probably this image is for a different hardware revision or has been corrupted.
Variables:
firmware_size - integer - Firmware size
max_firmware_size - integer - Maximum allowed firmware size