BLE. The operation was cancelled via an AbortSignal
supplied by the caller. No user-facing error is needed.
USB, BLE. The user dismissed the device-picker dialog without selecting a device. Typically no error message is needed — the user chose not to proceed.
USB, BLE. The connection type is not supported on this platform
or browser. Corresponds to ConnectionAvailabilityStatus
"unsupported".
BLE. Bluetooth is turned off at the OS level. Prompt the user
to enable it in system settings. Corresponds to
ConnectionAvailabilityStatus "disabled".
BLE. The app does not have the required Bluetooth permissions
(iOS/Android). Prompt the user to grant permission in system
settings. Corresponds to ConnectionAvailabilityStatus
"permission-denied".
BLE. Location services are disabled. Required on Android
versions before 12 for Bluetooth scanning. Prompt the user to
enable location in system settings. Corresponds to
ConnectionAvailabilityStatus "location-disabled".
USB, BLE. A method was called that requires an active connection, but no connection is currently open. Call DeviceConnection.connect first.
USB. The USB interface could not be claimed, usually because another browser tab or application already has an open connection to the device.
USB, BLE. The device disconnected during an operation. The physical USB or Bluetooth connection was lost.
USB, BLE. A communication timeout — the device did not respond within the expected time. This may indicate the device is busy, hung, or that the connection is degraded.
USB, BLE. A communication failure that does not match any more specific code. Typical handling: prompt the user to physically disconnect and reconnect the device, then retry.
USB. The USB device was found but lacks the expected CMSIS-DAP interface. On micro:bit V1 this indicates the DAPLink firmware is too old and needs updating.
BLE. The micro:bit's Bluetooth pairing/bonding information has been lost (e.g. after a firmware reflash). The user needs to re-pair the device. Currently only detected on iOS.
Error codes identifying specific failure modes.
Each code represents a distinct category of failure that apps can match on to decide what message to show or what recovery to attempt. New codes may be added in future minor releases.
Codes are annotated with USB, BLE, or USB, BLE to indicate which connection types can produce them. USB-only apps can ignore BLE-only codes.