T3.6/T4.x USB Host Serial and maybe Serial Emulation...

KurtE

Senior Member+
[ Sort of place holder - will fill in more details later ]

The USBHost_t36 library works on T3.6 as well as T4 and T4.1

The library has support for several different USB USB devices like: FTDI, PL2303, CH341 as well as devices like other Teensy boards...

Would be good if I filled in details like which adapters we have tried...

Currently in the process of maybe also support the Teensy Serial Emulator HID class, as I am trying to debug a T4.1 with MTP USB type where it's debug data goes out through the SEREMU interface.

Again more details later.
 
Quick note: the SEREMU code is starting to work The code is currently up in the fork/branch: https://github.com/KurtE/USBHost_t36/tree/mtp_seremu

The test sketch for debug of MTP stuff has it's main loop doing:
Code:
char buffer[512];

void loop()
{
  if (emBlink > 500) {
    emBlink = 0;
    digitalToggleFast(13);
  }
  myusb.Task();
  CheckHostDevicesChanged();

  if (Serial.available()) {
    int ch = Serial.read(); // get the first char.
    Serial.print(ch);
    while (Serial.read() != -1) ;
  }
#if  defined(USB_TRIPLE_SERIAL) || defined(USB_DUAL_SERIAL)
  uint16_t avail;
  uint16_t avail_for_write;
  if ((avail = seremu.available())) {
    avail_for_write = SerialUSB1.availableForWrite();
    if (avail > avail_for_write) avail = avail_for_write;
    if (avail > sizeof(buffer)) avail = sizeof(buffer);
    seremu.readBytes(buffer, avail);
    SerialUSB1.write(buffer, avail);
  }

  if ((avail = SerialUSB1.available())) {
    avail_for_write = seremu.availableForWrite();
    if (avail > avail_for_write) avail = avail_for_write;
    if (avail > sizeof(buffer)) avail = sizeof(buffer);
    SerialUSB1.readBytes(buffer, avail);
    seremu.write(buffer, avail);
  }
#endif  

}
The code needs to test to make sure that seremu is connected... Will probably also update this code to handle the MTP with a Serial class as well, but it is nice right now that the Debug code running on the T4.1 plugged into another T4.1's USB port that the Serial stuff to and from that second Teensy is showing up on SerialUSB1 in another tab of TyCommander...

Note: the SEREMU class which is based off of RAWHID and the USBSerial code pointed out a bug in the current USBSerial code when you do a read operation it is getting the wrong byte... Will fix next.
 
Nice advance. There are devices used on bluetooth thread and there was the HDD/SSD/Flash Drive testing for file I/O, also the wired ethernet Dongle.

Having one base powered HOST Teensy with other devices 'Remote Teensy' sending in data to save to 'disk' or 'Bt' or other broadcast - or read from disk and send to other Teensy - etc.
 
Too many distractions :D Most of my own making.

As mentioned I have build a version of SEREMU processing for USBHost. Also found bug in USBSerial USBHost code which I should retest.

Been playing with the MTP USBHost test code... Which some parts are a real hack, But:

I have a T41 running the mtp-test with a few different logical disks and Serial Emulation, plugged into the other T4.1 running the USBHost code.
Some things are real hack. In that I am building node list which the sketch works with. And Now have it enumerating the top level objects of the different storages plugged in. Updated Branch/Fork mentioned above.

Again I know it is off topic, but the data from the MTP shows:
Code:
  driver 20006560
*** Device MTPD 16c0: 4d1 - connected ***
  manufacturer: Teensyduino
  product: Teensy MTP Disk
  Serial: 8597440
*** Device HID1 16c0: 4d1 - connected ***
  manufacturer: Teensyduino
  product: Teensy MTP Disk
  Serial: 8597440
*** HID Device seremu 16c0:4d1 - connected ***
  manufacturer: Teensyduino
  product: Teensy MTP Disk
  Serial: 8597440
    STD Version:64
    Vendor extesion ID:6
    MTP Version:64
    Extensions:microsoft.com: 1.0;
    Mode:0
    Operations: 1001 1002 1003 1004 1005 1007 1008 1009 100B 100C 100D 1014 1015 1019 101A 101B 9801 9802 9803 9804
    Events:
    Device Properties: D402
    Capture formats:
    Playback formats: 3000 3001
    Manufacturer:PJRC
    Model:Teensy
    Serial:1.54 / MTP 1.0
Get Storage IDS: 1 2 3 4 5 6 7

*** MPT connected ***
Connected to:Teensy
Count of Storages: 7
0(1): sdio() type:4 2 max:264289280, free: 205408768 access:0
1(2): RAM1() type:4 2 max:1998848, free: 1986560 access:0
2(3): RAM2() type:4 2 max:3999744, free: 911360 access:0
3(4): SLOW_RAM() type:4 2 max:1998848, free: 1994752 access:0
4(5): PROGM() type:4 2 max:983040, free: 974848 access:0
5(6): QSPI() type:4 2 max:16777216, free: 15007744 access:0
6(7): nand4() type:4 2 max:8388608, free: 4997120 access:0

========== sdio ===========
Annie_head.png(54) FMT:3000 Size:69245
Teensy-TTL-Level_converters.jpg(53) FMT:3000 Size:171220
LICENCE.broadcom(52) FMT:3000 Size:1594
fixup4x.dat(51) FMT:3000 Size:8419
fixup4db.dat(50) FMT:3000 Size:8417
fixup4cd.dat(49) FMT:3000 Size:3146
T4-Cardlike.jpg(48) FMT:3000 Size:340510
System Volume Information(47) FMT:3001 Size:4294967295
fixup4.dat(46) FMT:3000 Size:5405
start4x.elf(45) FMT:3000 Size:3031652
start4db.elf(44) FMT:3000 Size:3774532
start4cd.elf(43) FMT:3000 Size:816124
start4.elf(42) FMT:3000 Size:2272992
bootcode.bin(41) FMT:3000 Size:52480
fixup_x.dat(40) FMT:3000 Size:9818
fixup_db.dat(39) FMT:3000 Size:9820
fixup_cd.dat(38) FMT:3000 Size:2663
fixup.dat(37) FMT:3000 Size:6746
start_x.elf(36) FMT:3000 Size:3799144
start_db.elf(35) FMT:3000 Size:4861512
T4.1-Cardlike.jpg(34) FMT:3000 Size:393481
COPYING.linux(33) FMT:3000 Size:18693
bcm2711-rpi-4-b.dtb(32) FMT:3000 Size:41273
bcm2710-rpi-cm3.dtb(31) FMT:3000 Size:25426
bcm2710-rpi-3-b.dtb(30) FMT:3000 Size:26612
config.txt(29) FMT:3000 Size:1784
cmdline.txt(28) FMT:3000 Size:166
start.elf(27) FMT:3000 Size:2884708
start_cd.elf(26) FMT:3000 Size:694052
bcm2710-rpi-2-b.dtb(25) FMT:3000 Size:25571
bcm2709-rpi-2-b.dtb(24) FMT:3000 Size:25422
bcm2708-rpi-zero.dtb(23) FMT:3000 Size:23800
bcm2708-rpi-zero-w.dtb(22) FMT:3000 Size:24536
bcm2708-rpi-cm.dtb(21) FMT:3000 Size:23876
bcm2708-rpi-b.dtb(20) FMT:3000 Size:24095
DSC03361.JPG(19) FMT:3000 Size:3223767
IMG_1240.jpg(18) FMT:3000 Size:434010
issue.txt(17) FMT:3000 Size:145
zzz.jpg(16) FMT:3000 Size:265795
bcm2708-rpi-b-plus.dtb(15) FMT:3000 Size:24358
kernel8.img(14) FMT:3000 Size:13945344
kernel7l.img(13) FMT:3000 Size:5801056
test1.txt(12) FMT:3000 Size:21
bcm2710-rpi-3-b-plus.dtb(11) FMT:3000 Size:27231
kernel.img(10) FMT:3000 Size:5158072
mtpindex.dat(9) FMT:3000 Size:0
kernel7.img(8) FMT:3000 Size:5466824
overlays(7) FMT:3001 Size:4294967295

========== RAM1 ===========
test_9.txt(65) FMT:3000 Size:21
test_8.txt(64) FMT:3000 Size:21
test_7.txt(63) FMT:3000 Size:21
test_6.txt(62) FMT:3000 Size:21
test_5.txt(61) FMT:3000 Size:21
test_4.txt(60) FMT:3000 Size:21
test_3.txt(59) FMT:3000 Size:21
test_2.txt(58) FMT:3000 Size:21
test_1.txt(57) FMT:3000 Size:21
test_0.txt(56) FMT:3000 Size:21
Dir0(55) FMT:3001 Size:4294967295

========== RAM2 ===========
LargeFile.bin(66) FMT:3000 Size:3072000

========== SLOW_RAM ===========

========== PROGM ===========

========== QSPI ===========
zzz.txt(72) FMT:3000 Size:1024
ZZZ.txt(71) FMT:3000 Size:0
Sub-folder(70) FMT:3001 Size:4294967295
IMG_0287.jpg(69) FMT:3000 Size:341024
Foo.txt(68) FMT:3000 Size:1024
DSC03361.JPG(67) FMT:3000 Size:1028096

========== nand4 ===========
DSC03355.JPG(73) FMT:3000 Size:3373255

And the Second window showing debug information captured by SEREMU:

Code:
******usb_mtp_configure
MTP_test
SDIO Storage 0 254 sdio 264289280 58895872
SD Storage 1 10 sd1 failed or missing
RAM Storage 0 RAM1 1998848 4096
RAM Storage 1 RAM2 3999744 4096
Slow RAM Storage 0 SLOW_RAM 1998848 4096
Program Storage 0 PROGM 983040 8192
QSPI Storage 0 QSPI 16777216 1769472
SPIFlash Storage 0 3 nand1 failed or missing
SPIFlash Storage 1 4 nand2 failed or missing
SPIFlash Storage 2 5 nand3 failed or missing
SPIFlash Storage 3 6 nand4 8388608 3391488

**** dir of sd[0] ****
overlays/
kernel7.img
mtpindex.dat
kernel.img
bcm2710-rpi-3-b-plus.dtb
test1.txt
kernel7l.img
kernel8.img
bcm2708-rpi-b-plus.dtb
zzz.jpg
issue.txt
IMG_1240.jpg
DSC03361.JPG
bcm2708-rpi-b.dtb
bcm2708-rpi-cm.dtb
bcm2708-rpi-zero-w.dtb
bcm2708-rpi-zero.dtb
bcm2709-rpi-2-b.dtb
bcm2710-rpi-2-b.dtb
start_cd.elf
start.elf
cmdline.txt
config.txt
bcm2710-rpi-3-b.dtb
bcm2710-rpi-cm3.dtb
bcm2711-rpi-4-b.dtb
COPYING.linux
T4.1-Cardlike.jpg
start_db.elf
start_x.elf
fixup.dat
fixup_cd.dat
fixup_db.dat
fixup_x.dat
bootcode.bin
start4.elf
start4cd.elf
start4db.elf
start4x.elf
fixup4.dat
T4-Cardlike.jpg
fixup4cd.dat
fixup4db.dat
fixup4x.dat
LICENCE.broadcom
Teensy-TTL-Level_converters.jpg
Annie_head.png

Setup done
<< 512: 0C 00 00 00 01 00 01 10 00 00 00 00 73 BA FA 3D 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
1001 12 1 0: 
>> 00cb:  CB 00 00 00 02 00 01 10 00 00 00 00 64 00 06 00 00 00 64 00 14 6D 00 69 00 63 00 72 00 6F 00 73
>> 000c:  0C 00 00 00 03 00 01 20 00 00 00 00
<< 512: 10 00 00 00 01 00 02 10 00 00 00 00 2A 00 00 00 70 A4 54 05 7A B1 23 5B 28 30 73 12 E7 BB DB E3
1002 16 1 0:  2a
>> 0010:  10 00 00 00 03 00 01 20 00 00 00 00 2A 00 00 00
<< 512: 10 00 00 00 01 00 14 10 01 00 00 00 02 D4 00 00 80 96 95 96 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
1014 16 1 1:  d402
>> 0030:  30 00 00 00 02 00 14 10 01 00 00 00 02 D4 FF FF 00 07 54 00 65 00 65 00 6E 00 73 00 79 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 01 00 00 00 02 D4 00 00
<< 512: 0C 00 00 00 01 00 04 10 02 00 00 00 98 B7 7A B7 0D 32 64 A9 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
1004 12 1 2: 
>> 002c:  2C 00 00 00 02 00 04 10 02 00 00 00 07 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
>> 000c:  0C 00 00 00 03 00 01 20 02 00 00 00
<< 512: 10 00 00 00 01 00 05 10 03 00 00 00 01 00 00 00 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
1005 16 1 3:  1
>> 0032:  32 00 00 00 02 00 05 10 03 00 00 00 04 00 02 00 00 00 00 BC C0 0F 00 00 00 00 00 0E 3E 0C 00 00
>> 0010:  10 00 00 00 03 00 01 20 03 00 00 00 01 00 00 00
<< 512: 10 00 00 00 01 00 05 10 04 00 00 00 02 00 00 00 70 A4 54 05 7A B1 23 5B 28 30 73 12 E7 BB DB E3
1005 16 1 4:  2
>> 0032:  32 00 00 00 02 00 05 10 04 00 00 00 04 00 02 00 00 00 00 80 1E 00 00 00 00 00 00 50 1E 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 04 00 00 00 02 00 00 00
<< 512: 10 00 00 00 01 00 05 10 05 00 00 00 03 00 00 00 80 96 95 96 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
1005 16 1 5:  3
>> 0032:  32 00 00 00 02 00 05 10 05 00 00 00 04 00 02 00 00 00 00 08 3D 00 00 00 00 00 00 E8 0D 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 05 00 00 00 03 00 00 00
<< 512: 10 00 00 00 01 00 05 10 06 00 00 00 04 00 00 00 0D 32 64 A9 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
1005 16 1 6:  4
>> 003a:  3A 00 00 00 02 00 05 10 06 00 00 00 04 00 02 00 00 00 00 80 1E 00 00 00 00 00 00 70 1E 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 06 00 00 00 04 00 00 00
<< 512: 10 00 00 00 01 00 05 10 07 00 00 00 05 00 00 00 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
1005 16 1 7:  5
>> 0034:  34 00 00 00 02 00 05 10 07 00 00 00 04 00 02 00 00 00 00 00 0F 00 00 00 00 00 00 E0 0E 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 07 00 00 00 05 00 00 00
<< 512: 10 00 00 00 01 00 05 10 08 00 00 00 06 00 00 00 70 A4 54 05 7A B1 23 5B 28 30 73 12 E7 BB DB E3
1005 16 1 8:  6
>> 0032:  32 00 00 00 02 00 05 10 08 00 00 00 04 00 02 00 00 00 00 00 00 01 00 00 00 00 00 00 E5 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 08 00 00 00 06 00 00 00
<< 512: 10 00 00 00 01 00 05 10 09 00 00 00 07 00 00 00 80 96 95 96 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
1005 16 1 9:  7
>> 0034:  34 00 00 00 02 00 05 10 09 00 00 00 04 00 02 00 00 00 00 00 80 00 00 00 00 00 00 40 4C 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 09 00 00 00 07 00 00 00
<< 512: 10 00 00 00 01 00 01 98 0A 00 00 00 00 30 00 00 0D 32 64 A9 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
9801 16 1 10:  3000
>> 0020:  20 00 00 00 02 00 01 98 0A 00 00 00 08 00 00 00 01 DC 02 DC 03 DC 04 DC 07 DC 0B DC 41 DC 44 DC
>> 0010:  10 00 00 00 03 00 01 20 0A 00 00 00 00 30 00 00
<< 512: 10 00 00 00 01 00 01 98 0B 00 00 00 01 30 00 00 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
9801 16 1 11:  3001
>> 0020:  20 00 00 00 02 00 01 98 0B 00 00 00 08 00 00 00 01 DC 02 DC 03 DC 04 DC 07 DC 0B DC 41 DC 44 DC
>> 0010:  10 00 00 00 03 00 01 20 0B 00 00 00 01 30 00 00
<< 512: 10 00 00 00 01 00 02 98 0C 00 00 00 01 DC 00 00 70 A4 54 05 7A B1 23 5B 28 30 73 12 E7 BB DB E3
9802 16 1 12:  dc01
>> 001a:  1A 00 00 00 02 00 02 98 0C 00 00 00 01 DC 06 00 00 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 0C 00 00 00 01 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 0D 00 00 00 02 DC 00 00 80 96 95 96 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
9802 16 1 13:  dc02
>> 0018:  18 00 00 00 02 00 02 98 0D 00 00 00 02 DC 04 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 0D 00 00 00 02 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 0E 00 00 00 03 DC 00 00 0D 32 64 A9 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
9802 16 1 14:  dc03
>> 0018:  18 00 00 00 02 00 02 98 0E 00 00 00 03 DC 04 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 0E 00 00 00 03 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 0F 00 00 00 04 DC 00 00 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
9802 16 1 15:  dc04
>> 001e:  1E 00 00 00 02 00 02 98 0F 00 00 00 04 DC 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 0F 00 00 00 04 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 10 00 00 00 07 DC 00 00 70 A4 54 05 7A B1 23 5B 28 30 73 12 E7 BB DB E3
9802 16 1 16:  dc07
>> 0017:  17 00 00 00 02 00 02 98 10 00 00 00 07 DC FF FF 01 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 10 00 00 00 07 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 11 00 00 00 0B DC 00 00 80 96 95 96 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
9802 16 1 17:  dc0b
>> 001a:  1A 00 00 00 02 00 02 98 11 00 00 00 0B DC 06 00 00 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 11 00 00 00 0B DC 00 00
<< 512: 10 00 00 00 01 00 02 98 12 00 00 00 41 DC 00 00 0D 32 64 A9 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
9802 16 1 18:  dc41
>> 0026:  26 00 00 00 02 00 02 98 12 00 00 00 41 DC 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 12 00 00 00 41 DC 00 00
<< 512: 10 00 00 00 01 00 02 98 13 00 00 00 44 DC 00 00 30 3C 5D BD 58 D0 B2 0D B1 20 65 23 85 88 78 1E
9802 16 1 19:  dc44
>> 0017:  17 00 00 00 02 00 02 98 13 00 00 00 44 DC FF FF 00 00 00 00 00 00 00
>> 0010:  10 00 00 00 03 00 01 20 13 00 00 00 44 DC 00 00
<< 512: 18 00 00 00 01 00 07 10 13 00 00 00 01 00 00 00 00 00 00 00 FF FF FF FF 28 30 73 12 E7 BB DB E3
1007 24 1 19:  1 0 ffffffff
>> 00d0:  D0 00 00 00 02 00 07 10 13 00 00 00 30 00 00 00 36 00 00 00 35 00 00 00 34 00 00 00 33 00 00 00
>> 0018:  18 00 00 00 03 00 01 20 13 00 00 00 01 00 00 00 00 00 00 00 FF FF FF FF
*<< 512: 14 00 00 00 01 00 03 98 14 00 00 00 36 00 00 00 01 DC 00 00 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
9803 20 1 20:  36 dc01
>> 0010:  10 00 00 00 02 00 03 98 14 00 00 00 01 00 00 00
>> 0014:  14 00 00 00 03 00 01 20 14 00 00 00 36 00 00 00 01 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 15 00 00 00 36 00 00 00 02 DC 00 00 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
9803 20 1 21:  36 dc02
>> 000e:  0E 00 00 00 02 00 03 98 15 00 00 00 00 30
>> 0014:  14 00 00 00 03 00 01 20 15 00 00 00 36 00 00 00 02 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 16 00 00 00 36 00 00 00 03 DC 00 00 58 D0 B2 0D B1 20 65 23 85 88 78 1E
9803 20 1 22:  36 dc03
>> 000e:  0E 00 00 00 02 00 03 98 16 00 00 00 00 00
>> 0014:  14 00 00 00 03 00 01 20 16 00 00 00 36 00 00 00 03 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 17 00 00 00 36 00 00 00 04 DC 00 00 FF FF FF FF 28 30 73 12 E7 BB DB E3
9803 20 1 23:  36 dc04
>> 0014:  14 00 00 00 02 00 03 98 17 00 00 00 7D 0E 01 00 00 00 00 00
>> 0014:  14 00 00 00 03 00 01 20 17 00 00 00 36 00 00 00 04 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 18 00 00 00 36 00 00 00 07 DC 00 00 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
9803 20 1 24:  36 dc07
>> 002b:  2B 00 00 00 02 00 03 98 18 00 00 00 0F 41 00 6E 00 6E 00 69 00 65 00 5F 00 68 00 65 00 61 00 64
>> 0014:  14 00 00 00 03 00 01 20 18 00 00 00 36 00 00 00 07 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 19 00 00 00 36 00 00 00 0B DC 00 00 9E 5F 5B CD 4D 4A 34 48 E0 69 58 37
9803 20 1 25:  36 dc0b
>> 0010:  10 00 00 00 02 00 03 98 19 00 00 00 00 00 00 00
>> 0014:  14 00 00 00 03 00 01 20 19 00 00 00 36 00 00 00 0B DC 00 00
<< 512: 14 00 00 00 01 00 03 98 1A 00 00 00 36 00 00 00 41 DC 00 00 58 D0 B2 0D B1 20 65 23 85 88 78 1E
9803 20 1 26:  36 dc41
>> 001c:  1C 00 00 00 02 00 03 98 1A 00 00 00 36 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>> 0014:  14 00 00 00 03 00 01 20 1A 00 00 00 36 00 00 00 41 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 1B 00 00 00 36 00 00 00 44 DC 00 00 FF FF FF FF 28 30 73 12 E7 BB DB E3
9803 20 1 27:  36 dc44
>> 002b:  2B 00 00 00 02 00 03 98 1B 00 00 00 0F 41 00 6E 00 6E 00 69 00 65 00 5F 00 68 00 65 00 61 00 64
>> 0014:  14 00 00 00 03 00 01 20 1B 00 00 00 36 00 00 00 44 DC 00 00
<< 512: 14 00 00 00 01 00 03 98 1C 00 00 00 35 00 00 00 01 DC 00 00 24 7F E1 9B 72 EA AF 4C B3 84 5B E3
9803 20 1 28:  35 dc01

Now maybe back to a previous distraction before I turn the storage units into File and FS objects and see if I can talk to
the actual files.

Edit: I should mention I am also able to see the files on my Kindle:
Code:
*** Device MTPD 1949: c - connected ***
  manufacturer: Android
  product: Android
  Serial: D0FCA0A0342600M6
C<- len:319 DATA: OP:1001(GET_DEVICE_INFO) TID:0 P:60064 640000 69006D26 72006300 73006F00
    3F 01 00 00 02 00 01 10 00 00 00 00 64 00 06 00 00 00 64 00 26 6D 00 69 00 63 00 72 00 6F 00 73 00 6F 00 66 00 74 00 2E 00 63 00 6F 00 6D 00 3A 00 20 00 31 00 2E 00 30 00 3B 00 20 00 61 00 6E 00 64 00 72 00 6F 00 69 00 64 00 2E 00 63 00 6F 00 6D 00 3A 00 20 00 31 00 2E 00 30 00 3B 00 00 00 00 00 1E 00 00 00 01 10 02 10 03 10 04 10 05 10 06 10 07 10 08 10 09 10 0A 10 0B 10 0C 10 0D 10 14 10 15 10 16 10 17 10 1B 10 01 98 02 98 03 98 04 98 05 98 10 98 11 98 C1 95 C2 95 C3 95 C4 95 C5 95 06 00 00 00 02 40 03 40 04 40 05 40 01 C8 0C 40 03 00 00 00 01 D4 02 D4 03 50 00 00 00 00 1A 00 00 00 00 30 01 30 04 30 05 30 08 30 09 30 0B 30 01 38 02 38 04 38 07 38 08 38 0B 38 0D 38 01 B9 02 B9 03 B9 82 B9 83 B9 84 B9 05 BA 10 BA 11 BA 14 BA 82 BA 06 B9 07 41 00 6D 00 61 00 7A 00 6F 00 6E 00 00 00 05 46 00 69 00 72 00 65 00 00 00 04 31 00 2E 00 30 00 00 00 11 44 00 30 00 46 00 43 00 41 00 30 00 41 00 30 00 33 00 34 00 32 00 36 00 30 00 30 00 4D 00 36 00 00 00 
::processMTPData
    STD Version:64
    Vendor extesion ID:6
    MTP Version:64
    Extensions:microsoft.com: 1.0; android.com: 1.0;
    Mode:0
    Operations: 1001 1002 1003 1004 1005 1006 1007 1008 1009 100A 100B 100C 100D 1014 1015 1016 1017 101B 9801 9802 9803 9804 9805 9810 9811 95C1 95C2 95C3 95C4 95C5
    Events: 4002 4003 4004 4005 C801 400C
    Device Properties: D401 D402 5003
    Capture formats:
    Playback formats: 3000 3001 3004 3005 3008 3009 300B 3801 3802 3804 3807 3808 380B 380D B901 B902 B903 B982 B983 B984 BA05 BA10 BA11 BA14 BA82 B906
    Manufacturer:Amazon
    Model:Fire
    Serial:1.0
...
========== Internal storage ===========
Music(1) FMT:3001 Size:0
Podcasts(2) FMT:3001 Size:0
Ringtones(3) FMT:3001 Size:0
Alarms(4) FMT:3001 Size:0
Notifications(5) FMT:3001 Size:0
Pictures(6) FMT:3001 Size:0
Movies(7) FMT:3001 Size:0
Download(8) FMT:3001 Size:0
DCIM(9) FMT:3001 Size:0
Android(10) FMT:3001 Size:4096
kindle(58) FMT:3001 Size:4096
Books(59) FMT:3001 Size:4096
Documents(62) FMT:3001 Size:0
.imagecache(64) FMT:3001 Size:0
Audible(68) FMT:3001 Size:0
Contacts(176) FMT:3001 Size:0
.bugsense(626) FMT:3000 Size:33
mapquest(630) FMT:3001 Size:0
sirius(1057) FMT:3001 Size:4096
TuneIn Radio(1510) FMT:3001 Size:4096
amazonmp3(2341) FMT:3001 Size:0
AccuWeather(4220) FMT:3001 Size:0
.backups(4444) FMT:3001 Size:0
.chartboost(4448) FMT:3001 Size:0
 
Last edited:
Indeed - too many distractions ... pulled the code from 2 hours ago down - need to add USB Host to that PCB I got now with digikey parts - or maybe another board would be less distracting ...

Maybe plug in an Android phone to see the messages ... sounds like a good distraction ...
 
That was Easy enough. Here is output from plugging in my phone to LogLow/TallDog board with T_4.0:

<< 2nd Try on Samsung posted below as well>>
Code:
MSC TEST

Initializing USB Drive(s)
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20004000
periodictable = 20004000
msDrive1 not connected: Code: 40

msDrive2 not connected: Code: 40


Press a key to show USB drive info:

port change: 10001803
    connect
port change: 1C001002
    disconnect
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 E8 04 60 68 00 0C 07 08 09 02 
    VendorID = 04E8, ProductID = 6860, Version = 0C00
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 2
enumeration:
enumeration:
Manufacturer: SAMSUNG
enumeration:
Product: SAMSUNG_Android
enumeration:
Serial Number: RFCN804PK2E
enumeration:
Config data length = 47
enumeration:
Configuration Descriptor:
  09 02 2F 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 03 06 01 01 0B 
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 6 / 1 / 1
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 01 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 1
  07 05 82 03 1C 00 06 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 28
    Polling Interval = 6
  08 24 80 0C 00 01 00 01 
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 03 06 01 01 0B 07 05 81 02 00 02 00 07 05 01 02 00 02 01 07 05 82 03 1C 00 06 08 24 80 0C 00 01 00 01 
msController claim this=20002740
09 04 00 00 03 06 01 01 0B 07 05 81 02 00 02 00 07 05 01 02 00 02 01 07 05 82 03 1C 00 06 08 24 80 0C 00 01 00 01 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 36 =  ???
msDrive1 not connected: Code: 40

msDrive2 not connected: Code: 40


Press a key to show USB drive info:

Then unplug new Samsung and plug in OLD LG: << SEE p#7 for LG phone as MTP >>
Code:
...
 
Last edited:
@KurtE - looking at the MENU on LG phone - I had to select MTP connect.

Doing it over startup - then select MTP on the phone gives the following:
Code:
MSC TEST

Initializing USB Drive(s)
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20004000
periodictable = 20004000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 04 10 3E 63 10 03 01 02 03 02 
    VendorID = 1004, ProductID = 633E, Version = 0310
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 2
enumeration:
enumeration:
Manufacturer: LG Electronics Inc.
enumeration:
Product: LGE Android Phone
enumeration:
Serial Number: LGH9002c9a4520
enumeration:
Config data length = 39
enumeration:
Configuration Descriptor:
  09 02 27 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 03 06 01 01 05 
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 6 / 1 / 1
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 00 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 82 03 1C 00 06 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 28
    Polling Interval = 6
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 03 06 01 01 05 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
msController claim this=20002740
09 04 00 00 03 06 01 01 05 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
msDrive1 not connected: Code: 40

msDrive2 not connected: Code: 40


Press a key to show USB drive info:

port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
USBDriver (dev->drivers) list: (empty
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
delete_Pipe 20004400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536888640
* Delete Pipe completed
removed Device_t from devlist
  disable
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 04 10 3E 63 10 03 01 02 03 02 
    VendorID = 1004, ProductID = 633E, Version = 0310
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 2
enumeration:
enumeration:
Manufacturer: LG Electronics Inc.
enumeration:
Product: LGE Android Phone
enumeration:
Serial Number: LGH9002c9a4520
enumeration:
Config data length = 39
enumeration:
Configuration Descriptor:
  09 02 27 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 03 06 01 01 05 
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 6 / 1 / 1
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 00 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 82 03 1C 00 06 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 28
    Polling Interval = 6
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 03 06 01 01 05 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
msController claim this=20002740
09 04 00 00 03 06 01 01 05 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
 
Plugged in Samsung then selected :: USB Tethering

Let me know if this helps see what is coming/going:
Code:
MSC TEST

Initializing USB Drive(s)
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20004000
periodictable = 20004000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 E8 04 60 68 00 0C 07 08 09 02 
    VendorID = 04E8, ProductID = 6860, Version = 0C00
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 2
enumeration:
enumeration:
Manufacturer: SAMSUNG
enumeration:
Product: SAMSUNG_Android
enumeration:
Serial Number: RFCN804PK2E
enumeration:
Config data length = 47
enumeration:
Configuration Descriptor:
  09 02 2F 00 01 01 00 80 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 03 06 01 01 0B 
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 6 / 1 / 1
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 01 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 1
  07 05 82 03 1C 00 06 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 28
    Polling Interval = 6
  08 24 80 0C 00 01 00 01 
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 03 06 01 01 0B 07 05 81 02 00 02 00 07 05 01 02 00 02 01 07 05 82 03 1C 00 06 08 24 80 0C 00 01 00 01 
msController claim this=20002740
09 04 00 00 03 06 01 01 0B 07 05 81 02 00 02 00 07 05 01 02 00 02 01 07 05 82 03 1C 00 06 08 24 80 0C 00 01 00 01 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 36 =  ???
msDrive1 not connected: Code: 40

msDrive2 not connected: Code: 40


Press a key to show USB drive info:

port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
USBDriver (dev->drivers) list: (empty
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
delete_Pipe 20004400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536888640
* Delete Pipe completed
removed Device_t from devlist
  disable
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 02 00 00 00 40 E8 04 63 68 00 0C 07 08 09 01 
    VendorID = 04E8, ProductID = 6863, Version = 0C00
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: SAMSUNG
enumeration:
Product: SAMSUNG_Android
enumeration:
Serial Number: RFCN804PK2E
enumeration:
Config data length = 75
enumeration:
Configuration Descriptor:
  09 02 4B 00 02 01 00 80 FA 
    NumInterfaces = 2
    ConfigurationValue = 1
  08 0B 00 02 E0 01 03 0D 
    Interface Association = 0 through 1
    Class / Subclass / Protocol = 224 / 1 / 13
  09 04 00 00 01 E0 01 03 0B 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 224 / 1 / 3
  05 24 00 10 01 
  05 24 01 00 01 
  04 24 02 00 
  05 24 06 00 01 
  07 05 81 03 08 00 09 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 9
  09 04 01 00 02 0A 00 00 0C 
    Interface = 1
    Number of endpoints = 2
    Class/Subclass/Protocol = 10 / 0 / 0
  07 05 8E 02 00 02 00 
    Endpoint = 14 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 0F 02 00 02 00 
    Endpoint = 15 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 11 = IAD
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 01 E0 01 03 0B 05 24 00 10 01 05 24 01 00 01 04 24 02 00 05 24 06 00 01 07 05 81 03 08 00 09 09 04 01 00 02 0A 00 00 0C 07 05 8E 02 00 02 00 07 05 0F 02 00 02 00 
msController claim this=20002740
09 04 00 00 01 E0 01 03 0B 05 24 00 10 01 05 24 01 00 01 04 24 02 00 05 24 06 00 01 07 05 81 03 08 00 09 09 04 01 00 02 0A 00 00 0C 07 05 8E 02 00 02 00 07 05 0F 02 00 02 00 
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 01 00 02 0A 00 00 0C 07 05 8E 02 00 02 00 07 05 0F 02 00 02 00 
msController claim this=20002740
09 04 01 00 02 0A 00 00 0C 07 05 8E 02 00 02 00 07 05 0F 02 00 02 00 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
 
We might need to enable some additional debugging.

I should also warn I put in hack for Kindle...
As it does not return the "Standard" of 6 1 1... But instead the tablet output a bogus value... Which as I mentioned in another post there is some other bogus mechanism Windows would determine if ti was an MTP device.
So I put quick VID:pID pair in the code to say if you see this assume MTP...

I look more in the morning.... Still resetting a few things after we had a power outage...
 
Will look for updates to see if it helps ... Our power flashed out some time ago ... Just enough to reset the kitchen device clocks.

Here is a PLUG and Remove with older Kindle HD8 plugged in and set to MTP?:
Code:
MSC TEST

Initializing USB Drive(s)
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20004000
periodictable = 20004000
port change: 10001803
    connect
msDrive1 not connected: Code: 40

  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 49 19 31 02 FF FF 02 03 04 01 
    VendorID = 1949, ProductID = 0231, Version = FFFF
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Amazon
enumeration:
Product: Fire
enumeration:
Serial Number: G000KU0664070P1E
enumeration:
Config data length = 39
enumeration:
Configuration Descriptor:
  09 02 27 00 01 01 00 C0 FA 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 03 FF FF 00 11 
    Interface = 0
    Number of endpoints = 3
    Class/Subclass/Protocol = 255 / 255 / 0
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 01 02 00 02 00 
    Endpoint = 1 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 82 03 1C 00 06 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 28
    Polling Interval = 6
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20002C20
USBHub memory usage = 960
USBHub claim_device this=20002FE0
USBHub memory usage = 960
USBHub claim_device this=200033A0
USBHub memory usage = 960
USBHub claim_device this=20001EA0
msController claim this=20002260
msController claim this=20002740
Descriptor 4 = INTERFACE
msController claim this=20002260
09 04 00 00 03 FF FF 00 11 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
msController claim this=20002740
09 04 00 00 03 FF FF 00 11 07 05 81 02 00 02 00 07 05 01 02 00 02 00 07 05 82 03 1C 00 06 
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
msDrive2 not connected: Code: 40


Press a key to show USB drive info:

port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
USBDriver (dev->drivers) list: (empty
USBDriver (available_drivers) list: 20002C20 -> 20002FE0 -> 200033A0 -> 20001EA0 -> 20002260 -> 20002740
delete_Pipe 20004400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536888640
* Delete Pipe completed
removed Device_t from devlist
  disable
 
Will look for updates to see if it helps ... Our power flashed out some time ago ... Just enough to reset the kitchen device clocks.

Here is a PLUG and Remove with older Kindle HD8 plugged in and set to MTP?:
Code:
MSC TEST

Initializing USB Drive(s)
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20004000
periodictable = 20004000
port change: 10001803
    connect
msDrive1 not connected: Code: 40

  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 49 19 31 02 FF FF 02 03 04 01 
    [COLOR="#FF0000"]VendorID = 1949, ProductID = 0231[/COLOR], Version = FFFF
   [COLOR="#008000"] Class/Subclass/Protocol = 0 / 0 / 0[/COLOR]
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Amazon
enumeration:
Product: Fire
enumeration:
Serial Number: G000KU0664070P1E
...
With this device it is not setup by Class/Subclass/Protocol to be an MTP device

Like my Kindle Fire: So I have a hack table, in MTPDevice.cpp
Code:
const static known_mtp_devices_t known_mtp_devices[] PROGMEM = {
  {0x1949, 0x000C}
Where you might try adding another ROW: with same Vendor ID and your product ID = 0x231...
And see if it goes better.

Yes so far I don't know any way yet to say to MTP to say Hi There... So I hacked up @WMXZ version of MTP-Test to timeout after 5 or 10 seconds...
 
@all I have been playing some. Some of the MTP stuff is slightly broken, will fix. But I have a few commands in it that allow me to do things like try to enumerate a child, currently by storage ID... Also dump the list of IDs, and list of storages.

Need to fix where I think I am not linking things correctly when it enumerates again...

@Paul (and others) - I also did some more hacking on my new SEREMU USB Host handling. My current MTP test sketch looks for either Serial or SEREMU on the board plugged in and does echoing (both directions) of the Serial from the plugged in board to SerialUSB1 on the test sketch.

I just put in code that I hopefully will signal to the other side that I am here, such that code like: while (!Serial);
will know the port is now available...

Still needs more testing, but I have the HID Parser class remember the interface number. It already has a send Control Packet message function, needed for some devices like PS3 to send control messages.

Code looks like:
Code:
	//if (setup.word1 == 0x03000921 && setup.word2 == ((4<<16)|SEREMU_INTERFACE)) {
	tx_buffer_[0] = 0;
	tx_buffer_[1] = 0;
	tx_buffer_[2] = 0;
	tx_buffer_[3] = 0;
	driver_->sendControlPacket( 0x21, 0x9, 0x300, driver_->interfaceNumber(), 4, tx_buffer_)
Does this look reasonable?

Also should I do a Pull Request to add SEREMU plus fix the queue issue with the USBSerial class?

Kurt
 
Thought I would continue here the recent conversation about USB Host Serial examples and the like that was on the thread:
https://forum.pjrc.com/threads/72658-Need-USB-advice-and-direction?p=324893&viewfull=1#post324893

I just pushed up some additional changes to the PR/branch:

From my PR: https://github.com/PaulStoffregen/USBHost_t36/pull/119
up in my fork/branch: https://github.com/KurtE/USBHost_t36/tree/USBSerial

I moved both of the Serial examples under a sub-directory Serial.

I also created a new example sketch under: RawHID. This sketch forwards all of the RawHid messages to/from Host from/to USBHost object.
It also forwards the Seremu messages between the two as well.

Note: I found some issues with the USBHost SerEMU object. Bug in the queuing of data, which I fixed.
Also there were some debug messages that were still always being output, which I put under ifdef... Actually, moved into using DBGPrintf which configured differently if
the debug macro was defined. I also added a begin(...) and end() method to it to make it easer to work between.

@defragster - to the USBToUSBHostSerial sketch - I added in the option to use Seremu. Added some complexity though as the object is not a top level USBHost object but instead a HID Input object, so had to put in stuff to handle that.

Now off to play with some other stuff.

Kurt
 
Back
Top