I need to transfer few kilobytes of data from slave device over BLE when requested from master device. I tough there is no file transfer profile in LE? What are the options to transfer file over LE?
I need to transfer few kilobytes of data from slave device over BLE when requested from master device. I tough there is no file transfer profile in LE? What are the options to transfer file over LE?
Hi there,
There is as of today no standard way to transfer files over BLE (although one is being worked on).
You have 2 basic options:
If you have full control of both the central and peripheral, you could use a custom L2CAP channel and define your own protocol over it.
If your central is a mobile device running iOS or Android, then you can define your own protocol using a propietary ATT service with a set of characteristics that act as endpoints.
Regards,
Carles
Hi Charles
Thanks for your answer. Is there any examples of option 2 what can be used as an reference? And what is maximum payload data per one attribute? Somewhere was mentioned that value lenght is variable max 512Bytes but effective is much smaller?
Thanks for your support
Hi there
Is there any examples of option 2 what can be used as an reference?
I am afraid I don't know about that. You can take a look at the SDK or ask Nordic support.
And what is maximum payload data per one attribute?
That would be 20 bytes if you use Write Command or Write Request, The max size of the characteristic is completely irrelevant. You would make it 20 bytes and then copy those 20 bytes to your own memory buffer every time you receive a packet from the peer.
Essentially this would allow you to use a characteristic as and endpoint for a protocol, disregarding the actual characteristic value.
Regards,
Carles
Hi, we do have a non-standard UART profile implemented for iOS and Android on our web. I'm not sure if this could meet your requirements, but I'm putting the link here anyway so you can check it out.
-John