Hypnotriod / midi-box-stm32

stm32 usb midi driver demo application
49 stars 6 forks source link

STM32WB55 SysEx Message #10

Closed Gabsepuez closed 6 months ago

Gabsepuez commented 6 months ago

Hello from Austria!

thank you for your work in this project, it helps me a lot!

I encounter a problem when i want to make a custom SysEx message about MIDI(or the midi protocol).

So when i send a normal Message, like Note ON or similar, everything works fine. But when i want to send the command 0xF0 for SysEx, the USB doesnt go to IDLE Mode.

I found out, that the DataInStage will be not called. So when i call the USBD_MIDI_DataInHandler hard coded, then it starts at least the transaction.

Here the part of the code

image

Do you know why,or what could i try?

regards

Gabsepuez commented 6 months ago

i downloaded the MidiViewer for Windows and there it seems that my program doesn't send a Midi SysEx Message.

Hypnotriod commented 6 months ago

Hi. Can you try to send full 64 bytes usb report with one message?

Gabsepuez commented 6 months ago

I tried different things now

1. image There i get something from the midi to the pc

Declaration of it: image

2. image There i get nothing.

Is there a special charakter for the SysEx message(without the beginning one) that must be part of it, that the midi interface recognize it?

Edit: I also recognized, that the midi won't send, until i send one Note On Message before. I looked up in that code, but make nothing different. I send there 4x8Bit. When i did this, i see also the data that comes from the a_cLogs(The logs, and not the start or end message from SysEx). Do i have to send there something else before?

Gabsepuez commented 6 months ago

When i set the first byte to 0x0F, i receive a message.

Is there any programm, where i can record/see all the midi/usb data?

Hypnotriod commented 6 months ago

I'm not familiar with System Exclusive messages, but as I understood - it should start with 0xF0 and end with 0xF7
Try to find some example of proper message and send it?
Maybe this monitoring software will do the trick (I haven't used it personally): MIDIMonitor
Try to debug...

Gabsepuez commented 6 months ago

Okay, after couple of hours debugging, i found out that according to the manual i have to send 0x04 first and then 0xF0 second and in the end 0xF7 There are couple of differences how many bytes you can send.

image So in my case, i send everytime 64Byte. I do a 0x04 and a 0xF0, then data and in the end the 0xF7.

Works perfectly for me now.

For everyone looking for a program to control the data RTMidi with sourcecode MidiView as normal application.

Thanks for your effort