Comments (9)
@Cierpliwy Any update on the base64 API? Is there any consideration to disabling the encoding / decoding?
We have a scenario with some embedded devices, running on a TI cc2650, that is fighting for bytes. The base64 encoding / decoding is a killer for when you want to send raw bytes across the wire.
from react-native-ble-plx.
In our internal project we are currently doing Data -> Base64 -> Data which is definitely suboptimal and I would love to remove that step for library. RN team doesn't seem to work on it unfortunately:
facebook/react-native#1424.
Maybe I could check if it is difficult to add binary bridging between JSC and native modules, but to be honest I don't have so much time at my disposal.
As a side note: still when you are passing Base64 to API calls it is converted to binary form by native libraries used by react-native-ble-plx and then send to BLE radio. So you can definitely manipulate bytes and there is only Data -> Base64 -> Data inefficiency during bridging.
from react-native-ble-plx.
Hm, maybe I read the source wrong.
I was under the assumption, that if I were to read a characteristic on a remote peripheral, that the library assumes the data received is in base64. Is this correct? If it's simply reading the data, then encoding to base64 for the trip back to js land then that should be fine, and may actually be the best way.
The scenario that I'm in, is where I have a device out in the wild that's broadcasting some advertisement data when not connected, that serves as service data, that contains some status values. I actually just booted back up the prototype, let me test my theory and get back to you before I waste any more time.
from react-native-ble-plx.
Data is read from peripheral in binary form and converted to Base64 only when it needs to be sent to JS side, so everything should be fine.
from react-native-ble-plx.
Yeah, you don't have to send base64 data to your TI cc2650.
from react-native-ble-plx.
Hi @Cierpliwy,
As I read this issue, could you confirm that data written to or read from a characteristic is not base64 encoded ? That means, peripheral doesn't need to encode or decode base64 ?
from react-native-ble-plx.
@jchirschy That's correct
from react-native-ble-plx.
from react-native-ble-plx.
Closing in favour of #299
from react-native-ble-plx.
Related Issues (20)
- unable to read property list from file: /Users/testuser/Desktop/bluetooth-ble/ios/bluetoothble/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) HOT 3
- I can write data to the device, but I cannot receive data. HOT 3
- 🐛 Making methods async and/or arrow functions in v3.2.0 is a breaking change HOT 4
- BleError: Device Is Not Connected HOT 5
- Android: scan not returning devices HOT 15
- 🐛 iOS example app does not want to start HOT 1
- 🐛 empty known devices list on Android HOT 4
- IOS Service UUID does not getting HOT 7
- Support sharing JSON data between devices HOT 2
- 🐛 The onstatechange was not fired if the app's blue permission was disabled HOT 5
- 🐛 IOS\Android disconnecting from bluetooth device after connecting if we don't write characteristics after 30 seconds. HOT 4
- 🐛 BluetoothLE is in unknown state, but the state is PoweredOn HOT 7
- Auto-disconnection in some Android devices HOT 5
- 🐛 Scanning devices, it only finds my ble beacon on Android 11 (it doesn't on iOS 17.5.1 and Android 14) HOT 2
- I have connected to the IoT device, but I still cannot get the data sent by the IoT device. Does it not support the Bluetooth serial port? HOT 1
- Read characteristic in background? HOT 2
- isDeviceConnected return BleErrorCode.DeviceDisconnected instead of false🐛 HOT 2
- 🐛ManufacturerData on iOS returning null, in Android is correctly setted HOT 20
- Issue with [BleError: Operation was cancelled] on iOS 17 HOT 10
- 🐛 Module does not work with Android Auto, when there is no Activity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-ble-plx.