Skip to content

BLE HCI Demo (nRF54L15)

The BLE HCI demo is a showcase firmware for the nRF54L15 DK that demonstrates LogScope’s features through physical button interactions and real Bluetooth LE connections.

Terminal window
# Flash prebuilt hex
nrfutil device program --firmware samples/nrf54l15-ble-hci-demo/build/merged.hex --serial-number <SN>
nrfutil device reset --serial-number <SN>

Or build from source:

Terminal window
source samples/nrf54l15-ble-hci-demo/setup-env.sh
west build -b nrf54l15dk/nrf54l15/cpuapp samples/nrf54l15-ble-hci-demo --build-dir build-hci -p
west flash --build-dir build-hci

Then open LogScope, connect via J-Link RTT with the Zephyr parser.

ButtonIdle StateConnected State
Button 0Toggle advertising on/offForce disconnect
Button 1Sensor anomaly sequence (4 messages)Anomaly + 10 notification burst
Button 2Flash corruption sequence (5 messages)Same
Button 3Stress burst (50 rapid-fire messages)Same

When advertising: Stops advertising.

ble_mgr: Advertising stopped by user

When stopped: Restarts advertising.

ble_mgr: Advertising restarted by user

When connected: Forces a disconnect.

ble_mgr: User-initiated disconnect
app: Disconnected: XX:XX:XX:XX:XX:XX (reason 0x16 Remote User Terminated Connection)
app: Re-advertising started

Simulates a temperature spike:

sensor_drv: Anomaly detected: temperature spike to 85.2C (threshold: 60.0C)
sensor_drv: Thermal threshold exceeded, initiating cooldown
sensor_drv: Sensor read timeout during thermal event (retry 1/3)
sensor_drv: Temperature returning to normal: 24.8C

When a BLE device is connected, also sends 10 rapid BLE notifications.

Simulates storage corruption with recovery:

flash_mgr: CRC mismatch at sector 0x00080000 (expected: 0xA3F1, got: 0x0000)
flash_mgr: Wear level critical on sector 0x00080000 (writes: 99847)
flash_mgr: Flash write failed at 0x00080000 (ECC error)
flash_mgr: Sector 0x00080000 marked bad, remapping to 0x000A0000
flash_mgr: Flash recovery complete, 1 sector remapped

Fires 50 rapid messages (20ms apart) with realistic content cycling through errors, warnings, and info messages. Great for testing LogScope’s parsing performance and watching sidebar counters climb in real-time.

IntervalModuleLevelMessage
Every 2ssensor_drvDBGTemperature, humidity, accelerometer readings
Every 4scrypto_mgrDBGAES-128-CCM encryption operations
Every 5sappINFHeartbeat with uptime
Every 5sflash_mgrDBGFlash write operations
~8-12sappWRNRetransmission warnings (pseudo-random interval)
Every 15sflash_mgrWRNFlash wear level warnings
Every 15scrypto_mgrWRNKey rotation warnings
Every 30sflash_mgrERRFlash write failures
Every 30scrypto_mgrERRMAC verification failures
Every 45sappWRN/INFBattery level checks

The firmware advertises as “LogScope Demo”. Connect with the nRF Connect mobile app to see:

  • Real HCI packets (Connection Complete, Parameter Updates, GATT operations)
  • Application-level connection/disconnection logs
  • Sensor data notifications (every 2s when subscribed)
CharacteristicUUID SuffixTypeDescription
Info...def1ReadReturns device info string
Command...def2Write0x01=burst, 0x02=reset sensor, 0x03=flash erase, 0x04=fault sim, 0x05=real fault
Sensor Data...def3Notify4-byte sensor value, every 2s when subscribed

Set these up in LogScope to see watch patterns in action:

"logscope.watchPatterns": [
{ "name": "BLE State", "pattern": "Connected|Disconnected|Advertising", "regex": true, "color": "#4caf50" },
{ "name": "Errors", "pattern": "failed|error|fault|CRC|timeout", "regex": true, "color": "#f44336" },
{ "name": "Retransmission", "pattern": "Retransmission", "color": "#ff9800" }
]

Or add them one at a time using the Add Watch Pattern button in the sidebar.

  • nRF54L15 DK (PCA10156)
  • nRF Connect SDK v3.2.0
  • Optional: phone with nRF Connect app