This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Faster respond for midi application ?

I am using nrf52 , it's always connected to an iPhone, and I need a truly real time respond. I am sending short messages, like 2 characters at a time, and play a sound on the phone according to the messages( e.g "A","B")

Right now, it's fast but not enough for , lets say, play music, there is a 80-150ms delay from when I push the button , till I get the data on the phone, so if you would like to play a song it would be slowly.

Is sending new data every time via characteristic is the right way to go ? or is there another way like doing it without connection, and updating advertising data only ?

How you get the fastest respond for very short messages? what you usually do in these cases ?

Thanx

  • That's not true, you can use GAP Broadcaster/Peripheral API since certain iOS version so you can do the opposite scenario. To the MIDI: is there any "solution" working with iOS which has lower latency then 30ms? I guess you can use that trick with HID device service and piggy back on lower connection interval (to go below 15ms) or completely reverse the flow and go even to theoretical minimum of 7.5ms. It should be pretty easy to reverse engineer: purchase or borrow the device you like and sniff with nRF51 DK sniffer the protocol. You will see connection interval used, what GATT features it uses etc.

  • I know there are tones of midi controllers for iPhone, so there probably is some way. Not sure I understood your explanation on how to achieve faster speed on regular BLE, but I am using the iOS API for a long time, and other then few parameters I never saw something that can be related to speed or advertising interval(only in iBeacon). I will keep reading to understand your suggestion.

  • There are not many ways from iOS app side, what is possible to "force" or "trick" the protocol from the other side. If you have control over the other side of the link (e.g. if it is embedded device running your FW) you can try what I've suggested: pretend to be HID device, ask for lower connection interval after iOS connects with these 30ms. If this doesn't work another option is to let iOS advertise and connect from the other side. I hope these are at least three things you could try;) Good luck

  • Thanks, obviously i am using nrf52, so if HID is faster, I am not sure why i have to cheat, I can just use HID because according to Google it is faster for some reason (maybe because there is no direct connection? only updates of advertising data?)

    BTW- examples for BLE devices are simply the Apple wireless keyboard that connects to my iPad, and works flowlessly in real time, same goes for the remote track pad.

  • OK, I will amend my answer to elaborate more on these "cheating" and "forcing" options;)

Related