Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

blemidi + circuit playground bluefruit not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

blemidi + circuit playground bluefruit not working

by michael_krzyzaniak on Tue Jan 14, 2020 2:49 pm

I recently purchased this: https://www.adafruit.com/product/4333. It is an amazing product and I am really excited about it. I compiled and uploaded the blemidi example, described here: https://learn.adafruit.com/bluefruit-nr ... de/blemidi

The code compiled and uploaded, and on my laptop (Mac OSX Mojave 10.14.6 and another macbook with Sierra 10.13.6), I can use AudioMidiSetup to connect to the bluetooth midi device. I can also see the device in my DAWs (Reaper, Max/MSP, etc..), and select it as a MIDI input device. However, the device never sends any MIDI messages. In the firmware, Bluefruit.connected() returns true (after connecting in AudioMidiSetup), however, blemidi.notifyEnabled() never returns true. Glancing at the source code, in bluefruit.h, I am guessing that _conn_handle retains the value BLE_CONN_HANDLE_INVALID, perhaps due to something around line 891, but that is just a guess.

Either way, I'm not sure if this is an error, or if I am supposed to do something else to put the device in the enabled state.

michael_krzyzaniak
 
Posts: 2
Joined: Mon Nov 04, 2019 4:32 pm

Re: blemidi + circuit playground bluefruit not working

by adafruit_support_mike on Wed Jan 15, 2020 5:48 am

Try adding some Serial.print() statements down toward the end of the code to make the device's state more obvious:

Code: Select all | TOGGLE FULL SIZE
void midiRead()
{
  // Don't continue if we aren't connected.
  if (! Bluefruit.connected()) {
    return;
  }
 
  // Don't continue if the connected device isn't ready to receive messages.
  if (! blemidi.notifyEnabled()) {
    return;
  }
 
  // read any new MIDI messages
  MIDI.read();
}
The same conditions are tested at the top of loop(), so throw in some .print() statements there too.

adafruit_support_mike
 
Posts: 61443
Joined: Thu Feb 11, 2010 2:51 pm

Re: blemidi + circuit playground bluefruit not working

by michael_krzyzaniak on Thu Jan 16, 2020 2:02 am

Thanks for your reply. I did that -- at the top of loop(), I did something like

Code: Select all | TOGGLE FULL SIZE
void midiRead()
{
  // Don't continue if we aren't connected.
  if (! Bluefruit.connected()) {
    Serial.print("not connected\r\n");
    return;
  }
 
  // Don't continue if the connected device isn't ready to receive messages.
  if (! blemidi.notifyEnabled()) {
     Serial.print("not enabled\r\n");
    return;
  }


As expected, it printed "not connected" repeatedly until I connected my laptop to the board using the bluetooth pane in AudioMIDISetup (OSX). After doing that, it printed "Not Enabled" repeatedly. I'm not sure what I am supposed to do next in order to put it in the 'enabled' state.

michael_krzyzaniak
 
Posts: 2
Joined: Mon Nov 04, 2019 4:32 pm

Re: blemidi + circuit playground bluefruit not working

by adafruit_support_mike on Fri Jan 17, 2020 1:08 am

Hrm.. allowing notification is something that has to happen on the Mac's side of the connection, and should happen automatically.

In Audio MIDI Setup, open the MIDI Studio window, select the Circuit Playground's icon, then click the 'Show Device Info' button at the top of the window. What do you see there?

adafruit_support_mike
 
Posts: 61443
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.