在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):50ButtonsEach/fliclib-linux-hci开源软件地址(OpenSource Url):https://github.com/50ButtonsEach/fliclib-linux-hci开源编程语言(OpenSource Language):HTML 57.8%开源软件介绍(OpenSource Introduction):Flic SDK for LinuxWith this SDK you can connect to and interact with Flic buttons. PbF, Flic 1 as well as Flic 2 buttons are supported. Previous SDKPreviously we had an implementation for Linux that made use of the Bluez bluetooth stack. There were several complications however about that one. The first is that all the BLE functionality is marked as experimental, meaning you have to compile and run a specialized version of Bluez. The other one is that there are breakages between different Bluez versions. The third reason is that we find many things unintuitive and problematic with their current BLE implementation that currently makes it unusable for the Flic concept. Therefore we have decided to change to a new approach. High level descriptionThis library is built on top of the HCI_CHANNEL_USER capability of the Linux kernel. This gives the library an exclusive access to directly access the bluetooth controller, which means no Bluetooth stack (like Bluez) is needed on the host side. This way we can (hopefully) guarantee stability compared to other solutions but also optimize the protocol to only exchange the packets that are needed for the Flic buttons to communicate. The downside however is that you will not be able to use that dedicated bluetooth controller for other bluetooth connections, such as streaming audio. If you need to use bluetooth for something else, you can always plug in an extra bluetooth dongle and dedicate that for Flic instead. The library consists of a client - server solution. The server is a software that runs and interacts with the bluetooth controller to connect to Flic buttons. Client programs can connect to this server using a simple well-documented API over a TCP socket to scan and connect Flic buttons and get their button events. What's included
Supported platformsBinaries and libraries has been compiled for x86_64, i386 and armv6l. The minimum Linux kernel supported is 3.13. All code has been compiled and tested on Ubuntu 15.10 for desktop and Raspbian Jessy. This means it should be compatible with desktop systems and Raspberry Pi 1, 2 & 3. I have tried to make the binaries as portable as possible. If you have compiled your own kernel you must make sure to include support for Bluetooth. In kernel config, enable at least Networking support -> Bluetooth subsystem support -> Bluetooth device drivers -> HCI USB driver and HCI UART driver. Bluetooth controllersAll Bluetooth controllers with support for Bluetooth 4.0 and Bluetooth Low Energy (Bluetooth Smart) that have Linux support should work. Generally small cheap USB dongles seem to have shorter range than those integrated inside computers. We have tested compatibility with some common Bluetooth controllers. The following devices have been tested and confirmed: Plugable USB Bluetooth 4.0 Low Energy Micro Adapter / Asus USB-BT400 (Broadcom BCM20702 Bluetooth 4.0)
Cambridge Silicon Radio CSR8510 A10 based controllers (Bluetooth 4.0)
Raspberry Pi 3 model B (Broadcom BCM43438 Bluetooth 4.1)
Intel Centrino Advanced-N 6235 (Bluetooth 4.0)
Intel Wireless 7260 (Bluetooth 4.0)
IMC Networks Atheros AR3012 Bluetooth (Bluetooth 4.0)
Sena Technologies Parani-UD100-G03 (Cambridge Silicon Radio, Bluetooth 4.0)
Quick startPackagesThere are no dependencies except the standard C/C++ libraries, which should be installed by default on most Linux distributions. RunningIt might be a good idea to disable a currently running bluez daemon (bluetoothd) to avoid interference, although not necessary. To see if it's running, run The server process needs to have access to the Bluetooth HCI channel. There are two ways to get this. Either run the daemon as root or give the process permissions by executing Now start the daemon in one terminal by executing In another terminal open the simpleclient directory, compile it with make and run with You can also try out the websocket example. Run both the daemon and the websocket proxy. Then open up the client html page. Usage of flicd
TroubleshootingTo see the available HCI available bluetooth controllers, run the You can also use run DocumentationThe full specification for the protocol that is used to talk to the server deamon can be found in ProtocolDocumentation.md. Documentation for the Java implementation is included as javadoc. FeedbackBe sure to post a Github issue if you find a bug, something you don't like or if something is wrong or should be changed. You can also submit a Pull request if you have a ready improvement. LicenseTo allow for easy integration, we have released the source code and documentation under CC0. The flicd binary is released under a separate license which allows you to use it almost without restrictions. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论