bluetooth-le | Capacitor plugin for Bluetooth Low Energy

 by   capacitor-community TypeScript Version: v3.0.0 License: MIT

kandi X-RAY | bluetooth-le Summary

kandi X-RAY | bluetooth-le Summary

bluetooth-le is a TypeScript library typically used in Networking applications. bluetooth-le has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This is a Capacitor plugin for Bluetooth Low Energy. It supports the web, Android and iOS. The goal is to support the same features on all platforms. Therefore the Web Bluetooth API is taken as a guidline for what features to implement.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              bluetooth-le has a low active ecosystem.
              It has 176 star(s) with 60 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 14 open issues and 156 have been closed. On average issues are closed in 70 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of bluetooth-le is v3.0.0

            kandi-Quality Quality

              bluetooth-le has 0 bugs and 17 code smells.

            kandi-Security Security

              bluetooth-le has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              bluetooth-le code analysis shows 0 unresolved vulnerabilities.
              There are 2 security hotspots that need review.

            kandi-License License

              bluetooth-le is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              bluetooth-le releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1687 lines of code, 96 functions and 30 files.
              It has high 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 bluetooth-le
            Get all kandi verified functions for this library.

            bluetooth-le Key Features

            No Key Features are available at this moment for bluetooth-le.

            bluetooth-le Examples and Code Snippets

            No Code Snippets are available at this moment for bluetooth-le.

            Community Discussions

            QUESTION

            Get success or failure response from Bluetooth-le write
            Asked 2022-Mar-26 at 20:19

            I'm using the Bluetooth-LE community plugin in a Ionic React project.

            I'm writing a value to the GATT server with the following code:

            ...

            ANSWER

            Answered 2022-Mar-17 at 22:36

            I need to be able to set a flag variable to indicate whether the write was a success or failure. There is nothing in the docs to indicate how this can be done.

            You linked/shared right what the docs say is returned.

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

            QUESTION

            How to get a response from the async write function in capacitor-community / bluetooth-le
            Asked 2022-Mar-18 at 01:42

            I'm working with an ESP32 chip and am trying to create an Android app (using Ionic) which allows user to send wifi credentials to the ESP32 chip via BLE. I'd like to be able to update the status of the wifi sending process for the user in the UI (which I'm developing using Angular and then converting it to an Android webapp using Ionic). To do this, I'm also using the capacitor-community/bluetooth-le library.

            Can anyone explain to me what this.queue does in the async write function (code shown below) does? I thought this function returns a response from a remote BLE device after writing to a GATT characteristic, but I get absolutely nothing at all for a response.

            ...

            ANSWER

            Answered 2022-Mar-18 at 01:42

            Here's how I'm using BleClient.write to transmit information to a BLE device (recipient):

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

            QUESTION

            Xamarin Plugin.BLE why data read doesn't change?
            Asked 2021-Oct-28 at 07:45

            I'm stuck with this task about reading some data from my BLE Device.

            I have a HM-19 DSD Tech Bluetooth LE module on my target machine, and I want communicate with it with my smartphone.

            I'm using Xamarin with Plugin.BLE to try to achieve this.

            There is my BluetoothPage.xaml.cs code

            ...

            ANSWER

            Answered 2021-Oct-27 at 10:03

            BLE communication can be a pain particularly with Xamarin.

            In any case asynchronous calls from your application may return before data has actually been sent to your end device. This is due to several factors:

            1. Operating system BLE driver behaviour - Any call that you make in your application code is handled by the operating system drivers. These may return before any data is actually handled by the BLE hardware.
            2. BLE transport layer delays - BLE transmission of data is not instant. The data connection between two devices actually occurs within discrete time slots, between which the BLE transceiver is turned off to save power.
            3. End device response time.

            Most implementations of two way communication between devices using BLE use a minimum of two characteristics, one for data being sent and the other for data being received by a device e.g. device 1 receives data on the characteristic that device 2 sends on and vice versa. ​This avoids the possibility of any collision of data being sent by both parties.

            You could try placing a delay in your code prior to polling for characteristic data and see if that helps, but its not an optimal solution.

            I see that you are using your characteristic "anonymously", rather than using its uuid to select it. If the Bluetooth service supports more than one characteristic then you will need to use the uuid to ensure that you are using the correct one. The list of characteristics, much like the list of services and devices may not be returned in the same order whenever you request them.

            You have the option of polling characteristics by reading them on a timed basis or setting up handlers for characteristic notification/indication events if the characteristic supports it and your BLE device uses that mechanism to show that data is ready.

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

            QUESTION

            Ionic Bluetooth plugin
            Asked 2021-Feb-16 at 12:42

            I need to connect my app to a BLE device (not another smartphone). I'm searching for a bluetooth ionic plugin and I saw that there are three of them but I don't understand the differences very well. There are some resources / tutorials about ionic bluetooth plugins that can help understand these?

            https://ionicframework.com/docs/native/ble

            https://ionicframework.com/docs/native/bluetooth-le

            https://ionicframework.com/docs/native/bluetooth-serial -> is to be used only to connect to an Arduino device right?

            Thank you

            ...

            ANSWER

            Answered 2021-Feb-16 at 12:42
            • ble: Only allows Connecting to a peripheral. You will find examples on their Github page
            • bluetooth-le: Also enables your device to become a peripheral itself. The description states it

            covers most of the API methods available on Android and iOS

            They also offer help and examples on Github

            • bluetooth-serial: This is not a plugin for Bluetooth Low Energy (BLE) but for Bluetooth Classic.

            You need to select the most fitting plugin for your application

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

            QUESTION

            Android BLE, scan started, finds devices but does not connect with filter (ESP32 & Samsung)
            Asked 2020-Oct-28 at 21:30

            I have been working through several BLE tutorials to develop an app to connect to an ESP32, but I cannot get the code to connect to the ESP32. I am using a Samsung phone which requires a time delay, but I have tried other phones and still cannot connect the ESP32 to the mobile app.

            If I run a BLE scanner app I can connect to the ESP32, so I believe the ESP32 side is okay. If we scan for devices we can see it in the bluetooth device list.

            The code is setup to detect and connect, I have tried a UUID and device name filer, but it will not connect. The ScanCallback is been triggered and we get the function onBatchScanResults been called, so we can see a list of devices but it will not connect to the ESP32. I think it should connect automatically with the gatt functions.

            I cannot workout why it will not auto connect to the ESP32, as it's seen the devices and the scan connect is been trigged. Any help would be highly appreciated to fix this issue, as I have ran out of idea to fix it.

            ...

            ANSWER

            Answered 2020-Oct-28 at 20:28

            From the logs I see "found something 2" is logged in onBatchScanResults() method of ScanCallback. You should handle this event. Call the same connectGatt which is used in onScanResult() method.

            When device connection successful in order to read messages from device you should subscribe to services and setCharacteristicNotification for PROPERTY_NOTIFY type characteristics.

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

            QUESTION

            Queue Ble Android send only on time
            Asked 2020-Sep-15 at 22:09

            I worked on a Ble peripheral, I used a queue from this article to send data, but it works only one time.

            I received a request from Central after a successful connection with the value "0301" then in the same characterstic I set the data (ssid) and I notify it, so right now everything works fine, and the app (peropheral) stop receiving request.

            ...

            ANSWER

            Answered 2020-Sep-15 at 21:52

            QUESTION

            Transfer Data Using BLE with same application with in different android device
            Asked 2020-Apr-20 at 17:28

            I need to transfer data from android phone to each other through my application using BLE. When a device comes near to me and my application is already installed in it, So my phone will establish a connection and send some data in strings and also receive from that device without notify user. Is it possible to do with BLE and I have studied BLE from

            https://developer.android.com/guide/topics/connectivity/bluetooth-le

            But I am new so I dont know from where to start and what should i have to do? Kindly let me know about BLE more easy for my better understanding and refer me some tutorials where I can learn that how will fulfill my application functionalities.

            Thanks

            ...

            ANSWER

            Answered 2020-Apr-20 at 17:28

            I suggest starting with the Central-Peripheral example. Here you have an simple application:

            https://github.com/itanbp/android-ble-peripheral-central

            And tutorial with basis:

            https://www.bignerdranch.com/blog/bluetooth-low-energy-on-android-part-1/

            In the case you described, if there are not defined roles for the android phones (master, slave), the program will have to work in alternately in two modes: central and peripheral.

            This is possible form the BLE side. However, there may be a problem with the application wroking as a background service. Since Android 8 there are new restrictions and limitations in background sericves:

            https://developer.android.com/about/versions/oreo/background

            Bluetooth Low Energy on Adnroid is very troublesome technology. A lot depends on the version of Android, processor and antenna system of the phone.

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

            QUESTION

            Xaramin Forms iOS application crashes at startup
            Asked 2020-Apr-19 at 11:11

            I have been fighting a bug for a few days now. I have been looking everywhere on a solution to this. I am at my end on what I can do.

            Basically, my iOS app is crashing on startup. I am getting a SIGABT fault code with an error: FIXME: ftnptr_arg page trampolines. I will attach a copy of the crash report below. I found some posts that are a little similar to my issue on this site:

            Got a SIGABRT while executing native code xamarin.ios

            SIGABRT error after last Xamarin.iOS update

            Xamarin IOS app crashes with exception: EXC_BAD_ACCESS (SIGABRT)

            and on GitHub: https://github.com/mono/mono/issues/9871

            I have tried these solutions and they do not work for me. I would also like to add that I am using the Bluetooth on the device. I did add the correct permissions in the Info.plist file. The Bluetooth library that I am using is Plugin.BLE: https://github.com/xabre/xamarin-bluetooth-le

            Anyways, the crash is happening on a page that does not access the bluetooth device. It is happening on a log in page (which is the first page that is displayed to the user). I do not think that the issue is related to the bluetooth. Like I said previously, I am pretty much at the end of what I can do. Not sure what is going on. Has anyone else out there ran into the issue?

            Additional Note:

            I would like to also add that I am able to debug the initialization of the form and step through the code without it crashing. I only have 3 functions. One for initialization, another for when the form appears, and a third for when a button is pressed. I can step through the code on the first 2 functions. After the program executes these two, the app crashes. I know that it is not an issue with my code because the same code runs fine on Android.

            Also, I would create a minimalist code to post, however, the app includes a number of pictures and graphics that I think would be too large to post here. And I do not think that the issue is related to the code that I wrote. As said above, the code runs fine on Android.

            Crash debug report:

            ...

            ANSWER

            Answered 2020-Apr-16 at 15:45

            OK so for now the answer that I used to solve this was that I changed iPhones. I was running on a iPhone 5C. Now doing an iPhone SE (Not the 2020 model).

            For now, this will be the answer. However, I will leave the question open as I would like to know why the code did not execute on the iPhone 5C.

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

            QUESTION

            Ionic blank screen from plugin import
            Asked 2020-Mar-06 at 14:47

            I am trying to build a BLE provisioning app using Ionic and the BluetoothLE plugin. But, when I import the plugin, it gives me a blank screen. I've updated to ionic 5 and everything is up to date. I'm trying to build it through the usb debugging mode on android studio. And it works fine until I add the import statement.

            I'm importing it the way the docs have it import { BluetoothLE } from '@ionic-native/bluetooth-le/ngx';

            The plugin is installed properly and it is recognized as something to import. But for some reason it just bricks the app.

            here's the package-lock.json:

            ...

            ANSWER

            Answered 2020-Mar-06 at 14:47

            It's not documented anywhere that I could find. And maybe that's because I'm new to Ionic and this is common knowledge (I feel like anything like this in software should never be considered common knowledge) but when using a plugin, you need to import the plugin into app.module.ts and add it under providers like so:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install bluetooth-le

            You can download it from GitHub.

            Support

            Note: web support depends on the browser, see implementation status.
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/capacitor-community/bluetooth-le.git

          • CLI

            gh repo clone capacitor-community/bluetooth-le

          • sshUrl

            git@github.com:capacitor-community/bluetooth-le.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 TypeScript Libraries

            developer-roadmap

            by kamranahmedse

            vscode

            by microsoft

            angular

            by angular

            TypeScript

            by microsoft

            ant-design

            by ant-design

            Try Top Libraries by capacitor-community

            barcode-scanner

            by capacitor-communityJava

            sqlite

            by capacitor-communitySwift

            electron

            by capacitor-communityTypeScript

            react-hooks

            by capacitor-communityTypeScript

            fcm

            by capacitor-communityTypeScript