Documentation based on the ATC1441 BLE E-Paper Uploader (source on Github) and testing with a 2.9" Black/White/Red epaper display.
- Primary Service
- Short UUID
0xfef0 - Long UUID
0000fef0-0000-1000-8000-00805f9b34fb - Characteristics
- "ext control" Characteristic
- Short UUID
0xfef1 - Long UUID
0000fef1-0000-1000-8000-00805f9b34fb - Write/Notify
- BLE client and display use the extControl characteristic to send bi-directional commands using writes (client → display) and notifies (display → client).
- Short UUID
- "write block" Characteristic
- Short UUID
0xfef2 - Long UUID
0000fef2-0000-1000-8000-00805f9b34fb - Write only
- BLE client writes data part messages to the writeBlock characteristic as instructed by the display. The display will send instructions via notifications to the extControl characteristic (see below).
- Short UUID
- "ext control" Characteristic
- Short UUID
Image upload transactions are managed via bi-directional commands sent via writes to and notifications from the extControl characteristic (0xfef1). All commands are binary data, with hex representations shown below.
| BLE Client (computer/phone) action to take |
message direction, command, and command hex representation | BLE Server (ePaper display) action to take |
|---|---|---|
→ requestDataMessageSize()01 |
respond with dataMessageSize* |
|
store dataMessageSize |
← setDataMessageSize(dataMessageSize)01 <uint16le dataMessageSize> |
|
→ setImageSize(imageSize)02 <uint32le imageSize> 00 00 00 |
store imageSize and ack |
|
← ackImageSize()02 |
||
→ initiateDataTransfer()03 |
Begin requesting data segments. Repeat until all data uploaded, then send data transfer complete confirmation. | |
| send requested part number via data transfer protocol (see below) | ← requestDataPart(partNumber)05 00 <uint32le partNumber> |
|
| end transaction and disconnect | ← confirmDataTransferComplete()05 08 |
(*) The dataMessageSize is typically 244d (f4 00 as a uint16le). Other values seen include 101d (uint16le 65 00). dataMessageSize may vary across different clients for the same display. See atc1441 upload page pull request
Transfer data by writing to the writeBlock characteristic (0xfef2) as requested by the display. Image data should be in the correct image format for your display.
The display will send a command requesting the transfer of a particular data part number (via notification from the extControl characteristic).
The client should respond by writing at most dataMessageSize bytes to the writeBlock characteristic. dataMessageSize should have previously been provided by the display in response to the 01 control protocol command.
Data part messages consist of:
- Four header bytes holding the uint32le encoded data part number
- Raw binary data bytes
All messages except the message holding the final data part should be exactly dataMessageSize bytes long. The final data part's message should include all remaining image data, and should thus be between 5 bytes and dataMessageSize bytes long, depending on the amount of data remaining.
| start byte offset | field length in bytes | description |
|---|---|---|
| 0 | 4 | uint32le encoded part number |
| 4 | dataMessageSize - 4 bytes for all except the final part.imageSize - partNumber * (dataMessageSize - 4) bytes for the final part. |
Raw binary data of image data part specified. |
Since all data part messages except the message for the final part must be exactly dataMessageSize bytes, the part number requested by the display specifies the exact byte offset within the image data of the data part to be sent:
dataPartByteOffset(partNumber) = partNumber * (dataMessageSize - 4)
dataPartSize(partNumber) = min(dataMessageSize - 4, imageSize - dataPartByteOffset(partNumber))