0

BLE MIDI with Feather Bluefruit nRF52
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Mon Jun 15, 2020 1:14 pm

Hey!! total noob here!!! Just was having some ideas about making midi devices that work over bluetooth and this seemed like a great start!!

I wired up the board and connected it it to my comp over USB, however, my computer doesn't seem to realize that the board is there.

I have the Arduino IDE updated to 1.8, the board flashes when it is connected to power.

When I try to give it compiled code, I get an error saying:

"Upgrading target on COM4 with DFU package C:\Users\13154\AppData\Local\Temp\arduino_build_928274\blinky.ino.zip. Flow control is disabled, Single bank, Touch disabled
Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: Attempting to use a port that is not open
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 235, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 203, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 155, in send_init_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 241, in send_packet
File "site-packages\serial\serialwin32.py", line 304, in write
serial.serialutil.SerialException: Attempting to use a port that is not open

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode."

recommendations?? Thank you!!

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by mikeysklar on Mon Jun 15, 2020 2:30 pm

Hi harrymcd391,

Which version of the Arduino IDE are you running? You had mentioned 1.8, but you must be at 1.8.6 or higher for the nRF52 Bluefruit.

https://learn.adafruit.com/bluefruit-nr ... -bsp-setup

nRF52 support requires at least Arduino IDE version 1.8.6! Please make sure you have an up to date version before proceeding with this guide!


Are you on a windows system?

Are you using a known good DATA USB cable?

mikeysklar
 
Posts: 2880
Joined: Mon Aug 01, 2016 8:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Mon Jun 15, 2020 4:49 pm

Hey! thanks for the speedy response!

Yeah I am on Arduino IDE version 1.8.12 (which is after 1.8.6?).

I am using a windows system!

I most likely do not have a good DATA USB cable, it belonged to a bluetooth speaker of mine!

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by mikeysklar on Mon Jun 15, 2020 7:14 pm

I'm a little skeptical of your cable, but let's assume that is a good on for now.

Based on the FAQ you are probably experiencing an issue with the nRF52 bootloader.

https://learn.adafruit.com/bluefruit-nr ... guide/faqs

You will need to upload the bootloader on your nRF52. More info below.

https://learn.adafruit.com/bluefruit-nr ... memory-map
https://learn.adafruit.com/bluefruit-nr ... bootloader

what should I do when Arduino failed to upload sketch to my Feather ?

If you get this error:

Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 235, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 203, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 155, in send_init_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 243, in send_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 282, in get_ack_nr
nordicsemi.exceptions.NordicSemiException: No data received on serial port. Not able to proceed.
This is probably caused by the bootloader version mismatched on your feather and installed BSP. Due to the difference in flash layout (more details) and Softdevice API (which is bundled with bootloader), sketch built with selected bootloader can only upload to board having the same version. In short, you need to upgrade/burn bootloader to match on your Feather, follow above Update The Bootloader guide
It only has to be done once to update your Feather

mikeysklar
 
Posts: 2880
Joined: Mon Aug 01, 2016 8:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Tue Jun 16, 2020 9:46 am

Following the bootloader page exactly, I get this error message!

Upgrading target on COM4 with DFU package C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.1\bootloader\feather_nrf52832\feather_nrf52832_bootloader-0.3.2_s132_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200
Touched serial port COM4
Opened serial port COM4
Starting DFU upgrade of type 3, SoftDevice size: 147792, bootloader size: 20428, application size: 0
Sending DFU start packet
Timed out waiting for acknowledgement from device.
Sending DFU init packet

Failed to upgrade target. Error is: Attempting to use a port that is not open
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 226, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 203, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 155, in send_init_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 241, in send_packet
File "site-packages\serial\serialwin32.py", line 304, in write
serial.serialutil.SerialException: Attempting to use a port that is not open

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by mikeysklar on Tue Jun 16, 2020 2:03 pm

harrymcd391,

Is it possible you have selected the wrong bootloader for your feather?

There are a few different options.

https://learn.adafruit.com/bluefruit-nr ... memory-map

BSP release & Bootloader version
The memory usage depends on the version of the Softdevice and/or bootloader (single/dual bank). Following is the Bootloader and Softdevice version included with BSP release
- 0.9.x :nRF52832 S132 v6.1.1 single bank andnRF52840 S140 v6.1.1 single bank
- 0.8.x :nRF52832 S132 v2.0.1 dual banks and S132 v5.1.0 dual banks
- 0.7.x and older:nRF52832 S132 v2.0.1 dual banks

mikeysklar
 
Posts: 2880
Joined: Mon Aug 01, 2016 8:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Tue Jun 16, 2020 4:27 pm

I only have one option for the bootloader once I select my board.

Once I select the "Adafruit feather nRF52832"

the only available bootloader is the "0.3.2 softDevice s132 6.1.1"

I did install the adafruit nRF52 package version 0.20.1, if I should be using an earlier version let me know!

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Thu Jun 18, 2020 9:28 am

bump

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by ctclown on Fri Jun 19, 2020 4:39 pm

Hi

I am trying to make the BLE Midi controller as well. I hooked up the board and have problems when I try to load the Sketch.
When I try to load the board the only choice I get is "Adafruit Feather nRF52832" The word "Bluefruit" is not part of the board name and the word "Feather" is not in the same place as the tutorial's .
I have tried this on both a Mac and PC and both have the different name.
In the "BLE MIDI Controller" tutorial, the name for the board is "Adafruit Bluefruit nRF52832 Feather"
Dose anyone think this could be the problem? and if so dose the sketch have to be changed or is there a problem with the name being different?

I included a screen shot so you can see the tutorial's choice and the only choice I have.

Thanks
Cory
Attachments
Screen Shot 2020-06-19 at 3.01.55 PM.jpg
Screen Shot 2020-06-19 at 3.01.55 PM.jpg (957.01 KiB) Viewed 96 times

ctclown
 
Posts: 42
Joined: Mon Jan 06, 2014 11:46 am

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Sun Jul 05, 2020 1:43 pm

Hey, hoping for some more response here folks!! It's been awhile!

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by mikeysklar on Mon Jul 06, 2020 1:08 pm

Hi harrymcd391,

We are going to have to go back to your cable issue here as we can't go farther until we know you have a good USB DATA cable.

Are you able to plugin another microcontroller or USB device that gets mounted or detected by your systems device manager?

mikeysklar
 
Posts: 2880
Joined: Mon Aug 01, 2016 8:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Mon Jul 20, 2020 9:25 pm

Hey!

I just picked up a new USB and ensured that it could send data. So I'm good on that front now!

I still however cannot burn a bootloader to this board! I think the error message has changed slightly now though.

Here it is:

Upgrading target on COM4 with DFU package C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.1\bootloader\feather_nrf52832\feather_nrf52832_bootloader-0.3.2_s132_6.1.1.zip. Flow control is disabled, Dual bank, Touch 1200
Touched serial port COM4
Opened serial port COM4
Starting DFU upgrade of type 3, SoftDevice size: 147792, bootloader size: 20428, application size: 0
Sending DFU start packet
Timed out waiting for acknowledgement from device.
Sending DFU init packet

Failed to upgrade target. Error is: Attempting to use a port that is not open
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 294, in serial
File "nordicsemi\dfu\dfu.py", line 226, in dfu_send_images
File "nordicsemi\dfu\dfu.py", line 203, in _dfu_send_image
File "nordicsemi\dfu\dfu_transport_serial.py", line 155, in send_init_packet
File "nordicsemi\dfu\dfu_transport_serial.py", line 241, in send_packet
File "site-packages\serial\serialwin32.py", line 304, in write
serial.serialutil.SerialException: Attempting to use a port that is not open

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.



Let me know whats up!! I'm very excited to get a few projects going on this board!!

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Tue Jul 21, 2020 2:24 pm

Ok, so I didn't originally do a great job soldering the board! I resoldered the GND pin and DFU pin, and found that both pins were soldered too poorly to force DFU on start up!

However! The same problem still occurs, though now I'm certain im in DFU mode.

The other pins aren't necessarily soldered well, would I need to make a solid connection on another pin in order to use the bootloader?

the error is nearly the same however it now says:

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.


Recommendations?

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by mikeysklar on Wed Jul 22, 2020 12:32 pm

This still sounds like a possible soldering issue. Can you upload some good quality images of your board, connections and soldering?

mikeysklar
 
Posts: 2880
Joined: Mon Aug 01, 2016 8:10 pm

Re: BLE MIDI with Feather Bluefruit nRF52

by harrymcd391 on Sun Jul 26, 2020 3:32 pm

Okay!! Resoldered the board and almost everything is working well now!!

I now I have the same problem as cory!!

When following the BLE midi controller, I get an error when I copy and paste their code into the IDE.

Error compiling to board Adafruit Feather nRF52832
In file included from C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.h:307,
from C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.5\libraries\Bluefruit52Lib\src\services\BLEMidi.cpp:42:
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendRealTime(midi::MidiType) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]':
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.h:118:39: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendActiveSensing() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:725:9: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:706:30: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.5\libraries\Bluefruit52Lib\src\services\BLEMidi.cpp:210:64: required from here
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:505:28: error: 'class BLEMidi' has no member named 'beginTransmission'
505 | if (mTransport.beginTransmission(inType))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:508:28: error: 'class BLEMidi' has no member named 'endTransmission'
508 | mTransport.endTransmission();
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::send(midi::MidiType, midi::DataByte, midi::DataByte, midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::DataByte = unsigned char; midi::Channel = unsigned char]':
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:1416:17: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:774:5: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:706:30: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.5\libraries\Bluefruit52Lib\src\services\BLEMidi.cpp:210:64: required from here
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:180:24: error: 'class BLEMidi' has no member named 'beginTransmission'
180 | if (mTransport.beginTransmission(inType))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:204:24: error: 'class BLEMidi' has no member named 'endTransmission'
204 | mTransport.endTransmission();
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendSysEx(unsigned int, const byte*, bool) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; byte = unsigned char]':
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:1464:17: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:774:5: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:706:30: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.5\libraries\Bluefruit52Lib\src\services\BLEMidi.cpp:210:64: required from here
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:363:20: error: 'class BLEMidi' has no member named 'beginTransmission'
363 | if (mTransport.beginTransmission(MidiType::SystemExclusiveStart))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:374:20: error: 'class BLEMidi' has no member named 'endTransmission'
374 | mTransport.endTransmission();
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendCommon(midi::MidiType, unsigned int) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]':
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:432:5: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendSongSelect(midi::DataByte) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::DataByte = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:1468:17: required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:774:5: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:706:30: required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
C:\Users\13154\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.20.5\libraries\Bluefruit52Lib\src\services\BLEMidi.cpp:210:64: required from here
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:457:20: error: 'class BLEMidi' has no member named 'beginTransmission'
457 | if (mTransport.beginTransmission(inType))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\13154\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:477:20: error: 'class BLEMidi' has no member named 'endTransmission'
477 | mTransport.endTransmission();
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
exit status 1
Error compiling for board Adafruit Feather nRF52832.


Could this be avoided somehow?? will read through the code and try to make a version myself.
Would be nice to get some help with this.

@ctclown did you fix your problem??

harrymcd391
 
Posts: 10
Joined: Mon Jun 15, 2020 1:10 pm

Please be positive and constructive with your questions and comments.