Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

How to send MIDI over BLE (ESP32) ?



I want to send MIDI commands over BLE using MongooseOS and ESP32. MIDI is forming from button press and potentiometer rotation.

What I've got:

I'm using bt-common lib, because this library doesn't work. I've established GATTS with proper Service uuid ("03b80e5a-ede8-4b33-a751-6ce34ec4c700") and Characteristic uuid ("7772e5db-3868-4112-a1a9-f2669d106bf3") and to give it "Notify, Read and Write without response" I changed standart mongoose bt-common library ( because there were no "Write without response" option. Also I'm using GATT.SEC_LEVEL_AUTH and mos.yml config with "bt.gatts.min_sec_level", 1 and "bt.gatts.require_pairing", true

Problem. 1

Looking in JS API I see only option to send string over BLE, but I need to send something like:

uint8_t midiPacket[] = {
   0x80,  // header
   0x80,  // timestamp, not implemented 
   0x00,  // status
   0x3c,  // 0x3c == 60 == middle c
   0x00   // velocity

Can I use current JS API to send something like this?

If I not than there is other problem: I can't even find MongooseOS C/C++ API to send uint8_t[]. Is there one?

Problem. 2

My Mac still doesn't want to see this midi controller without using special app called "LightBlue". So firstly I need to find ESP in LightBlue and only after that it shows up in "Audio MIDI setup". What can be a problem? I can't even understand what to search.


  • Here is example of code using ESP-IDF and arduino-esp32

    I'm trying it right now with PlatformIO, want to see how it works, BUT my main goal is to create good MIDI BLE library for Mongoose

  • Problem. 2. Understood

    You can see on screenshot that device called ESP32 MIDI Example have special attr Complete list of 128-bit Service UUIDs and that's the reason how Mac and other devices can figure out that this is MIDI device.

    ! BUT, the problem is that I can't find how can I configure this prop in MongooseOS.
    Maybe it must be in esp_ble_adv_data_t, but I'm not shure

    Can somebody help, how can I add this kind of attribute to advertisement data?

  • alanralanr Argentina
    Same oroblem
  • nliviunliviu Romania

    This forum has moved to:
    Please post your questions there.

Sign In or Register to comment.