Home/Support/Support Forum/How to actual delete file from flash memory in xbee 3

How to actual delete file from flash memory in xbee 3

0 votes
Well hey everyone,

I have kind of asked this question in an other topic of mine, but it was mixed with some other questions, so I took the initiative to create a new topic, so that it doesn't get lost...

My equipment is an XBee 3 RF Zigbee module.

My issue is that I cannot release the flash memory occupied from a file, that I created. I am using uos.remove and the file is not listed anymore in uos.listdir (nor in XCTU's file manager), but the flash memory doesn't regain its size! The occupied flash memory, is only freed by formating the flash, something which is not helpful at all.

Any ideas and help about what could solve this problem is welcomed!
asked Nov 10, 2020 in XBee3 ZigBee by manos New to the Community (5 points)

Please log in or register to answer this question.

3 Answers

0 votes
You can only recover the flash if the file you want to remove is the last file that was uploaded to it.
answered Nov 12, 2020 by mvut Veteran of the Digi Community (14,879 points)
0 votes
Have you tried using uos.sync() ? I have had to do that to get files I created to show up, it might work in reverse for deleting files
answered Nov 23, 2020 by plater New to the Community (28 points)
0 votes
Thank you for your answers!

@plater thanks for the idea!
Fortunately, I managed to solve this by first updating the firmware...It seems like uos.remove method was not working properly in some older version of the firmware or something...
Anyway, updating the firmware and deleting (with uos.remove) the last file that shows up when you type uos.listdir() actually freed the specific part of the flash memory without having to (re)format it (and thus losing all files).
answered Nov 30, 2020 by manos New to the Community (5 points)