Comments (5)
It looks that the author of the underlying NimBLE-library added a callback for scanned devices:
h2zero/NimBLE-Arduino#439
Maybe this could be a good starting point for implementing the requested functionality?
from arduino-ble-midi.
It looks that the author of the underlying NimBLE-library added a callback for scanned devices: h2zero/NimBLE-Arduino#439 Maybe this could be a good starting point for implementing the requested functionality?
Thank you. Now I need to learn how to use it. I am a beginner as far as Arduino programming is concerned.
What I would like to do is to press a button to discover and connect to a discovered device, and then always connect to that device, until I press the button at power ON to connect to another discovered device. So basically just finding a device and saving it somewhere.
from arduino-ble-midi.
I think that the new callback method for scanned devices will really simplify your project, as this callback invokes a piece of code (the respective callback method) when a BLE-MIDI service was found. In this callback method you can implement what should happen when a BLE-MIDI service was found. An alternative might be to connect to the first BLE-MIDI-service that is found, determine the name of the device and disconnect again when this is not the device of your choice. But this approach will only work if the next connection will target the next available BLE-MIDI device. Just give it a try ...
If the preferred BLE-MIDI device to be connected to should be kept even when the Arduino microcontroller is powered off than you need a special area where you store the device data persistently.
Some challenges are about to be mastered – but this is a lot of fun😉
from arduino-ble-midi.
I think that is what that web server code for connecting to a WiFi hotspot and then save it does. I think it saves in SPIFFS. This library could eventually do the same. The problem would be conflicts when using both of them? The other code also allows to flash the board over the air, which is cool. I tend to always use that method on the devices I build for myself. But as I said, I am a total beginner. :)
from arduino-ble-midi.
Client BLE needs to use the same method that the other transport layer (same functions names, same arguments in functions, etc.) to be compatible with the BLE Midi library. Because of this, it's not possible to add a new function adding a scanning result method.
On the other way, a develop branch exists that allow prints by console each midi server found
https://github.com/RobertoHE/Arduino-BLE-MIDI/tree/CustomSettings. This branch is actually under merge request to the main branch adding some configurable settings to MIDI BLE Client.
You can add #define MIDIBLECLIENTVERBOSE
before #include lib for enabling verbose of Client BLE. With this verbose, ESP32 prints by console every MIDI server that is finding in each scanner. It does not allow the use of the midi server found in the code, but you can have a reference for help.
from arduino-ble-midi.
Related Issues (20)
- Password when pairing. HOT 3
- esp32 BLE-Midi and BluetoothSerial in the same project HOT 2
- decuple from midi transport? HOT 1
- BLE MIDI Client, ESP32-S3, keeps sending serial when not connected HOT 5
- Midi steps audible when sending a stream of CC messages for volume control HOT 8
- BLE-MIDI client: Changes in NimBLE version 1.4.1 HOT 3
- Problem: BLEMIDI_CREATE_INSTANCE with custom names HOT 4
- Compatibility with Arduino GIGA (Arduino-mbed)
- Wrong channel number on polyphony?
- Renaming it Self and loosing connection if either Serial.begin() or Serial1.begin() is used
- Renaming it self and loosing connection if Serial1 or Serial is used.
- Active Sensing HOT 2
- BLE Client Problem with Adafruit TinyUSB HOT 2
- Error compiling on Nano 33 BLE HOT 1
- Trying to get bluetooth midi for Arduino Nano 33 BLE sense rev2 HOT 2
- Issue with Ableton and midi "feedback" HOT 6
- Can't compile anymore on arduino 2.3 - conversion from 'String' to non-scalar type 'std::string' HOT 3
- Bluetooth pairing for Arduino nano 33 BLE // auto connect with macOS HOT 5
- Data is “swallowed”...?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-ble-midi.