This document describes the Electronic Shelf Label (ESL) service implementation for the PSLabel project.
The ESL service provides Bluetooth Low Energy (BLE) GATT characteristics that enable wireless communication with electronic shelf label devices. This implementation follows the Bluetooth ESL specification and provides essential functionality for managing e-ink displays.
- ESL Service:
0x181D(Bluetooth assigned number for ESL)
- Properties: Write, Write Without Response
- Purpose: Send commands to control the ESL device
- Commands:
0x01: Update Display - Triggers display refresh0x02: Clear Display - Clears the display and image buffer0x03: Sleep - Puts device into low-power mode0x04: Wake - Wakes device from sleep mode0x05: Get Status - Requests current device status
- Properties: Write, Write Without Response
- Purpose: Transfer image data to the device
- Format: First 4 bytes contain total image size, followed by image data
- Buffer: 1KB internal buffer for image data
- Properties: Read
- Purpose: Provides display capabilities information
- Data Structure:
- Width (2 bytes): Display width in pixels
- Height (2 bytes): Display height in pixels
- Color Depth (1 byte): Bits per pixel
- Display Type (1 byte): Display technology type
- Properties: Read, Notify
- Purpose: Reports current device status
- Status Values:
0x00: Idle - Device ready for commands0x01: Updating - Display update in progress0x02: Sleeping - Device in low-power mode0xFF: Error - Device error state
- Connect to the PSLabel device via BLE
- Subscribe to status notifications to monitor device state
- Read display information to understand capabilities
- Write image data to the Image Transfer characteristic
- Send update command via Control Point to refresh display
First packet: [SIZE_BYTE_3][SIZE_BYTE_2][SIZE_BYTE_1][SIZE_BYTE_0][IMAGE_DATA...]
Subsequent packets: [IMAGE_DATA...]
- Connection Management: Handles BLE connection and disconnection events
- Status Notifications: Automatic status updates during operations
- Image Buffering: 1KB buffer for image data transfer
- Command Processing: Full command set implementation
- Error Handling: Proper error responses for invalid operations
- Device enters sleep mode when commanded
- Wake commands bring device back to active state
- Status reporting allows monitoring of power states
- Image buffer: 1KB
- Display info structure: 6 bytes
- Minimal RAM footprint for embedded applications
The ESL service is integrated into the main PSLabel application. Build using:
west build app -b nrf54l15dk/nrf54l15/cpuapp- Service automatically advertises when BLE is enabled
- Compatible with standard BLE ESL client applications
- Designed for Nordic nRF52/nRF54 series MCUs
- Follows Zephyr RTOS conventions and best practices
- NFC wake functionality integration
- OTA update support via BLE
- Multi-image management
- Advanced power optimization
- Error recovery mechanisms