Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any Bluetooth Low Energy ( BLE ) libraries for react native? [closed]

I am newbie in react native based app development. We have to develop a mobile app (as BLE client) that needs to communicate through BLE (Bluetooth low energy / smart Bluetooth) to monitor an IOT device (a BLE peripheral/central). We are using Bluetooth Developer studio tool from Bluetooth SIG to design custom BLE services and generate the BLE profile for our IOT device. For the mobile side, we are going to use facebook's react native cross platform framework.

Can anybody recommend some good BLE libraries for react native apps ?

like image 520
dann Avatar asked Aug 03 '17 07:08

dann


People also ask

Does react native support BLE?

React Native BLE PLX is one of the 2 libraries you can use to work with this technology.

Does Expo support Bluetooth?

Simulator does not support Bluetooth. Expo Go does not support Bluetooth.

What versions of BLE can I use with React Native?

However, you can still use the old version of the library even up to 0.60.5 RN version, but with additional changes. As for OS versions, the library works on iOS 9+ and Android API 19+. This library is an alternative option you can use to integrate a BLE device into a React Native application.

How do I use Bluetooth with React-Native?

In order to do this we’ll use the Bluetooth library react-native-ble-plx, which, at the time of writing, is the most popular in React-Native. First install the library into your project by running this command at the root of your project: Next we’ll need to follow some iOS and Android Specific instructions

What is the best library for low level ble communication?

react-native-ble-manager : A great module/library for low level BLE communication via service and characteristic UUIDs (i.e BLE commands as hex values ) It's easy to use, widely used by community and well matured library but requires BLE service and characteristic UUIDs knowledge.

What is Bluetooth Low Energy (BLE)?

Bluetooth Low Energy is also known as BLE. This is a version of Bluetooth that is adapted to low power sensors and accessories. Such devices don’t require continuous connection but depend on long battery life. They are especially popular in the fitness, healthcare, security, home entertainment industries, and beacons.


2 Answers

As i couldn't find any good answer at one place so i tried few libraries by myself. I just share my conclusion which may be helpful to other newbies for starting react native based BLE client mobile app.

So, Here are some good BLE libraries for Client(Central) role that can be used in React Native Mobile Apps :-

  1. react-native-ble-manager : A great module/library for low level BLE communication via service and characteristic UUIDs (i.e BLE commands as hex values ) It's easy to use, widely used by community and well matured library but requires BLE service and characteristic UUIDs knowledge.

  2. react-native-ble-plx Developers who love ReactiveX programming may refer to this Low level BLE communication module via service and characteristic UUIDs (i.e BLE commands as hex values ) It's a very stable library, actively maintained, asynchronous in nature but requires lots of memory and comparatively slow performance due to multiple dependent libraries and usage of base64 encoding/decoding for data conversion.

  3. react-native-ble-quick-sdk Developers who love Bluetooth Developer Studio and who wants to build app quickly without much BLE knowledge may refer to this high level BLE API module which doesn't require knowledge of service and characteristic UUIDs (i.e BLE commands as hex values ) It requires comparatively less memory and gives better performance as it is not using base64 for data conversion. Partially reactive in nature as it use Node's EventEmitter. It auto generates lots of API source for target BLE device and also auto generates device specific sample app. The biggest drawback is that there's no stable version and not widely used yet.

  4. react-native-ble : A NodeJS style low level BLE communication module via service and characteristic UUIDs (i.e BLE commands as hex values ) Not so actively maintained but it's based on a very stable noble library.

like image 174
dann Avatar answered Oct 17 '22 06:10

dann


In react native the best library which i have used is below. You can test it. Whether your all requirements are full-filed or not. Even there will be some situations where you will need to manipulate Android Default Bluetooth functionality.

https://github.com/Polidea/react-native-ble-plx

The best way to resolve your problem is try to understand Bluetooth functionality of Android and IOS and how you can manipulate nicely to work with above library.

like image 22
Hemant Nagarkoti Avatar answered Oct 17 '22 06:10

Hemant Nagarkoti