USB Midi System Exclusive Message not recognized

USB Midi System Exclusive Message not recognized

Postby DaveOLW » Mon Aug 28, 2017 8:07 am

USB Midi System Exclusive Message "0xF0" not recognized.

I have created a USB Midi Controller using a 18F4550 pic together with a VB Visual Studio 2010 Programme.
Most of it works fine I can send and receive both ways by using the Status byte commands
0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6,. These are all Short Messages
( 4 bytes) but I want to be able to send Long messages ( 64 Bytes ) the status Command to start a Long
message is 0xF0 then the Data and 0xF7 at the end.
The 0xF0 is not recognized, I thought it was my VB programme that was wrong but it is not because I
have tried it with MidiOX and that reports "wrong format", I tried it with a Midi monitor and did not
work. The data shown on a USB Analyser is correct. So it must be the data from the 18F4550 that is
the problem, although all the other Status bytes work ok. I have seen some talk about the "0" (zero)
of 0xF0 being Null or about Unicode but cannot solve this. Have tried sending Hex, Binary, Decimal and
Text.
Does anyone have any ideas? Thank you for any help.

David
Attachments
USBa1.png
USB Analyser
USBa1.png (6.67 KiB) Viewed 6609 times
USBa2.png
USB Analyser
USBa2.png (19.35 KiB) Viewed 6609 times
DJSdm.png
Device Manager
DJSdm.png (19.82 KiB) Viewed 6609 times
DaveOLW
 
Posts: 3
Joined: Mon Aug 28, 2017 7:46 am
PIC experience: Professional 1+ years with MCHP products

Re: USB Midi System Exclusive Message not recognized

Postby jtemples » Wed Aug 30, 2017 7:16 pm

Is the problem sending a 64-byte packet to the PIC? Is the PIC's USB descriptor configured for 64-byte packets?
jtemples
Verified identity
 
Posts: 195
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: USB Midi System Exclusive Message not recognized

Postby DaveOLW » Wed Aug 30, 2017 7:50 pm

The problem is the Pic sends 64-byte packet as you can see by the USB Analyser but the PC (Windows) callback function does not recognise it as a long message even though it starts with F0 and ends with F7 as required. Yes the descriptor is configured for 64-byte packets.
DaveOLW
 
Posts: 3
Joined: Mon Aug 28, 2017 7:46 am
PIC experience: Professional 1+ years with MCHP products

Re: USB Midi System Exclusive Message not recognized

Postby jtemples » Wed Aug 30, 2017 8:06 pm

I don't know anything about MIDI, but the capture you show starts with 04, not F0. If you're seeing the correct bytes coming from the PIC, I'm not sure why you're suspecting a problem with the PIC. And I also vaguely remember that Windows inserts an extra byte at the beginning of a received HID packet before it's delivered to the application, is that being handled?
jtemples
Verified identity
 
Posts: 195
Joined: Sun May 25, 2014 2:23 am
Location: The 805
PIC experience: Professional 5+ years with MCHP products

Re: USB Midi System Exclusive Message not recognized

Postby DaveOLW » Wed Aug 30, 2017 8:46 pm

According to Midi Spec the first byte should be zero, I have tried this, viewing the USB output from commercial products that work they send this 04 then the F0.
DaveOLW
 
Posts: 3
Joined: Mon Aug 28, 2017 7:46 am
PIC experience: Professional 1+ years with MCHP products


Return to USB

Who is online

Users browsing this forum: No registered users and 0 guests

cron