GithubHelp home page GithubHelp logo

ftonello / bluez Goto Github PK

View Code? Open in Web Editor NEW
32.0 9.0 15.0 20.91 MB

Clone of mainline BlueZ to implement MIDI over BLE protocol

License: GNU General Public License v2.0

Makefile 0.51% C 96.80% Shell 0.01% C++ 0.53% Objective-C 0.01% Python 1.95% M4 0.18%

bluez's Introduction

BlueZ - Bluetooth protocol stack for Linux
******************************************

Copyright (C) 2000-2001  Qualcomm Incorporated
Copyright (C) 2002-2003  Maxim Krasnyansky <[email protected]>
Copyright (C) 2002-2010  Marcel Holtmann <[email protected]>


MIDI over BLE
=============

Read more about the project at:
* http://blog.felipetonello.com/2015/12/14/midi-over-bluetooth-low-energy-on-linux/
* https://www.marc.info/?l=linux-bluetooth&m=144368891120651&w=4

This branch[1] is under heavy development, so don't assume that things will not
break or the histry log will not change, because it will!

The idea is that most MIDI related commits will be squashed and cleaned-up.

[1] https://github.com/ftonello/bluez/

Compilation and installation
============================

In order to compile Bluetooth utilities you need following software packages:
	- GCC compiler
	- GLib library
	- D-Bus library
	- udev library (optional)
	- readline (command line clients)

To configure run:
	./configure --prefix=/usr --mandir=/usr/share/man \
				--sysconfdir=/etc --localstatedir=/var

Configure automatically searches for all required components and packages.

To compile and install run:
	make && make install


Configuration and options
=========================

For a working system, certain configuration options need to be enabled:

	--enable-library

		Enable installation of Bluetooth library

		By default the Bluetooth library is no longer installed.

		The user interfaces or command line utilities do not
		require an installed Bluetooth library anymore. This
		option is provided for legacy third party applications
		that still depend on the library.

		When the library installation is enabled, it is a good
		idea to use a separate bluez-library or libbluetooth
		package for it.

	--disable-tools

		Disable support for Bluetooth utilities

		By default the Bluetooth utilities are built and also
		installed. For production systems the tools are not
		needed and this option allows to disable them to save
		build time and disk space.

		When the tools are selected, it is a good idea to
		use a separate bluez-tools package for them.

	--disable-cups

		Disable support for CUPS printer backend

		By default the printer backend for CUPS is build and
		also installed. For systems that do not require printing
		over Bluetooth, this options allows to disable it.

		When the CUPS backend is selected, it is a good idea to
		use a separate bluez-cups package for it.

	--disable-monitor

		Disable support for the Bluetooth monitor utility

		By default the monitor utility is enabled. It provides
		support for HCI level tracing and debugging. For systems
		that don't require any kind of tracing or debugging
		capabilities, this options allows to disable it.

		The monitor utility should be placed in the main package
		along with the daemons. It is universally useful.

	--disable-client

		Disable support for the command line client

		By default the command line client is enabled and uses the
		readline library. For specific systems where BlueZ is
		configured by other means, the command line client can be
		disabled and the dependency on readline is removed.

		The client should be placed in the main package along
		with the daemons. It is universally useful.

	--disable-systemd

		Disable integration with systemd

		By default the integration with systemd is enabled and
		installed. This gives the best integration into all
		distributions based on systemd.

		This option is provided for distributions that do not
		support systemd. In that case all integration with the
		init system is up to the package.

	--disable-a2dp

		Disable A2DP profile

		By default bluetoothd supports A2DP profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		audio capabilities.

	--disable-avrcp

		Disable AVRCP profile

		By default bluetoothd supports AVRCP profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		audio capabilities.

	--disable-network

		Disable PANU, NAP, GN profiles

		By default bluetoothd supports PANU, NAP and GN profile using a
		built-in plugin, this option disables it.

		This option is provided for distributions that do not have any
		network capabilities.

	--disable-hid

		Disable HID profile

		By default bluetoothd supports HID profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		input capabilities.

	--disable-hog

		Disable HoG profile

		By default bluetoothd supports HoG profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		input capabilities.

	--enable-testing

		Enable testing tools

		By default tools used only for testing emulation are disabled.
		This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. These tools may contain tests that depend on specific
		environment or kernel features in development.

	--enable-experimental

		Enable experimental tools

		By default all tools that are still in development
		are disabled. This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. The behavior of the experimental tools is unstable
		and might still change.

	--enable-deprecated

		Enable deprecated tools

		By defauld all tools that are no longer maintained are
		disabled. This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. The behavior of the deprecated tools may be unstable
		or simply don't work anymore.

	--enable-nfc

		This option enable NFC pairing support.

		By default the integration with neard is disabled, this gives
		the option to enable it in system where neard is supported.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-sap

		This option enable SAP profile using sap plugin.

		By default sap plugin is disabled since it requires tight
		integration with systems and is very rarely required.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-health

		This option enable health profiles.

		By default health plugin is disabled since its profiles are
		target for the health industry.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-midi

		This option enable MIDI support via ALSA Sequencer.

		By default midi plugin is disabled since it still considered
		experimental. When bluetoothd will create a new ALSA Sequencer
		client and port for each device connected that supports the
		MIDI GATT primary service.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

Information
===========

Mailing lists:
	[email protected]

For additional information about the project visit BlueZ web site:
	http://www.bluez.org

bluez's People

Contributors

andrzej-kaczmarek avatar 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 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bluez's Issues

How to use?

First off thanks for the work you are doing here :)

I am a little confused on to make this work (currently working on command line only - and still very new to this)

I compiled/install your version of bluez and I have connected to a BLE peripheral via gatttool and can see data from the peripheral being sent. However I'm lost on this next stage on how this becomes a midi device in alsa? I'm sure I'm missing something fundamental but I would appreciate your help

Thanks
Andrew

ubuntu package - Question about experimental staus of midi

Hi there,

The distribution won't --enable-midi until this feature comes out of 'experimental' status upstream

https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1713017

So I was just wondering if you already had some plans about that, or further requirement for testing, or whatever else that is stopping this from happening upstream. Thank you.

Please also go comment on the launchpad bug, if / when you have anything further to add about this matter. Thank you.

In the meantime, until (until it's officially supported), for anybody else here are the steps for recompiling the packages on ubuntu (source):

# ======
# install bluetooth midi bluez

# build package dependancies
sudo apt install -y build-essential debhelper fakeroot wget dh-autoreconf flex bison libdbus-glib-1-dev libglib2.0-dev libcap-ng-dev udev libudev-dev libreadline-dev libical-dev check dh-systemd libebook1.2-dev libasound2-dev

# get currently installed version of bluez on this system
_ubuntu_version="$(apt show bluez 2>&1 | grep -i "version: " | cut -d" " -f2)"
_upstream_version="$(echo "$_ubuntu_version" | cut -d- -f1)"

# get apt source archive from launchpad
mkdir -p ~/.dev/bluez-midi-ubuntu && cd ~/.dev/bluez-midi-ubuntu
wget https://launchpad.net/ubuntu/+archive/primary/+files/bluez_${_upstream_version}.orig.tar.xz
wget https://launchpad.net/ubuntu/+archive/primary/+files/bluez_${_ubuntu_version}.debian.tar.xz
ls -l

# unpack upstream version
tar xJf bluez_${_upstream_version}.orig.tar.xz
cd bluez-${_upstream_version}

# unpack ubuntu dist over the top
tar xJf ../bluez_${_ubuntu_version}.debian.tar.xz

# to enable midi compiler flag when running ./configure
sed -i 's/\(--enable-usb\)/\1 --enable-midi/' debian/rules

# build packages
dpkg-buildpackage -rfakeroot -b
cd ..

# install packages
sudo dpkg -i bluez*.deb libbluetooth*.deb
sudo service bluetooth restart

Bluetooth midi: lag on the first note.

I have noticed this and sincerely I am not 100% sure it's a bluez problem or one of the many Roland problems,
but I have setup a linux box to act as a bluetooth midi piano and everything works using alsa aconnect and fluidsynth;
the problem I have noticed is that the latency is pretty decent when playing but if I stop playing for a few seconds, the first note I play after the pause is lagged very noticeably.

My idea:
no matter if it's bluez or Roland's fault, but is it possible to continuosly send a "NOP" sysex or mute note to the source as a keep-alive?

BLE Midi Peripheral

Hello! First of all thank you for all your great work! I have this up and running on an embedded ARM system and am able to connect to and send MIDI to BLE MIDI devices. However, the midi device is only created when i connect to something that is a BLE midi device.

My device has the ability of creating midi data, so I have the need to make my system a BLE midi device and be able to connect to it from and iOS app or similar and stream the created midi data. I saw on your blog that the peripheral role is something that still needs completed. Do you have any advice for me of how to go about getting this to work? It seems like all the functionality is done in that i can send the MIDI data out no problem, but what is missing is the ability to essentially advertise as a BLE Midi device and allow the connection to be instantiated from something such as an iOS app.

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.