react-native-ble-plx | React Native BLE library

 by   Polidea JavaScript Version: 2.0.3 License: Apache-2.0

kandi X-RAY | react-native-ble-plx Summary

kandi X-RAY | react-native-ble-plx Summary

react-native-ble-plx is a JavaScript library typically used in Networking applications. react-native-ble-plx has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i react-native-ble-plx' or download it from GitHub, npm.

This is React Native Bluetooth Low Energy library wrapping Multiplatform Ble Adapter.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              react-native-ble-plx has a medium active ecosystem.
              It has 2158 star(s) with 343 fork(s). There are 66 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 62 open issues and 655 have been closed. On average issues are closed in 118 days. There are 14 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of react-native-ble-plx is 2.0.3

            kandi-Quality Quality

              react-native-ble-plx has 0 bugs and 0 code smells.

            kandi-Security Security

              react-native-ble-plx has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              react-native-ble-plx code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              react-native-ble-plx is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              react-native-ble-plx releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.
              react-native-ble-plx saves you 4248 person hours of effort in developing the same functionality from scratch.
              It has 9011 lines of code, 79 functions and 48 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-ble-plx
            Get all kandi verified functions for this library.

            react-native-ble-plx Key Features

            No Key Features are available at this moment for react-native-ble-plx.

            react-native-ble-plx Examples and Code Snippets

            React-Native, BleManager "Native Module cannot be null"
            JavaScriptdot img1Lines of Code : 4dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm install -g react-native-cli
            npm run eject
            react-native link react-native-ble-plx
            

            Community Discussions

            QUESTION

            get weight from GATT characteristics value in react-native-ble-plx
            Asked 2022-Feb-24 at 09:31

            I am developing an react-native app that gets the weight value of a scale(MI SCALE2) that supports Bluetooth.(I have no knowledge of bluetooth.)

            // version

            "react-native": "0.66.1",

            "react-native-ble-plx": "https://github.com/below/react-native-ble-plx",

            I was able to get these values ​​when I got on the scale.

            ...

            ANSWER

            Answered 2022-Feb-24 at 09:31

            As far as I understand your Code, your weight scale makes use of Bluetooth Weight Scale Profile and Weight Scale Service. The data you find in the corresponding characteristics needs to be interpreted as described in Personal Health Devices Transcoding

            Edit: You can find more information on the data structure here: GATT Specification Supplement 5

            example:

            Feature([33,0,0,0]) => 0x00000011 => ...00 0010 0001 =>

            value description 1 Time Stamp Supported: True 0 Multiple Users Supported: False 0 BMI Supported: False 0100 Weight Measurement Resolution: Resolution of 0.05 kg or 0.1 lb 000 Height Measurement Resolution: Not specified

            Weight = [34, 156, 74, 178, 7, 1, 7, 22, 33, 2] => 0x22 0x9c 0x4a 0xb2 0x07 0x01 0x07 0x16 0x21 0x02

            First byte is a flags field => 0x22 => 0010 0010

            value description 0 Measurement Units: SI 1 Time Stamp present: True 0 User ID present: False 0 BMI and Height present: False 0010 Reserved for Future Use

            Weight in kilograms with resolution 0.005 (uint16) => 0x4a9c => 95,5 kg

            Time Stamp 0xb2 0x07 0x01 0x07 0x16 0x21 0x02

            year(uint16) => 0x07b2 => 1970

            month(uint8) => 0x01 => 1

            day(uint8) => 0x07 => 7

            hours(uint8) => 0x16 => 22

            minutes(uint8) => 0x21 => 33

            seconds(uint8) => 0x02 => 2

            date 1970-01-07T22:33:02

            Source https://stackoverflow.com/questions/70952070

            QUESTION

            How to know when monitorCharacteristic is done with react native ble plx?
            Asked 2022-Feb-14 at 11:17

            I use react-native-ble-plx in my project to communicante with my tool, and I'm trying to monitor one of its characteristics.

            The result is rather long so the monitoringCharacteristic function is looping until it has send me everything, but I don't know how to be sure that the loop is done.

            Here is my monitoring function :

            ...

            ANSWER

            Answered 2022-Feb-14 at 11:17

            Finally I went around the problem by defining an ending pattern to the info I wanted to send/read via BLE, and then I wrote a loop to continue reading while the ending pattern was not encountered:

            Source https://stackoverflow.com/questions/69644751

            QUESTION

            How to use 3rd party library in react native expo
            Asked 2021-Aug-08 at 16:26

            Im total noob in RN and Expo. I'v generated new project expo init test, then cd test, then npm install --save react-native-ble-plx and started expo by npm start.
            In my code I added following lines:

            ...

            ANSWER

            Answered 2021-Aug-08 at 16:26

            You need to eject your expo project to be able to use this library.

            Source

            Source https://stackoverflow.com/questions/68702618

            QUESTION

            How to turn on bluetooth of mobile by using react-native-ble-plx?
            Asked 2021-Jul-05 at 13:19

            My mobile app has functionality to turn on Bluetooth of mobile and show list of Bluetooth devices on the screen. I am using react-native-ble-plx lib for achieving this functionality. I need to turn on BLE of mobile by using react-native-ble-plx lib. Any method is available in that lib for turn on BLE?

            ...

            ANSWER

            Answered 2021-Jul-05 at 13:19

            react-native-ble-plx does not have this functionality but you can use react-native-bluetooth-state-manager. It allows you to read the current bluetooth state (enabled/disabled) and open the bluetooth settings page on iOS and android. It is even possible to enable (and disable) bluetooth on android without user interaction but you have to add the BLUETOOTH_ADMIN permission to you manifest.

            But I would suggest you do not activate Bluetooth without user interaction. Simply check the state and show a message like

            Bluetooth is required to use this app. Please activate it trough your settings

            Only allow the usage of the rest of the app after bluetooth got enabled. A user is probably confused if he deactivated bluetooth and it is suddenly activated.

            Source https://stackoverflow.com/questions/68256119

            QUESTION

            Read Manufacturer data BLE device react-native-ble-plx
            Asked 2020-Dec-14 at 08:05

            Hi I need to work with BLE integration using React-native.

            I am using this package: https://polidea.github.io/react-native-ble-plx/

            I have successfully searched a BLE device now I need to read it's manufacturer data and check for some values

            issue: I am getting manufacturer data in string (Base64) format and I converted into byte array with following code.

            ...

            ANSWER

            Answered 2020-Nov-05 at 07:03

            Found solution string was base64 ENCODED I have to decode string first then convert to byte array

            Source https://stackoverflow.com/questions/64678410

            QUESTION

            bluetooth low energy is working between two mobile phone?
            Asked 2020-Oct-26 at 06:20

            i used bluetooth low energy in my mobile app with react-native . and i want to just find other mobile devices, so i can't find any other mobile phone and theirs supported bluetooth low-energy , but i find my Smartwatch , well my question is bluetooth low energy can find other mobile phone or is just for Accessory?

            and what are you advicing me to find other mobile phone .

            my code

            ...

            ANSWER

            Answered 2020-Oct-26 at 06:20

            Bluetooth Low Energy (BLE) works different than the "old" Bluetooth (Bluetooth Classic). As soon as you turn on Bluetooth your device is visible for Bluetooth Classic scans, but not for BLE scans.

            To find a BLE device it's necessary that the device advertises its present. That's one of the differences between BLE and Bluetooth Classic and allows small accessories to save power. You need to run a GATT Server on your other phone and advertise a service. One very generic tool that would work is nRF Connect.

            Please read more about how BLE works.

            Source https://stackoverflow.com/questions/64526641

            QUESTION

            Using react-native-ble-plx to send data to a raspberry pi RFCOMM server
            Asked 2020-Oct-23 at 23:13

            My goal is to setup my Raspberry Pi 4 to be able to run scripts when a button is clicked in an app I am making with React Native. I need to be able to do it so that they can connect without wifi, which is why I have decided to use Bluetooth.

            So far I have an RFCOMM server set up on the Pi, and have installed the react-native-ble-plx module to be able to handle bluetooth communications, but I'm not sure how to get React Native to connect to this server.

            I'd really appreciate it if anyone can tell me how to connect them and send data to the Pi to get it to run terminal commands, and return the result.

            ...

            ANSWER

            Answered 2020-Oct-23 at 22:12

            There are two types of Bluetooth that are not compatible with each other. RFCOMM and BLE will not work together.

            On the Raspberry Pi you need to create a GATT server. RPi uses the BlueZ stack and they have an example in their source tree: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-server

            You will also need to have an advertisement so that your phone can find the gatt server. There is also an example of that: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-advertisement

            Another suggestion is not to try and develop both ends of the Bluetooth link at the same time as that is tricky. Use a generic BLE tool to check you have the server working correctly before you develop the react app.

            Source https://stackoverflow.com/questions/64504845

            QUESTION

            Losing data after connecting the bluetooth module
            Asked 2020-Oct-04 at 22:35
            Objective

            I am trying to return data from the BlueTooth device after connected because to use the read and write function, need some data. Example data name, overflowServiceUUIDs, solicitedServiceUUIDs, mtu, rssi... and many others. Because if I want to read or write I need some attributes. I am using the library react-native-ble-plx.

            What is happening?

            After the device connected I lost some values.

            Important ...

            ANSWER

            Answered 2020-Oct-04 at 22:35

            Checking the lib you're using, it creates another device object from the reponse it gets when calling the native module, it could be the case this new object comes with null values on those fields and replaces the values you need. Because it's just as it works by now, you could copy those values to another object before they get erased

            Source https://stackoverflow.com/questions/63799393

            QUESTION

            polidea ble encode send package to base64
            Asked 2020-Sep-04 at 07:08

            I want to send a command to my scooter via polidea ble but I don't know how to compose the package and encode it to base64, I tried different ways but it seems it does not work. Here is the documentation of how I need to make the package:

            ...

            ANSWER

            Answered 2020-Sep-04 at 07:08

            My understanding of the documentation you have included, is that to turn on the light the code to create the packet in base64 would be:

            Source https://stackoverflow.com/questions/63736052

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install react-native-ble-plx

            You can install using 'npm i react-native-ble-plx' or download it from GitHub, npm.

            Support

            Interested in React Native project involving Bluetooth Low Energy? We can help you!. Contact us at Polidea.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i react-native-ble-plx

          • CLONE
          • HTTPS

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

          • CLI

            gh repo clone Polidea/react-native-ble-plx

          • sshUrl

            git@github.com:Polidea/react-native-ble-plx.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by Polidea

            RxAndroidBle

            by PolideaJava

            RxBluetoothKit

            by PolideaSwift

            SiriusObfuscator

            by PolideaC++

            Cockpit

            by PolideaKotlin