Giter Site home page Giter Site logo

radiusnetworks / bluez Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 38.0 20.3 MB

Fork of BlueZ, the Bluetooth protocol stack for Linux

Home Page: http://www.bluez.org/

License: GNU General Public License v2.0

Makefile 0.21% C 97.71% Shell 0.01% C++ 0.13% Objective-C 0.01% Python 1.92%

bluez's People

Contributors

armansito avatar bharatpanda avatar bulislaw avatar chanten avatar colorant avatar deymo avatar edrzmr avatar filippog avatar finikorg avatar forrest-zhao avatar gowthamab avatar hadess avatar holtmann avatar izabela48 avatar jcaden avatar kolodgrz avatar lkslawek avatar lucasdemarchi avatar marcinkraglak avatar michalskir avatar padovan avatar rveerama1 avatar sancane avatar sdemario avatar sjanc avatar syamsidhardh avatar tyszkjak avatar ulissesf avatar vcgomes avatar vudentz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bluez's Issues

Question about the adapter "Pairable" parameter

What kind of Pairing does Bluez support?

I see in doc/adapter-api.txt there is a parameter listed:

  boolean Pairable [readwrite]

  	Switch an adapter to pairable or non-pairable. This is
  	a global setting and should only be used by the
  	settings application.

And from what I've read of BLE security there are three pairing methods: Just Works, Out of Band (OOB), and Passkey.

Does setting Bluez "Pairable" to true enable all three methods? Just one of the methods? Does a user have to do something else to enable the other methods?

Strange L2CAP messages

I am receiving data from 2 or more devices connected at the same time and I'm receiving these unexpected start frame and unexpected continuation messages. What do these messages mean? The packages have more than 23 bytes.

> ACL Data RX: Handle 2 flags 0x01 dlen 1                                                                    #781 [hci0] 8.721663
      ATT: Handle Value Notification (0x1b) len 23
        Handle: 0x001e
          Data: c45a73056005a505b8058105f2049d049804e704cd
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #782 [hci0] 8.726915
      ATT: Handle Value Notification (0x1b) len 22
        Handle: 0x001e
          Data: 4968cf04c404c50404055c05be05e605c6057c05
> ACL Data RX: Handle 4 flags 0x02 dlen 27                                                                   #783 [hci0] 8.730683
> ACL Data RX: Handle 1 flags 0x01 dlen 1                                                                    #784 [hci0] 8.731699
      ATT: Handle Value Notification (0x1b) len 23
        Handle: 0x001e
          Data: 3478e404e604eb04f204fd04070515052205320526
> ACL Data RX: Handle 1 flags 0x02 dlen 27                                                                   #785 [hci0] 8.732359
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #786 [hci0] 8.734383
        unexpected start frame
        17 00 04 00 1b 1e 00 4a 68 39 05 3e 05 94 05 e8  .......Jh9.>....
        05 c3 05 54 05 2e 05 49 05 6b 05                 ...T...I.k.     
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #787 [hci0] 8.735056
      ATT: Handle Value Notification (0x1b) len 22
        Handle: 0x001e
          Data: 4b6872056a06700746086408d2074e074b07de06
> ACL Data RX: Handle 4 flags 0x01 dlen 1                                                                    #788 [hci0] 8.737955
        unexpected continuation
        43                                               C               
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #789 [hci0] 8.741921
      ATT: Handle Value Notification (0x1b) len 22
        Handle: 0x001e
          Data: 4c68c7051a05cf05db067b07b107ad070f079306
> ACL Data RX: Handle 1 flags 0x01 dlen 1                                                                    #790 [hci0] 8.742955
        unexpected continuation
        5a                                               Z               
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #791 [hci0] 8.749445
      ATT: Handle Value Notification (0x1b) len 22
        Handle: 0x001e
          Data: 4d6862069306360706087108e807dc06e5055e05
> ACL Data RX: Handle 3 flags 0x02 dlen 27                                                                   #792 [hci0] 8.750094
      ATT: Handle Value Notification (0x1b) len 22

Question about the attribute "Class" in Device API


		uint32 Class [readonly, optional]

			The Bluetooth class of device of the remote device.

After the adapter has started discovery, different paths to device object are generated. But none of them has the Class Attribute. I would like to know in what condition and in what way I can always obtain the Class in my device object?

I am using python with pydbus to communicate with the dbus api.

Thanks in advance.

Trying to Run example-advertise.py and example-gatt-server.py on Raspberry Pi

Hello,

Not sure if this is the right place to post this, but I'm running into an issue with running these example scripts, am looking for some advice.

To preface: I'm running tests with my home computer running Ubuntu and python 2.7 in the hopes of having my code run on a Raspberry Pi 3. I am trying to advertise using BLE and add custom services and characteristics in the hopes of connecting to an iPhone. I've installed Bluez Version 5.42 on both devices as well as dbus-python. My computer and raspberry pi both are able to advertise using the hci0 lescan 0 command, but I'm hoping to start advertising with your example scripts.

Home Computer - Kernal version 4.4.0-31 generic
I'm able to create custom characteristics and advertise by running example-gatt-server.py and example-advertise.py with no issues on my home computer. The one snag I had was I needed to enable Bluez experimental mode by adding --experimental to the bluetooth.service file located in /lib/systemd/system/bluetooth.service. Also installing the dbus-python library was a bit of a pain, as I had to build and install it myself for python2.

The advertise.py script looks for a specific advertising interface called "org.bluez.LEAdvertisingManager1". The gatt-server.py script looks for "org.bluez.GattManager1". I can check if that interface exists by running the following command:

dbus-send --system --dest=org.bluez --print-reply / org.freedesktop.DBus.ObjectManager.GetManagedObjects

These interfaces are found and work fine on my home computer. The scripts run without issue.

Raspberry Pi - Kernal version 4.4.38-v7+
With the exact bluez version and the experimental features enabled, I run into this error when trying to run advertise.py - LEAdvertisingManager1 interface not found. But when I execute the command "systemctl status bluetooth" it shows the experimental flag is enabled, so it can't be that.

When I try to run the gatt-server.py script, I get the following error: Failed to register service: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

What do I need to change in the Raspberry Pi environment in order to have those services enabled?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.