[BLE Command] This class is used to create an object to be called when you write the receiveFlag characteristic.
receiveFlag characteristic is used to start the transfer of a file from the BLE client to this ESP32.
Properties:
UUID: fcbff68e-2af1-11eb-adc1-0242ac120002
Usage: in order to transfer a file to this device you need to follow the next steps:
- Activate notifications of the FilesCallbacks_send characteristic associated with this class.
- write to this characteristic the name of the file you want to transfer.
- write to the FilesCallbacks_send the bytes of the file in chunks of 512 bytes.
- wait to be notified from theFilesCallbacks_send.
- repeat steps 3 and 4 until you have sent all the bytes of the file
- write to this characteristic any message to finish the transfer
- you will be notified by FileErrorMsg characteristic with "done"
Range: accepted values are a name, for example, "New Path.thr" to start the transmission of a file and any other character to finish it.
- Note
- you may be notified by fileErrorMsg characteristic with some of this massage:
- "ok" means the file was created and is waiting for the bytes of the file.
- "error= -2" means the file couldn't be created maybe because there is no sd card inserted.
- Warning
- if you try to send a file named equals than other inside the sd card it will be deleted to accept this new file, so if you're not sure if the name of your file name already exists in the sd card, Use the FilesCallbacks_checkFile characteristic.
- See also
- How to read the response of a characteristic