Transfer big data via bluetooth/ble?
Transfer big data via bluetooth/ble?
I am currently building a project with following vision:
- buffers motion data on the ESP32 in a file -> send this data after a while (once per hour) to an app (iOS/Android)
-> working approach:
--> App connect to ESP32 via BLE -> WORKING
--> App sends data to ESP (trigger for ESP to send saved motion data back) -> WORKING
--> ESP sends all the saved motion data to the App -> PROBLEM
I tried to send data via BLE (BLECharacteristic) and this works with small data (~50byte).
Currently I'm saving the motion data as a String -> final I wanna save it binary (todo for later)
Current Chip: esp32-wrover-b
Library: https://github.com/nkolban/ESP32_BLE_Arduino
Questions:
- How can I send large data via Bluetooth/BLE?
- Is there a difference between BLE and Bluetooth on the ESP32?
- Is my described approach above best practice or is there potential for optimization?
I think/hope that this is not to difficult - there are so many smart-trackers on the market which save and send data in a similar way
I have some experience with arduinos and esps but not so much with Bluetooth.
Thank you for your support
- buffers motion data on the ESP32 in a file -> send this data after a while (once per hour) to an app (iOS/Android)
-> working approach:
--> App connect to ESP32 via BLE -> WORKING
--> App sends data to ESP (trigger for ESP to send saved motion data back) -> WORKING
--> ESP sends all the saved motion data to the App -> PROBLEM
I tried to send data via BLE (BLECharacteristic) and this works with small data (~50byte).
Currently I'm saving the motion data as a String -> final I wanna save it binary (todo for later)
Current Chip: esp32-wrover-b
Library: https://github.com/nkolban/ESP32_BLE_Arduino
Questions:
- How can I send large data via Bluetooth/BLE?
- Is there a difference between BLE and Bluetooth on the ESP32?
- Is my described approach above best practice or is there potential for optimization?
I think/hope that this is not to difficult - there are so many smart-trackers on the market which save and send data in a similar way
I have some experience with arduinos and esps but not so much with Bluetooth.
Thank you for your support
Re: Transfer big data via bluetooth/ble?
There is few aspects you have take for consideration:
1) file size - what means big file, (for example i am sending 1,3MB+ file over BLE in OTA over BLE),
2) what speed you are expecting,
3) what framework you want to use for android/iOS, for example i found that ionic cordova and flutter does not support classic bluetooth or support is bad, most likely it wont be problem with native code,
4) other aspects?
1) file size - what means big file, (for example i am sending 1,3MB+ file over BLE in OTA over BLE),
2) what speed you are expecting,
3) what framework you want to use for android/iOS, for example i found that ionic cordova and flutter does not support classic bluetooth or support is bad, most likely it wont be problem with native code,
4) other aspects?
Re: Transfer big data via bluetooth/ble?
Thanks for your replay chegewara
1) file size about 2.8 MB
2) 2.8 MB within 30-60 sec - the faster the better
3) for the app I'm using Ionic with the plugin (cordova-plugin-ble-central and @ionic-native/ble)
Is this filesize and transfer speed possible?
Which methodology and process can I use to build this?
br,
priema
1) file size about 2.8 MB
2) 2.8 MB within 30-60 sec - the faster the better
3) for the app I'm using Ionic with the plugin (cordova-plugin-ble-central and @ionic-native/ble)
Is this filesize and transfer speed possible?
Which methodology and process can I use to build this?
br,
priema
Re: Transfer big data via bluetooth/ble?
1) its a big file,
2) not possible with BLE, with this size it will take 5+ minutes,
3) i am using this plugin https://ionicframework.com/docs/native/bluetooth-le,
If you want to have better throughput its advised to use classic bluetooth, maybe this plugin:
https://ionicframework.com/docs/native/bluetooth-serial
but i didnt try it yet. Im not even sure it is bluetooth classic plugin.
2) not possible with BLE, with this size it will take 5+ minutes,
3) i am using this plugin https://ionicframework.com/docs/native/bluetooth-le,
If you want to have better throughput its advised to use classic bluetooth, maybe this plugin:
https://ionicframework.com/docs/native/bluetooth-serial
but i didnt try it yet. Im not even sure it is bluetooth classic plugin.
Re: Transfer big data via bluetooth/ble?
how long does it take for your 1.3 MB file to transfer?
so one other possibility would be to use classic bluetooh on the ESP32-WROVER-B, right?
br
priema
so one other possibility would be to use classic bluetooh on the ESP32-WROVER-B, right?
br
priema
Re: Transfer big data via bluetooth/ble?
I dont remember correct numbers now, but its similar speed to UART flash with 115200.
You can use wrover or wroom module. All but ESP32S2 modules have bluetooth classic and BLE.so one other possibility would be to use classic bluetooh on the ESP32-WROVER-B, right?
Re: Transfer big data via bluetooth/ble?
ok thank you for your reply.
I will try to shrink my data size and try classic bluetooth.
br
priema
I will try to shrink my data size and try classic bluetooth.
br
priema
Re: Transfer big data via bluetooth/ble?
Hello! Did you already solve it? Can you share your´e code and app you are using? I just want to send data.txt file that is in the SD by bluetooth to the phone
Re: Transfer big data via bluetooth/ble?
Hi,
i didn’t try it with the classic Bluetooth connection.
If you have a library which only gets the file as parameter and does everything else (classic Bluetooth or BLE - depending in file size) you can share it here
i didn’t try it with the classic Bluetooth connection.
If you have a library which only gets the file as parameter and does everything else (classic Bluetooth or BLE - depending in file size) you can share it here
-
- Posts: 5
- Joined: Wed May 01, 2019 9:10 am
- Location: Hong Kong
- Contact:
Re: Transfer big data via bluetooth/ble?
if you would like to send the data from the device to IOS, the idea is to keep to send data through the notification and configure the connection interval to 15ms (min and max).
I did the example on the nordic nRF52.
https://jimmywongiot.com/2021/05/28/vid ... 52-series/
I think it should be very similar to use the ESP32 case.
Jimmy
I did the example on the nordic nRF52.
https://jimmywongiot.com/2021/05/28/vid ... 52-series/
I think it should be very similar to use the ESP32 case.
Jimmy
Who is online
Users browsing this forum: DrMickeyLauer, Majestic-12 [Bot] and 186 guests