'Transfer files via BluetoothLE from Ionic app to Raspberry Pi Zero W
I have an Ionic application where I am connecting to a Raspberry Pi Zero W via Bluetooth using the bluetoothle plugin.
Everything works great in general.
I would like to ask if there is a plugin or a way to transfer files via Bluetooth.
I have designed a custom solution, but before starting developing it, I would like to know if I can save some trouble.
Similar to
ble.write({OBJECT TO PASS}, environment.ble.serviceID, environment.ble.characteristicID)
.then((res) => {
...
})
.catch(err => {
...
});
I would like to know if I can pass a file to OBJECT TO PASS and do the work.
In my custom solution, I designed a way to read n bytes of the file, send it to the write request, then continue with the next n bytes, until the file ends. So, I have planned to pass strings and create the file n bytes at a time inside the Raspberry.
I would like to keep this question simple, so I am not providing any more details regarding the NodeJS and Python code in Raspberry Pi Zero W, but if someone needs it I could provide it.
In the Image you can see the custom solution.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|