I have two Seeed XIAO nRF52840 Sense devices. One is running ble_midi_simplein.py from examples and second one (client) runs following code that is sending messages:
import sys
import os
import time
import adafruit_ble
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble_midi import MIDIService
ble = BLERadio()
while True:
while ble.connected and any(
MIDIService in connection for connection in ble.connections
):
for connection in ble.connections:
if MIDIService not in connection:
continue
midi_service = connection[MIDIService]
midi = adafruit_midi.MIDI(midi_out=midi_service, out_channel=0, debug=True)
midi.send(NoteOn(20, 99))
time.sleep(0.5)
midi.send(NoteOff(20, 99))
time.sleep(0.5)
time.sleep(1)
print("disconnected, scanning")
for advertisement in ble.start_scan(ProvideServicesAdvertisement, timeout=1):
if MIDIService not in advertisement.services:
continue
ble.connect(advertisement)
print("connected")
break
ble.stop_scan()
However the server (ble_midi_simplein.py) does not show any received messages.
Connection is established and MIDI messages seem to be sent, but never received.
If I send MIDI messages from my phone, the server receives it.
I have two Seeed XIAO nRF52840 Sense devices. One is running ble_midi_simplein.py from examples and second one (client) runs following code that is sending messages:
However the server (ble_midi_simplein.py) does not show any received messages.
Connection is established and MIDI messages seem to be sent, but never received.
If I send MIDI messages from my phone, the server receives it.
CircuitPython version 8.0.4