BTLE | Bluetooth Low Energy packet sniffer | Networking library

 by   JiaoXianjun C Version: v0.2 License: Apache-2.0

kandi X-RAY | BTLE Summary

kandi X-RAY | BTLE Summary

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

Bluetooth Low Energy (BLE) packet sniffer and transmitter for both standard and non standard (raw bit) based on Software Defined Radio (SDR).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              BTLE has a low active ecosystem.
              It has 553 star(s) with 119 fork(s). There are 49 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 11 open issues and 12 have been closed. On average issues are closed in 920 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of BTLE is v0.2

            kandi-Quality Quality

              BTLE has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              BTLE 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

              BTLE releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            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 BTLE
            Get all kandi verified functions for this library.

            BTLE Key Features

            No Key Features are available at this moment for BTLE.

            BTLE Examples and Code Snippets

            No Code Snippets are available at this moment for BTLE.

            Community Discussions

            QUESTION

            I want to pair my Android device to a beacon or other BTLE device, and if I move my device too far away from that beacon, lock the screen or send msg
            Asked 2021-Dec-06 at 21:27

            I have Android devices mounted on vehicles in a manufacturing facility, and I'd like to deter people from removing them from one vehicle and moving it to another vehicle, but also still allow it (long story, but instead of physically locking the device to the vehicle with a cable or other device I'm looking to make it more inconvenient than impossible...). I was thinking if I mounted a Bluetooth low energy BTLE device or beacon of some sort to the vehicle in some inaccessible location, then pair my Android device to that beacon, my device would be allowed to work as long as it 'saw' that beacon. If someone were to move the device to another vehicle, it wouldn't see the beacon and would have to be 'paired' to the new vehicle, supplying a reason why it had to be moved, etc. Is BTLE/beacon the right technology for this or is there something better?

            ...

            ANSWER

            Answered 2021-Dec-06 at 21:27

            Such a solution is possible with BLE beacons but has some implementation challenges. I have seen beacons used successfully in similar use cases like automatic workstation locking, contact tracing, virtual tethering of demo phones, and convention audience counting.

            • BLE has a range of about 30-40 meters, longer with clear line of sight. If the Android devices is moved from one vehicle to another that are within 40 meters of each other, the original beacon will probably still be visible.

            • You may be able to address the above issue with a "closest beacon" strategy, meaning that you consider whatever is seen as closest beacon above a certain signal threshold to be the vehicle the device is on or in.

            • If you use a battery-powered beacon, you can mount it anywhere, but battery life will typically be limited to a year or less.

            • A plugged-in beacon will never run out of power, but requires a USB supply, and AC outlet, or a DC supply like a car cigarette lighter port. This limits where you can hide it.

            As you mention, there are other solutions aside from BLE like physical tether. But it is not inappropriate to consider BLE as it is widely used for similar proximity measurement applications.

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

            QUESTION

            A way to apply Kalman filtering on each BLE device separately using python
            Asked 2021-Dec-06 at 06:30

            I am trying to get filtered RSSI values of each BLE beacon using Kalman filtering. I cannot use a single instance of kalman filtering on all BLE devices, how to map or assign a instance of kalman filter for each BLE device. I know it has something to do with maps but cannot figure out how to implement it. Any help would be much appreciated.

            ...

            ANSWER

            Answered 2021-Dec-06 at 06:30

            I don't think map is the correct solution for this problem. An instance of the filter stored in a dictionary and keyed by the device address would seem a better solution. For example:

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

            QUESTION

            blupy read value from chacteristics as integer and not as ascii
            Asked 2021-Aug-26 at 14:22

            I use the bluepy module to connect to an Arduino board with BLE running a battery monitor.

            My Python script is working perfectly fine. I get the values I expect. But I do not like the solution because the binary value read from the characteristic is interpreted as an ASCII character before getting the decimal representation of that ASCII character.

            I tried to use the binascii module

            ...

            ANSWER

            Answered 2021-Aug-26 at 14:22

            The characteristic read is returning bytes e.g b'/'. If you want to convert that into an integer then the int.from_bytes() functionality is useful. e.g:

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

            QUESTION

            Web Bluetooth with Password
            Asked 2021-Jul-29 at 05:34

            Is it possible to connect to a bluetooth device that supports Bluetooth 4.0 LE but has a password.

            I can connect to the device from an iphone and print (which only supports BTLE) but when I try and connect from chrome (OSX) / web-bluetooth it does not prompt me for a password. I can return a device using:

            ...

            ANSWER

            Answered 2021-Jul-27 at 18:17

            Can you get device.gatt.connect() to resolve on Android?

            Your best bet to solve your issue would be to file a Chromium bug by following instructions at https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs

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

            QUESTION

            mutableStateOf does not update in MainActivity
            Asked 2021-Apr-15 at 10:04

            I have a Bluetooth LE scan running which filters for specific Devices. This works fine and I see that the devices get actually added to my list. But it doesn't trigger anything on my MainActivity. Here is a snipped from the relevant code (it does work similar to a normal scanCallback from BTLE):

            ...

            ANSWER

            Answered 2021-Apr-15 at 09:18

            you need use param MutableState>, not MutableList - xxx.value.

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

            QUESTION

            BTLE characteristic value has too many bytes
            Asked 2021-Feb-20 at 21:44

            I'm trying to read data from the BTLE fitness machine service, specifically the Indoor Bike Data characteristic.

            A typical reading I'm getting has the bytes 44-02-9c-09-5c-00-4f-00-50. The first two are flags which indicate that the rest of the bytes represent, in order:

            • Instantaneous cadence (uint16)
            • Instantaneous power (sint16)
            • Heart rate (uint8)

            The trouble is, that only accounts for 5 more bytes, but there are 7 more bytes in the value. It looks like 5c-00 is cadence, 00-4f is power, and 50 is heart rate, but

            • I don't know what the 9c-09 represents, but more importantly,
            • I don't know how to reliably read this characteristic if it's going to send me data that the flags field says is not present.

            What do I need to do to parse these bytes correctly? In this specific case I could maybe skip those two bytes, but that won't be reliable over different device manufacturers.

            Update: FWIW I don't think it was correct to mark this as a duplicate. I was able to parse the bytes, the problem was that the result appeared to contradict the fitness machine spec. The accepted answer clarified that.

            ...

            ANSWER

            Answered 2021-Feb-18 at 02:56

            The 9c-09 value is instantaneous speed, which is present (counterintuitively) if the first flag bit is 0. See Fitness Machine Service spec, section 4.9.1.1.

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

            QUESTION

            BLE communication between two Raspberry Pi 4
            Asked 2021-Feb-01 at 15:59

            I am collecting pressure sensor data from 4 Arduino Nano 33 ble to a raspberry pi 4. I am able to receive the data from all the sensors. Now, I want to send this received data to another Raspberry Pi 4 using BLE communication in real-time such that the first Raspberry Pi acts as a repeater. I searched but could not find a suitable approach or solution to implement this. The first Raspberry Pi could act as a peripheral/client sending all the received sensor data and the second raspberry pi could act as a central/server to receive all the sensor data which can be further displayed on web interfaces or stored in a database.

            I tried connecting initially with one Arduino and sending its data over raspberry Pi. I have written the code for Raspberry Pi Client and Server using Bluedot library in Python.

            Raspberry Pi 4 Client code

            ...

            ANSWER

            Answered 2021-Feb-01 at 15:59

            Found the solution.

            Create the client once outside the while loop and then the data transfer happens.

            updated loop function.

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

            QUESTION

            BluePy Frequent BLE Disconnects between Raspberry Pi4 and ESP32 - (Bluetooth)
            Asked 2020-Dec-19 at 15:34

            I (like others) have multiple disconnects between a RPi4 central(client) and ESP32 BLE peripheral(server). Using the "nRF Connect" app on a android phone, the connection to the ESP32 is robust. However, RPi4 - ESP32 BLE communication is VERY unstable. This finding implies the fault is with the RPi and/or code. The initial BLE connection occurs faithfully but the connection inevitably drops after a random number of successful reads (usually 1-50 reads). I am using BluePy 1.3.0 with a new Raspbian image on a RPI4. I attached skeleton code and the error message produced after a random number of successful Reads.

            ...

            ANSWER

            Answered 2020-Dec-19 at 15:34

            There are a large number of things it could be but there a couple areas that I would investigate.

            Firstly there is a bit churn going on with Bluetooth firmware on the RPi at the moment as you can see from this thread: https://github.com/RPi-Distro/firmware-nonfree/issues/8

            So I would check that you are up to date with with those.

            BluePy I believe has a bluepy-helper module which is based on Bluez version 5.47 which is behind what the RPi is using now. Might be worth trying a different library to see if the issue persists.

            Here is an example of reading your characteristic with the BlueZ D-Bus API directly using pydbus for the python D-Bus bindings:

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

            QUESTION

            Updating jquery with realtime sensor data through flask
            Asked 2020-Dec-15 at 11:27

            I am trying to send realtime data from a sensor through flask to the front-end through jquery. Right now my script uses setInterval(..., 1000); to update the data through a ajax request.

            However, I would like to update the jquery request when new sensordata is received from flask, as the framerate from the sensor differ and its hard to set a specific interval to make it realtime.

            Is it possible to use some kind of signal in the jquery code when new data is sent through @app.route('/data')?

            Python script:

            ...

            ANSWER

            Answered 2020-Dec-15 at 11:27

            For realtime data, use 'text/event-stream' MIME type

            return Response(generate_random_data(), mimetype='text/event-stream')

            or yield a server-side event (i used this type with the below snippet)

            Here is part of a front-end snippet i used:

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

            QUESTION

            Proper way to wait for iOS Swift CBPeripheralDelegate to complete?
            Asked 2020-Sep-07 at 23:54

            When doing Bluetooth communications one is often placed in a situation where one does a call which gets a response in a delegate, for example the characteristic discovery shown below:

            ...

            ANSWER

            Answered 2020-Sep-07 at 22:23

            First of all, if you already have an implementation with CountDownLatch for Android, you may just do the same implementation for iOS. Yes, Swift doesn't have a built-in CountDownLatch, but nice folks from Uber created a good implementation.

            Another option is to rely on a variable, like you do, but make it atomic. There are various implementations available online, including one in the same Uber library. Another example is in RxSwift library. There are many other variations. Atomic variable will provide a thread-safety to variable's read/write operations.

            But probably the most swifty way is to have a DispatchGroup. Will look something like this:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install BTLE

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries