Open hselasky opened 1 year ago
First, the "midi.c" is part of "lehid" tool and it will work if you invoke it with the BT address of BLE MIDI device. And BLE MIDI device requires encrypted path per the specification. To pairing, you may want to use "lepair" tool. "lepair ${BTPUBADDR}" or "lepair -r ${BTRNDADDR}" will do pairing. If pin is required, pin input will prompted. Then add the "hcsecd.conf" entry in "lesecd" directory. I updated the "lepair" tool to genarete "hcsecd.conf" entry some hours ago. Then startup "lesecd" with background and invoke "lehid" with -s option to wait for encryption setup done before start operation. i.e. "lehid -s ${BTPUBADDR} or "lehid -s -r ${BTRNDADDR}"
I would like to extract some device description. Do you have any advice?
I wrote a fix for MIDI notify buffer interpretation in blemidi-parsefix branch.
https://www.midi.org/specifications-old/item/bluetooth-le-midi
To implement, I wrote a state machine.
I put some comments there.
I based my parsing on this code: https://github.com/sparkfun/MIDI-BLE-Adapter/blob/master/ble-to-din/ble-to-din.ino
Which also claims to follow the MIDI BLE specification, but is much simpler? Am I wrong?
This drops timestamp completely. And do not handle SysEx message in multiple packet case, and do not handle running status with timestamp, it seems. Though there may be much simpler way.
I see. Timestamps are not used for anything at the moment, but that doesn't mean we shouldn't parse them. As time permits I'll have a look at your code and pull it into my patchset and test it.
Hi,
I want to implement support for BLE MIDI interfaces under FreeBSD.
Probably it makes most sense to create an ALSA client using the alsa-seq-server daemon, for Bluetooth only.
I want that pairing using default keys like 0000 or 1234 is done behind the scenes automagically.
I see there is a midi.c example at https://github.com/takawata/FreeBSD-BLE/blob/master/lehid/midi.c , but what is the state of this code and how shall it be used? Do all BLE MIDI device traffic have to go through the same daemon?
--HPS