firmwareSandsara
FilesCallbacks_sendFlag Class Reference

[BLE Command] This class is used to create and object to be called when you write the sendFlag characteristic. More...

Inheritance diagram for FilesCallbacks_sendFlag:
Collaboration diagram for FilesCallbacks_sendFlag:

Detailed Description

[BLE Command] This class is used to create and object to be called when you write the sendFlag characteristic.

sendFlag characteristic is used to start the transfer of a file from the SD card to the BLE Client.

Properties:

  • Write

UUID: fcbffdaa-2af1-11eb-adc1-0242ac120002

Usage: to read a file from the SD card you have to read chunks of bytes corresponding to the desired file, to do it follow the next steps.

  1. write to this characteristic the name of the file you want to read.
  2. wait to be notified by the fileErrorMsg characteristic and read it (see below what response you can receive).
  3. read the FilesCallbacks_send characteristic to get the bytes of the desired file.
  4. repeat step 3 until you read less than 512 bytes. when you read less than 512 bytes means that you have read all the bytes of the file.

Range: accepted values are a name, for example, "Old Path.txt" to start the transmission of this file.

Note
you may be notified by fileErrorMsg characteristic with some of this massage:
  • "ok" means the file is ready to be read.
  • "error= -1" the desired file does not exist.
See also
How to read the response of a characteristic

The documentation for this class was generated from the following file: