MTP Responder Contribution

(For the Record) As written in readme / installation "in src directory copy file "SdFat.h" to "SdFat-beta.h"" However, this is only necessary if you do not have original sdfat installed

ah sorry, i didn't understand what you meant.
 
would someone with a working windows setup of arduino for the T4.1 mind zipping and uploading their arduino library and installation folder?
 
Sounds similar to my problem with win10. Exception is windows sees th t4 as a disk but doesn’t read the disk contents and definitely can’t write to the disk
 
I suggest to try MTP_t4 instead of mtp_responder
Anyhow, it needs copying files into cores (high risk as files may have side-effects)

status of MTP_t4
Just tested (after 3 month)
T3.6 worked
T4.0 (same as mjs513; empty disk; was not sdio, spi/audio card disk)
 
Last edited:
so we don't have MTP disk working for the teensy 4.0/4.1?

honestly, I tend to wait until Paul has worked out all the USB devices.
He also indicated to work on MTP.
Not sure why my hack does not work anymore (USB upgrade, Windows upgrade, or what?)
 
sad times , I was hoping to use teensy 4.1 in my upcoming work as the MTP SD access feature would make it super useful for data retrieval (I am building drones that plant trees), but it looks like ill have to find an alternative as I need more processing power than the 3.6.
Ill try a bit more to see if I can somehow make this work but who knows :/
 
Ill try a bit more to see if I can somehow make this work but who knows :/

If you have access to Linux, you may try there if ii works there (so one can exclude PC-issues)
Testing here on T4.0 with audio card (#define USE_SDIO 0) the interaction Teensy - PC is randomly short.
PC does not need to send all commands, and it seems that Teensy is not responding very well (too fast?)
It may all depend on usb1_mtp implementation, which is not necessarily a professional piece of code, but it was working for T4.0-beta.
 
problem is it compiles and uploads but doesn't appear after that, not sure linux would help but ultimately it is to be used with windows PCs so linux is a no go
 
so I have been doing a bit of tracking, it seems that the SD library doesn't work from storage.h, it failed to initialise the SD card
SdError: 0X1,0X0
 
Update:
MTP_t4 worked for me also for T4.0, BUT using SDIO (build in in T4.0 beta board)
Using AudioCard SD card (SPI mode) crashes during read access (inside sync())
maybe it has something to do how T4 is not clearing memory, i.e. could also be a bug with SPI (which is used by SdFat)
(could also be SPI setting in storage)

Edit: I'm not saying that it working reliable (from time to time it hangs )
 
Last edited:
how would i go about using SDIO in the 4.1 with the built in card?
I have changed the following #define USE_SDIO 0 to #define USE_SDIO 1
As a result of this SDIO.png
I HAVE MTP DETECTED WOOOP WOOP!
however no storage device shows up as mentioned previously :(
 
Yep that's pretty much what I get but no files are shown and you can not copy anything to the MTP USB drive
 
The picture is not quite right.
The name of the portable device should be "Teensy".
Anyhow, I try to get it working on T4.0 and next week when I get my T4.1's check with T4.1

One of my suspicion is that different memory usage or USB speed of T4.x may play a role. (random behaviour)
But printf style debugging is a nightmare
 
Got it.

After the comment on speed I changed the clock speeds:
1. Lower the speed from 528Mhz to 24Mhz I now see it as Teensy but if I click on it don't see the SD Card (it blank)
2, At 600Mhz just see it identified as MTP USB device

Note: I have to hit the upload button each time which means its hanging somewhere

EDIT: I reloaded the sketch and now it shows up as Teensy.
 
You may try to insert a delay(10) in the mtpd::loop
Code:
    void MTPD::loop(void)
    { delay(10);
to slow down the communication
(or higher value)
It worked for me (using another usb1_mtp.c implementation, which I will publish later, if working)
 
Back
Top