PB V3.7 beta test thread

I am afraid something is not good with Mass Storage. Again, this may be my computer operating system, but now I have tried 3 cards and they all have issues.
The latest issue is not even just when improperly ejecting the card form the computer, this last test is corruption after attempting to access the SD while it’s unavailable to the board
ie: Mass Storage on, connect USB.
Boot plays.
then SD mounts to computer.
THEN if doing anything on the saber (bladein, next/prev, on etc…) serial monitor reports ` SD card is busy, flags= scsi medium’ .
It may or may not speak “Font directory not found/SDcard not found”, depending on whether the board freezes or not.
Then, when looking at the SD on the computer, I have missing files (a whole bunch of empty font folders), and/or the filenames are gobbledegook.

Am I the only one?
Screen Shot 2021-06-13 at 1.34.11 PM

Screen Shot 2021-06-13 at 1.34.23 PM

Additionally, if it’s any sort of clue, it seems that it’s all about directories, as the files in the root folders all look ok (if they’re there at all), but subfolder sounds are corrupt names.
Screen Shot 2021-06-13 at 1.39.40 PM

1 Like

Ok more kookyness. I have different results of contents when in board or in reader, and I have no idea as I’ve never seen this before.

In reader:

BCmini:~ bconner$ cd /Volumes/PBV3/aa_NoSloppy/Cantina 
BCmini:Cantina bconner$ ls -al
total 68288
drwxrwxrwx  1 bconner  admin     32768 Jun 13 12:58 .
drwxrwxrwx@ 1 bconner  admin     32768 Jun 13 14:26 ..
-rwxrwxrwx@ 1 bconner  admin      6148 Mar 10 12:36 .DS_Store
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._.DS_Store
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._blst01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._clsh
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._font
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._font.bmp
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._force
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._hum01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._in01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._lock01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._out01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._spin01.wav
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._swingh
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._swingl
-rwxrwxrwx  1 bconner  admin      4096 Jun 13 13:50 ._swng
-rwxrwxrwx@ 1 bconner  admin     64004 Jun 13 12:53 blst01.wav
drwxrwxrwx@ 1 bconner  admin     32768 Mar  8 03:48 clsh
drwxrwxrwx@ 1 bconner  admin     32768 Mar 21 05:36 font
-rwxrwxrwx@ 1 bconner  admin      1086 Mar  5  2020 font.bmp
drwxrwxrwx@ 1 bconner  admin     32768 Jun 13 12:59 force
-rwxrwxrwx@ 1 bconner  admin  33575072 Jun 13 12:50 hum01.wav
-rwxrwxrwx@ 1 bconner  admin    111148 Jun 13 12:58 in01.wav
-rwxrwxrwx@ 1 bconner  admin    221228 Oct  2  2019 lock01.wav
-rwxrwxrwx@ 1 bconner  admin     89132 Jun 13 12:58 out01.wav
-rwxrwxrwx@ 1 bconner  admin     45822 Oct  2  2019 spin01.wav
drwxrwxrwx@ 1 bconner  admin     32768 Mar  8 09:55 swingh
drwxrwxrwx@ 1 bconner  admin     32768 Mar  8 09:55 swingl
drwxrwxrwx@ 1 bconner  admin     32768 Mar  8 04:59 swng

I eject and take the SD out of the reader, stick it in the board, and then this:
.

BCmini:~ bconner$ cd /Volumes/PBV3/aa_NoSloppy/Cantina 
BCmini:Cantina bconner$ ls -al
total 1024
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:48 .
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:26 ..
-rwxrwxrwx  1 bconner  admin   4096 Jun 13 14:32 ._test copy
-rwxrwxrwx  1 bconner  admin   4096 Jun 13 14:46 ._test copy 2
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:47 hi
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:47 hi copy
drwxrwxrwx@ 1 bconner  admin  32768 Jun 13 14:29 test copy
drwxrwxrwx@ 1 bconner  admin  32768 Jun 13 14:29 test copy 2
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:29 test2
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:31 untitled folder
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:31 untitled folder
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:32 untitled folder 2
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:32 untitled folder 3
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:32 untitled folder 4
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:33 untitled folder 5
drwxrwxrwx  1 bconner  admin  32768 Jun 13 14:47 untitled folder 6

…which is a bunch of empty directories that I made on the previous mount via board.
They were created with a mix of 2 methods, via GUI “New Folder” and command line mkdir.

This is consistent across other directories as well.
In board via Mass Storage:

BCmini:Cantina bconner$ cd ../BattLevl
BCmini:BattLevl bconner$ ls -al
total 332608
drwxrwxrwx  1 bconner  admin     32768 Jun  3  1980 .
drwxrwxrwx  1 bconner  admin     32768 Jun 13 14:26 ..
-rwxrwxrwx  1 bconner  admin  75236509 Mar  1  1982 2ý×ýsþþþ.¸ÿR
-rwxrwxrwx  1 bconner  admin  44368563 Mar  8  1981 ÉþýþAÿ—ÿ.õÿ5
-rwxrwxrwx  1 bconner  admin  50529092 Aug 26  1981 ëýšþ¹þžÿ.ßÿ”

Out of board in reader:

BCmini:~ bconner$ cd /Volumes/PBV3/aa_NoSloppy/BattLevl 
BCmini:BattLevl bconner$ ls -al
total 4608
drwxrwxrwx  1 bconner  admin    32768 Mar  8 10:03 .
drwxrwxrwx@ 1 bconner  admin    32768 Jun 13 14:26 ..
-rwxrwxrwx  1 bconner  admin     4096 Jun 13 13:50 ._boot.bmp
-rwxrwxrwx  1 bconner  admin     4096 Jun 13 13:50 ._boot01.wav
-rwxrwxrwx  1 bconner  admin     4096 Jun 13 13:50 ._font.bmp
-rwxrwxrwx  1 bconner  admin     4096 Jun 13 13:50 ._font01.wav
-rwxrwxrwx@ 1 bconner  admin    20542 Oct 29  2019 boot.bmp
-rwxrwxrwx@ 1 bconner  admin  1028412 Jan  7  2020 boot01.wav
-rwxrwxrwx@ 1 bconner  admin    20542 Oct 29  2019 font.bmp
-rwxrwxrwx@ 1 bconner  admin  1028412 Jan  7  2020 font01.wav

Very puzzling.
This is a freshly formatted card.

So, there seem to be two things going on here.
The first one is that proffieos shouldn’t crash when you try to do things with it and the SD card is busy. So when you discover an action that does that, please file an issue for it.

The second one is that your computer seems to be keeping the SD card in an incomplete state for a large amount of time. Not sure why it would do that, but I can’t find any difference in the SDMMC code and the SDSPI code, so I think your computer would do this whether it is a V2 or a V3 board.

In general, the board has very little control over what the computer does, but there may be some flag that we can report back that indicates that the media is removable and that the computer should try to sync any outstanding changes as quickly as possible. (It’s possible we’re already setting this flag, if it exists, either way, I wouldn’t expect a difference between V2 and V3 boards here.)

1 Like

I have an issue in already, see #182.
I have never had a discrepancy of MacOS showing different contents like this with any board previously, so I reported here.
I just checked and it still reads garbage when in the board, but the test directories when the board.
However, the board plays the fonts fine. So it must be the computer. I’m going to leave this out of this thread for now after this post.
fsck saying this stuff

default	16:21:39.737443 -0400	Disk Utility	Drop superfluous clusters? yes
default	16:21:42.496550 -0400	Disk Utility	Item /DualPhze/SWNG does not appear to be a subdirectory
default	16:21:45.332336 -0400	Disk Utility	Correct? yes
default	16:21:48.121314 -0400	Disk Utility	/DualPhze/SWNG has too many clusters allocated (logical=0, physical=32768)
default	16:21:50.977354 -0400	Disk Utility	Drop superfluous clusters? yes
default	16:21:53.891396 -0400	Disk Utility	Item /DrkKyber/BGNDRAG does not appear to be a subdirectory
default	16:21:56.868280 -0400	Disk Utility	Correct? yes
default	16:21:59.739838 -0400	Disk Utility	/DrkKyber/BGNDRAG has too many clusters allocated (logical=0, physical=32768)
default	16:22:02.625239 -0400	Disk Utility	Drop superfluous clusters? yes
default	16:22:05.517563 -0400	Disk Utility	Item /DrkKyber/BGNLOCK does not appear to be a subdirectory
default	16:22:08.467668 -0400	Disk Utility	Correct? yes

So an a good note, and another subject, I have BladeID working great, with no pullup resistor, and with NO bladeID resistors in these 2 blades.

The values are reported to be ~735 for a 123 pixel blade I made myself,
and ~124 for a “Ciel Tan” pixel stick (likely V1).
With those numbers plugged into the blade config arrays, it’s working every time, even though they are so low.
Cool!

Interestingly, it seems like I haven’t added the proper code for this in ProffieOS yet. I’m going to do that and then have you test again. The values will be different, but hopefully closer to the actual resistor values.

Ok, I’ve checked in the updated blade ID code for V3 boards.
(It’s using the pin-bridge method, but the bridge is entirely internal to the board, so it should “just work”.)

It could be that the arduino-proffieboard plugin doesn’t handle corrupt blocks correctly. Maybe your real SD card reader reports some blocks as unredable, while the arduino-proffieboard implementation happily returns them. (Or maybe the other way around?)

I think the fact that the read differently is actually less important than how it got there. If we can make it less likely to get corrupted, then the “reading differently” problem kind of goes away. (Although I suppose it could be the same problem.)

Btw, if your blades don’t have resistors in them, you might need add this to your config file:

#define BLADE_ID_CLASS SnapshotBladeID<bladeIdentifyPin>

This will make it use the speed-of-charging-a-capacitor method of blade ID which sometimes works without resistors and is what you are using right now.

1 Like

I updated blade_id.h and added the above define.
All still working as it was previously, same values measured (734 and 124) and working well.
No blade measures 560, but it’s NOBLADE so that shouldn’t matter.

ok, scratch that. I just opened the blade reading as 124 and there’s a 330ohm resistor on the data line. Not sure what to make of that.

I havent added usb for mass storage and web usb yet. I guess Ill go there next and see if windows 10 does that to my sd. All my tests have been a ok so far. After I finish 4 micoms, Ill reflash and see where Im at.

To clarify after further playing, It’s the weirdest thing I’ve ever seen.
My computer shows folders and files fine with a card reader.
Over USB from a Proffieboard (not just the v3 board) Shows corrupt filenames, BUT the sounds work fine…sometimes. Sometimes there’s no sound because it’s missing.
I plugged in another older saber and things show up just fine, so I really have no idea, and I don’t think it’s a V3 board beta subject anymore.

1 Like

Welp, we still need to test it out I reckon. Most customers would probably rather add fonts through usb, especially with Fernandos coming goodies.

been too sick to do more tests, hopefully i het better soon. Saber still functioning fine on simple bladed basic config. No glitches to report.

1 Like

Aw man sorry to hear. Feel better Tom!

1 Like

Get well soon dude

1 Like

While Ive been sick. Tested charging via usb, successful, albeit slow.

I also wrote a more complex config file, and its working well. I have been using usb plus mass storage. No corrupt sd cards yet doing that, Windows 10. Im using a lot of Fernandos more complex bladestyles for 5.9 OS, and Brian’s seismic charge blade. All blades are running like Id expect them to.

Next, I think Im going for a remote usb port, and perhaps an OLED. The OLED will be very temporary on this saber, because the chassis really has no place for it.

I have actually tried OLED on a V3 board, so it’s not entirely necessary to try it again if you want to spend your energy trying something else. :slight_smile:

1 Like

Any way to test something to do with this?