Corrupt WIO Terminal Ardupy Drive

There seems to be an issue with my WIO Terminal in that the Ardupy Drive mounted at / has 60+ directories listed as ‘.’

From the aip repl I run the following:

for name in uos.ilistdir(“.”):
… print(name)


and here are a sample of the 60+ directories:

(‘\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00’, 16384, 0, 4294967295)
(‘\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00’, 16384, 0, 4294967295)
(‘\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00’, 16384, 0, 4294967295)

Surely this isn’t correct?
Can I somehow reformat it back to factory?
The “Hold button 1 + reset” doesn’t work.

My main app is receiving python files, (main.py and version.py), via a UART serial connection and writing them to the drive. This is so I can dynamically upload new code when required when the WIO is out in the field. Unfortunately this writing of these python files causes the VFS to have various issues, one being a growing number of “.” (dot) directories.

I am currently looking at an alternative solution using swap files or subfolders but as this is a critical part of our requirement we may have to move to another product.

Thanks

Hi @jim_macb,

Could you run this to erase the flash first?

You need to have the following 2 libraries:

Then open Arduino IDE, and upload a sample code such as:

void setup() {
}

void loop() {
}

This will get you back to factory.

After that, could you try to install ArduPy-aip and try again?

Best Regards,
Lakshantha