Hello,
I am quite new in B4R section. So far I have used only native Arduino for Atmel based project and B4A.
Recently I would like to make an exercise and try to use ESP32 Cam to make photos and send it via Bluetooth Clasic to B4A app using B4R.
May I ask for the advice how to send a photo (jpeg) in a safe way from B4R to B4A ? Posibly some example or sketch ?
I didn't found an answer so far within our Comunity.
Thank you very much. It is great tutorial. Most examples (also in native Arduino) are made with WiFi.
About Bluetooth I have found only simple Chat example and nothing else.
I would like to use BT in my exercise.
TomKluz
At last I have make ESP32 Cam sending constantly jpg photos via Bluetooth Classic. (It has no PIN at all. I don't know why). So far in native Arduino.
Unfortunatelly file content is splited into parts, as it already happend before with strings.
My question is:
May I be sure that AsyncStreamsPrefix mode made on both sides B4R and B4A will give guarantee that file will come in one piece (not splitted) ?
TomKluz
You should never assume that the data will arrive as a single packet, with the exception of prefix mode. However unless the files are small than sending them as a single message will fail.
Thank you for pointing me this tutorial.
Life is always more complicated then we think. For sure above mentioned example is not easy to understand to me, at first moment. I need some time.
For now I have got a result in such simple way. I am looking for a text "JFIF" which is always in a header of jpg file in every data package (buffer).
Depending on this, data package is added to the end of file or not. So far it is working.