lathoub / Arduino-BLE-MIDI

MIDI over Bluetooth Low Energy (BLE-MIDI) 1.0 for Arduino
MIT License
219 stars 33 forks source link

Client for BLEMIDI #30

Closed RobertoHE closed 3 years ago

RobertoHE commented 3 years ago

Hi.

I have code a transport layer for ble client. It allows to connect with a MIDI server or an other server created with this lib.

The lib is based on nimBLE client code and use the same methods that any BLE server of this lib.

The main different between client and server methods is in read(). Read() is used to scan and connect to a server too. Read() must be called for attemp a connection with a server or to start a scan for search one. It is explained in the example code.

You can connect to a specific server typing the name or address server in BLEMIDI_CREATE_INSTANCE() name field. If you use BLEMIDI_CREATE_DEFAULT_INSTANCE() or name field is empty (equal to ""), it will connect to the first BLE MIDI server that it will be found.

I tested the code in arduino framework in VS platformio and Arduino IDE, with a ESP32-dev like client and a Roland AX-Edge like server, and it works perfectly.

The security between devices was define like bond without paring and no_IO_caps. Because this, all security functionalities aren't tested propertly yet.

Some opctions related with security are set like define in .h . In future, they must be editable by Settings.

RobertoHE commented 3 years ago

Hi @lathoub I have added the last changes of client mode and I have updated the parser (see the other pull request before).

Check it, please.

RobertoHE commented 3 years ago

The conflict file is removed one. Previous client isn't work. If you want a "easy-merge", I can add the file again.

lathoub commented 3 years ago

I can't resolve the conflict - this PR also modified transport.h and so does PR #34 Please restrict this PR to the client for ESP32 nd PR #34 to the updated parser

(thanks for the helps, I believe we made some great progess)

RobertoHE commented 3 years ago

I can't resolve the conflict - this PR also modified transport.h and so does PR #34 Please restrict this PR to the client for ESP32 nd PR #34 to the updated parser

(thanks for the helps, I believe we made some great progess)

I undone the changes in transport.h Changes of parser are commited only in #34

lathoub commented 3 years ago

unable to merge (even using command line) - i suggest to close this PR and open a new one, with the latest MidiBle_Client.ino and BLEMIDI_Client_ESP32.h

RobertoHE commented 3 years ago

I have added the previous client, that not worked propietly. It is added only for resolve conflicts in pull-request. After merge, I recommend remove the old client.

lathoub commented 3 years ago

Thank you @RobertoHE