We are getting datalog writing errors and I can’t figure out why. I’m curious if we are missing a step when imaging and setting up the roboRio?
Here are the steps we took:
Re-imaged the roborio to FRC_roboRIO_2024_v2.1
Format a USB stick to be FAT32
On the USB Stick create a U folder, then create a logs folder (/U/logs)
To be safe I also created a logs folder in the root directory (/logs)
Plug USB Stick into USB port of roboRio
Deploy robot code
Then we get these errors:
DataLog: Could not open log file '/U/logs/Log_975979bb69162699.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_a659b9492f4a3775.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_0eb428e76b43aee8.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_a3ca74cd236ea041.wpilog': No such file or directory
DataLog: Could not open log file '/U/logs/wpilog_aae3f90d7fed2b1b.wpilog': No such file or directory
DataLog: Could not open log file, no log being saved
I believe the usb drive automatically gets mounted with a symlink to /U/.
You shouldn’t have to create any directories on the flash drive. Try SSH-ing into the roborio to make sure the file structure is what you’re expecting.
Sorry, one important bit of information I left out:
We are using the latest AdvantageKit so there is no DataLogManager.start().
We started from the swervedrive example.
What brand of USB are you using? It might be that the USB is not recognized when connected to the roboRIO. I had tried a Samsung 64GB USB a few weeks ago that was formatted to FAT32, but the roboRIO could not recognize it, so I switched to a smaller generic 8GB USB with no issues.
We have tried to “break” it many times now, (hard power off, disabling the bot under heavy movement and use), and not seen the same errors being reported!
We problem that it was intermittently working. We were using some offbrand USB thumb drive. bought these 64 GB sandisk drives off Amazon and they’re working fine the past 2 days. https://a.co/d/fwFBubp
I wish I had bought the 32 GB instead. Come to find out the RoboRio only supports FAT32. And fat 32 is supported in windows only up to 32 GB. So I had issues just trying to format it to FAT32. I ended up using disk management in windows to partition only 32 GB of the 64.