MTP Responder Contribution

no such luck on delay with the libraries from the git instructions, thd usb1_mtp.c implementation must be the key there.
 
found a second "void MTPD::loop(void)", seems there is two in MTP.cpp, of which the second function is being used.
 
Tested mtp_test for T4.0 (both SDIO and SPI) and got it working
Note: SPI did not work because LED was switched on (pin13 is used for SPI)
 
Hey hey it works!!
I'd love to send you something as a thanks as getting this working is a massive help to my future work!
To be clear I know I don't have too and you didn't do it for reward etc but that's not why I want too. if you pm me, ill send over the custom breakout PCB I am designing for the 4.1 if that's of interest?
 
As an aside, you could remove the instructions for adding to the hardware cores for t3.5/6 and 4 as the teensyduinoinstaller beta is working with this.
 
@XFer, the issue is more to do with SdFat beta dropping support for SdFatSdioEX and less to do with the t3.6
This is the result of attempting to compile for t3.6:

C:\Users\Jared\Documents\Arduino\teensyMTPandSDwriteT4.1\teensyMTPandSDwriteT4.1.ino:14:1: error: 'SdFatSdioEX' does not name a type
SdFatSdioEX sdEx;
^

C:\Users\Jared\Documents\Arduino\teensyMTPandSDwriteT4.1\teensyMTPandSDwriteT4.1.ino: In function 'bool checkSDInstalled(int)':

C:\Users\Jared\Documents\Arduino\teensyMTPandSDwriteT4.1\teensyMTPandSDwriteT4.1.ino:22:12: error: 'SD' was not declared in this scope
if (!SD.begin()) {
^

C:\Users\Jared\Documents\Arduino\teensyMTPandSDwriteT4.1\teensyMTPandSDwriteT4.1.ino:30:12: error: 'sdEx' was not declared in this scope
if (!sdEx.begin()) {
^
g library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Using library MTP_t4-master at version 1.0.0-beta.1 in folder: C:\Users\Jared\Documents\Arduino\libraries\MTP_t4-master
Using library USB2-master at version 0.9.0-beta.1 in folder: C:\Users\Jared\Documents\Arduino\libraries\USB2-master
Using library Time at version 1.6 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Time
Error compiling for board Teensy 3.6.


As you can see it is a result of the new sdFat being incompatible with the old sdfat as apposed it being a result of t4.1/3.x
 
change SdExFat sdEx; to SdFs sdFs;
And File file; to FsFile file;
then change sdEx.begin(); to sdFs.begin(SdioConfig(DMA_SDIO)) and this should mostly fix broken Sdfat works.
 
As an aside, you could remove the instructions for adding to the hardware cores for t3.5/6 and 4 as the teensyduinoinstaller beta is working with this.

Well, when I checked last time cores, it does not implement MTP_DISK_SERIAL, the mode I'm using. SEREMU is OK for Arduino monitor, a little bit difficult for plain Linux.
I hope Paul can be convinced to add this mode to both T3.5/6 and T4.0/1
 
fair, well there is nothing I can do about this and Bill has said he will not be working on V1 except for serious bug fixes, not sure if he classifies that as a bug fix.
 
my mistake, you have a point there!
Could you implement MTP_DISK_SERIAL into the new core definitions?

Well, that is why the files are to be copied
OK, you simply can copy the MTP_DISK_SERIAL into cores usb_desc.h files etc.
But better Paul us doing that, or ask me to reissue a new pull request. at the moment all (Paul's and my cores) are a little bit out of sync
 
It would be fantastic if it could be pulled into cores.

I often help other people develop custom (open source) data acquisition systems using teensy. They really want to be able to pull the data off the SD card without pulling out the SD card (due to the enclosure). While these folks are comfortable enough to setup the Arduino IDE and teensyduino, asking the to muck about in the core installation files is crossing a line for many folks.

If this critical bit were already in the core installation, it would ease access to this great capability.

Chip
 
It would be fantastic if it could be pulled into cores.

There are three things, Paul must decide and could implement ASAP
1) adding MTP_DISK_SERIAL to usb_desc.h (not sure if usb_desc.c must be modified)
2) generating unique PID for MTP_DISK_SERIAL
3) modify TeensyDuino to recognize MTP_DISK_SERIAL for automatic reprogramming (at me moment button press is requires)

I assume Paul wanted to work some time on usb_mtp (my usb1_mtp) before it goes to core.
 
sadly after doing a bunch of testing it seems this solution is somewhat unreliable, I am only able to access the sd card maybe one in twenty tries
 
Untitled.png mostly i get this
 
Storage_init() returns false hence this problem.
It may be an sd card incompatibility as this issue happens with two 16gb cards I have but mostly doesnt happen with the one 8gb card
 
Back
Top