I could be wrong, but my guess is your USB option you built with may not include Serial?
That is looks like you are using Product ID 0x482 Which I think is the USB Type: Keyboard + Mouse + Joystick
This one I do...
Thanks, I had not looked at the info sector as, you mentioned it is not used in SDFat... Not sure how hard it would be to use it.
There is optional code in Fat code that if enabled when you ask for the count of free...
Not sure what you are saying. No one has gotten what to work on 1060? Several of us have played some. I have a sketch that we used every hardware Serial port plus a lot of other Serial ports created by FlexIO, that...
Yes, in my local branches I commented out some of the printing... FatPartition.cpp
in SDFat code...
int32_t FatPartition::freeClusterCount() {
#if MAINTAIN_FREE_CLUSTER_COUNT
if (m_freeClusterCount >= 0) {
...
Again you might take a look at the MSC stuff (MassStorageDriver.cpp) as it runs more or less in lock step...
Again it may not do as much with control but for sending and receiving messages:
look at the function...
Sorry, not sure if there is some specific way to tell a tell a timer like that how many pulses to do... You can probably have an interrupt or the like turn it on or off...
Another possibility for you might be with...
I just pushed up a updated version of it that has a lot less changes to the print stuff.
I did a git rebase -i ...
Update as to not have it show that I changed them all back to old and then all back to new...
...
As you can see most of the time we do it asynch. Note the MSC stuff does a lot of this stuff Sync...
Note: on doing new stuff I am a bit rusty: I will show some of the stuff from USBSerialBase as it does some of...
Again I am not as experienced with the FAT system in SDFat and the like, although I understand a lot more of it than I used to. And I am pretty good at using a global search function in sublime text.
In the old...
There are only 4 Interval timers... Which I believe are the 4 PIT timers... But again there are several others including software driven ones. So question is, do any of these other timers do what you need...
There...
Sorry, I have never used this library nor a 2++...
But looking at the library: https://arduino-irremote.github.io/Arduino-IRremote/
Or the latest stuff up at: https://github.com/Arduino-IRremote/Arduino-IRremote...
@all, I hacked on the dump MBR to know a little about extended partition...
I have not pushed it up yet...
// VolumeName.ino
// VER: P494, p498, p506, p507. p522
// An example of how to retrieve Fat32 and...
The question is, what is the 4th partition? It shows type: 0xf
Looking at: https://en.wikipedia.org/wiki/Partition_type
It is an Extended Partition indicator! So
the data for your actual partition would probably be...
Thanks, The SDFat library code is not setup to handle GPT... So not sure if anyone will look at adding it to the MSC stuff...
@all Thought about more hack for exFat free clusters, but the main code appears to be...
Sorry I maybe merged with the wrong version of the changes... Mainly the only thing I meant to play with with some of the messages was to add in more information, like this pointer or the like as when you have multiple...
Thanks.
I believe there are two parts here.
Master Boot Record format of disks (MBR) which is I think the only style of disks that the Partition stuff built into SDFat library supports, The MBR only has room for...
@kdharbert - I ca not tell from your comments here are you talking about the T4 and T4.1 or the future 1170 stuff.
For some of the capabilities of 1170, you might want to look at their now available eval board:...
Morning all,
It is interesting with the Fat tables. Knowing what type of partition each one is, is done by SDFat code. My PFsFat classes are again just FsFat class with a couple things now:
it allows me to pass...
So far I have done a really dirty version of the FatPartition getFreeClusterCount code as part of the VolumeName.ino sketch.
I think most if not all of the changes are in the two Github Projects:
USBHost_t36 I...
My guess (and it is only a guess) is they have been waiting for the bootloader chip (https://www.pjrc.com/store/ic_mkl02_t4.html)
Which I think still has a limit of 10...
@all - I think I will try a hack to see how much if any the freeClusterCount code could be sped up.
What I am thinking of doing is start off with Fat (so Fat16/32). I am curious of how fast is it already for large...
I was sort of curious about what ever happened to this project as well as the other Controller board that in another thread, that was made at one point for one of the PrintrBot models. As I still have not fixed my...
Sorry I know nothing abot scones or the like, so not sure how much help I will be...
But one thing stands out is: ARDUINO_TEENSY_MICROMOD
That is for a non-existent board that is rummer to be coming. You might want...
@mjs513, that is sort of what I figured.
@all - Keep wondering about how SLOW the getting free space is
I can imagine that it could probably be sped up a lot, but not sure how doable it is without major surgery...
Yes So far I have only put in code for formatting of LittleFS stuff, have not dealt yet with FAT file systems... So far no API or methods that I know of for it, only the sketches in the SDFat library.
Maybe sometime...
@mjs513, now We need to find way to update the free/used space.
And need to test unplugging a device and do we properly remove the partitions...
Also I again want to try updating the StorageIDs... They are...
I know playing around with MTP and the like, I believe if you do all writes in units of sectors or clusters, it can run a whole lot faster.
For example I know it was a lot faster with 4K blocks than when I dumped USB...
Always hard to know without a lot of additional information. Could be simply either overrunning the display with data or...
Could be the Serial buffer size, and you have more data on Serial than will fit in the data...
Sorry, this is probably a question that maybe only Paul can answer,
But my gut tells me that you may not be able to do this.
That is the IMXRT1060RM section 42.2.1 mentions: Up to 8 bidirectional endpoints per each...
Aargh and :D
Sometimes it is the simple things!
Like the right number of msc objects!
I pushed up a change in my temporary branch...
Sorry in this push, that I removed compiler stuff for MSC examples and...
It should be in both Teensy3 and Teensy4 branches. And they are identical up on github, so you should be able to simply copy the one from the Teensy3 directory to the Teensy4 directory...
Or install the latest beta...
It will be interesting, as I believe it is just a beta that has been released. Also as it is a complete different platform, it will be interesting to see if/when Paul adds support.
@all - I may take break from this for rest of day.
Then I may try to see if I can reduce the number of abstractions and the like and get it to work... That is how much different does the VolumeName code and the MTP...
Ok, I changed that test sketch like:
// Function to handle one MS Drive...
void procesMSDrive(uint8_t drive_number, msController &msDrive, UsbFs &msc)
{
Serial.printf("Initialize USB drive...");
cmsReport = 0;...
For the heck of it, to get another data point I am going to step back and play with the VolumeName sketch, and instead of processing one partition at a time, I am going to try to open up all partitions (up to 4) and...
Sorry just got back: It gets sort of interesting, I turned on the debug code in MassStorageDevice(USBHost) Not the big debug turn on, but one specific to this class:#define DBGprint 1
I also edited a lot of the...
Right now I am looking into the file USBFat.h code:
at:
template <class Vol>
class UsbBase : public Vol {
public:
//----------------------------------------------------------------------------
/** Initialize...
It might be a problem with my mbr dump code, it is pretty big hack, I try to call the read sector directly...
bool mbrDmp(msController *pdrv) {
MbrSector_t mbr;
// bool valid = true;
if (pdrv->msReadBlocks(0,...
Thanks @mjs513
I understand what you are saying, but so far not sure where the connection is made:
USB Drive Inserted
msc # Partition Table
part,boot,bgnCHS,type,endCHS,start,length...
I have added some additional debug code:
So far I pushed up a few debug output edits to the Msc... project in the branch: https://github.com/KurtE/UsbMscFat/tree/VolumeName_SD
A new MTP branch based off my other...
Yet another new day :D
I have been playing with the MTP stuff, with partitions... And pulling out a fair percentage of the few hairs I have left :D
I have hacked my way through to try to support N USB drives...
Again hard to know what is going on without details about the display and your wiring and...
Is it this one: http://www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807
Which is another ILI9341 display?
Again...
So far this one looks like it does not want to give up it's secrets!
That is it is not giving any clue by device class, subclass nor protocol. 0s for the device and 0xff for interface.
So probably vendor specific. ...
Hi Frank,
Not sure the second one has HID or not...
But again maybe try plugging it into T3.6 or T4.x with one of the USBHost_t36 examples like I mentioned.
And at about line 62 in USBHost_t36.h uncomment the...
Again as you mentioned maybe, as I added the ability to pass through the partition number on that begin, that maybe I should just try that and maybe again only
need to object types still. Will try... Probably easier...
@mjs513 and @wwatson - Yes I think it would be a good place.
But right now I am trying to rethink some of the integration of the MSC stuff into MTP... Trying to decide how far to try to take.
Things like: If we...
Quick follow on:
I just pushed up changes into my branch: https://github.com/KurtE/UsbMscFat/tree/VolumeName_SD
To hopefully have the MSC wrappers for the files/volume now call into the new PFs... stuff.
Including...
Morning all (or time in your part of the world),
Starting to play with MTP again...
First off: Integration question, probably for @PaulStoffregen.
In an SdFat-beta project issue conversation with Bill about...
Looks maybe like this one? https://www.amazon.com/JahyShow%C2%AE-DVB-T-RTL2832U-Receiver-Compatible/dp/B01H830YQ6/ref=sr_1_8?dchild=1&keywords=RTL2832&qid=1614606952&sr=8-8
Hi Frank,
It looks like this device is a HID (Human Interface Device) like mouse, some keyboard...
There is an example sketch under USBHost_t36 HIDDeviceInfo that is setup to dump a lot of data in the way that I...
Just pushed up a new branch off of main which I synced back up: https://github.com/KurtE/UsbMscFat/tree/VolumeName_SD
It now shows Volume information about SD Card as well:
^^^^^^^^~FsVolume::begin(20001f30)
...
@mjs513 Long Pauses are often the trying to compute the used or free space... As it walk billions and billions of ...
Probably it for today. Probably tomorrow will look into MTP again with these changes.
I am...
Maybe... But then there is also MTP with @WMXZ and the like...
Quick fyi - right after the merge,
I updated the sketch again, such that you can dump the MBR for both USB devices as well as SD Cards... I pushed...
@all, again not sure if best to mention here or in the MSC thread...
But I just pushed up a new Branch of the UsbMscFat library... https://github.com/KurtE/UsbMscFat/tree/PFsLib
Where I completely duplicated the...
Sounds good!
Will take in. Right now I am trying to make a version of the fsFat which is partition friendly.
Running into a few compile issues. Will let everyone know if I have any luck.
Actually I received a response on github from Bill... Now there is not a leak as the new is not actually allocating memory...
As the code like: m_fVol = new (m_volMem) FatVolume;
is actually just assigning the...
I sort of started a thread a little bit ago: https://forum.pjrc.com/threads/66338-Many-TLAs-MTP-MSC-FS-SD-SDFat-LittleFS-UsbMSCFat-to-work-with-each-other-8)
Where I was maybe setting up for some integration stuff... ...
@wwatson - Sounds great.
@all as I mentioned over in the MTP thread (https://forum.pjrc.com/threads/43050-MTP-Responder-Contribution?p=271721&viewfull=1#post271721)
I am playing around with seeing about the...
@mjs513 - Yep I am also thinking a smaller test with fewer Storage types would be nice and/or split some of them into multiple tabs...
And yes right not I am still playing with the MSC multi partition sketch...
Glad you found the issue... :D
Wonder what is different between T3.x and T4.x?
Or does something in your interrupts also touch the Analog?
Sounds like maybe need test case to see and maybe the core code needs...
@all - Sometimes hard to know which thread to discuss things like integration of MTP amd MSC... and the like.
I am going to try doing some additional changes to my branch of the code to add some more support for...
Thanks @mjs513 will probably look more in the morning.
Today I also hacked up that function some more that printed that data, and used digital Write high/low with pin 0 for the whole duration and pin 1 around each...
@defragster and @mjs513 I am sort of curious about fragmentation works ;)
For the Fat32 volume:
I mucked up the beginning of the method most all of the class variables
int32_t FatPartition::freeClusterCount() {...
Full current sketch, Note I commented out the earlier calls to get sizes...
Waiting up to 5 seconds for USB drive 1
^^Waiting up to 5 seconds for USB drive 2
^^^^^^^~~~~:(Initialize USB...
So I tried adding in the above test sketch currently just to the FAT16 and FAT32 section code like:
for (uint8_t i = 1; i < 5; i++) {
switch (partitionTable) {
case 11:
case 12:
{
...
Maybe the code in the sketch is wrong...
It is not applying the partition... I am going to move those calls into the sections by partition type and see what I get...
Looks like we crossed posted.
I am going to...
Something does not appear to be working correctly at all with the freeClusterCount:
int32_t FatPartition::freeClusterCount() {
#if MAINTAIN_FREE_CLUSTER_COUNT
if (m_freeClusterCount >= 0) {
return...
Quick note: I am thinking it might make sense to add the VolumeName.ino as an example sketch to maybe MscFS.h project. That way we can all keep track of it?
Make sense?
Morning,
Try picking up the latest UsbMSCFat project - I added a hack into it that if you ask for the Used size, twice (or more) it remembers the first call to it, which we do as a debug message at the time we add...
Thanks @defragster,
I updated to your version.
I ran again, still real slow on my older thumb drives:
Waiting up to 5 seconds for USB drive 1
^^Waiting up to 5 seconds for USB drive 2
^^^^Initialize USB...
Just an FYI: I updated the Volume name sketch to also print out the total size and used size sort of plus elapsed time to get them for the different partitions:
// VolumeName.ino
// An example of how to retrieve...
@mjs513 which code fragment... MSC or MTP... So far in MTP I have not converted the main code to try to do anything with partitions, other than so far I am printing them out and I am able to get the first volume ID.
...
Might really help to understand what exactly is your setup?
Windows? Linux? MAC? ... What version of Arduino are you running? What version of Teensyduino are you running?
Anything changed on your machine, like...
@wwatson - not sure, about NTFS here. It looks like both partitions have type=7 which I believe is exfat. although looking at:https://en.wikipedia.org/wiki/Partition_type
It looks like type of 7 could be either. ...
Any luck?
Looks a bit complicated to jump in... I prefer easier things like MSC and MTP :D
Is it easy to setup and see failure when you don't have the hardware? Steps, and what to see when it fails versus OK?
...
Updated to fix the Fat16, also implemented a one call to find volume label.
And did some more gratuitous changes to have a function called by loop to process a drive, as to not need to reproduce it for more drives......
Another quick note: I updated my sketch to the last one @defragster and found it was using the old non working Fat16 code. i.e. the one that was reading the boot sector and appears to always be: NO NAME
Will fix and...
Good morning again:
Just for the fun of it you might try adding the asm("dsb");
somewhere...
The reason I mention it, I have been bit several times where ISR gets triggered multiple times for the same interrupt....
Some More not fleshed out thoughts on MSC and Partitions and FS...
I first off think it will be great all of the pieces in place and part of Teensyduino!
What I am sort of wondering is if it makes sense to have a...
Good Morning!
I have not had a good chance to go through all of the code:
I don't see anywhere that you call attachInterruptVector, but if you did, I would probably make sure all of my interrupt vectors had...
Good Morning all:
Sounds like we have things coming along well here, to understand some about partitions and getting the volume label. :D
But our test has not handled SD Cards with multiple partitions ;) For...
Have Fat16 working I believe at least for USB, have not tried with SD yet...
// VolumeName.ino
// An example of how to retrieve Fat32 and ExFat volume names using SdFat.
// Works with SD cards and USB mass storage...
Hi @defragster and others...
Thought I would show so more stuff that is not working :D
// VolumeName.ino
// An example of how to retrieve Fat32 and ExFat volume names using SdFat.
// Works with SD cards and...