Multitasking with TUSB2036 Hub IC interfaced with Arduino Mega ADK

Hello,

At the moment, I am engaged in operating a flash drive, a Dot matrix printer and a keyboard using Hub IC which in turn interfaced with Arduino Mega ADK. I have declared in the following form:

USB Usb;
USBHub Hub(&Usb);

HIDBoot<HID_PROTOCOL_KEYBOARD> HidKeyboard(&Usb); ------->Keyboard
KbdRptParser Prs;

BulkOnly bulk(&Usb); ---------->Flash drive
UsbFat key1(&bulk);
FatFile file;
File file2;
File file3;

USBH_MIDI Midi(&Usb);-----------> Printer

what I have observed is keyboard and flash drive interfacing is working fine, but the printer is not responding.

rcode1 = Midi.SendRawData(PRINTER_CLEAR_COMMAND_LEN, (uint8_t*)byte_array);

if(rcode1)
{
Serial.println("rcode1 Failed");
return;
}else{
Serial.println("Issued the clear command.");
}

//delay(200);
return;

when I have called the printer to function, it is indicating "rcode1 Failed".(USB_Host_Shield_2.0 on Github).

I am requesting you to please help me in this regard.

Thank You,
Vamshi

USBH_MIDI Midi(&Usb);-----------> Printer

Do you actually own a printer that talks MIDI?

No, I am using EPSON LQ-310 Dot matrix printer.

As it works based on bulk transfer, I used MIDI library files to trigger the printer.

Also printer alone works fine with MIDI libraries.

I am requesting you to please help me in this regard.

Post a complete wiring diagram and your complete code.
Also describe what you're trying to achieve.