Something like chkdsk for SdCard in python ?

Discussion related to "under the hood" OpenMV topics.
User avatar
chrisPyres66
Posts: 148
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Something like chkdsk for SdCard in python ?

Postby chrisPyres66 » Wed Mar 25, 2020 6:48 am

Hi all,

I hope everything is ok for all at this world around confinement period.

I use M7 with sdcard to record pictures and send them later through UART.
So i record files, send the name or data of theses files, then erase them.

As i still use openmvide to check python code, sdcard is sometimes corrupted.

I would like to know if there is a way in python to check and repare sdcard like chkdsk ?
I did not success to do it with os lib.

Thanks,
User avatar
iabdalkader
Posts: 1193
Joined: Sun May 24, 2015 3:53 pm

Re: Something like chkdsk for SdCard in python ?

Postby iabdalkader » Wed Mar 25, 2020 12:51 pm

Hi, we're okay thanks for asking...

No, MicroPython doesn't format or repair the SD card. Only the flash is managed.
User avatar
chrisPyres66
Posts: 148
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: Something like chkdsk for SdCard in python ?

Postby chrisPyres66 » Thu Mar 26, 2020 11:45 am

Ok, what a pity !

Have you an idea how compress files in tgz before sending thourgh uart ?

I found
- uzlib but it is only decompression
and not installed
- on micropython website :
- https://github.com/micropython/micropyt ... r/utarfile
- https://github.com/micropython/micropyt ... er/zipfile
- on pipy website
- https://pypi.org/project/micropython-tarfile/

... I am lost !
Thanks,
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: Something like chkdsk for SdCard in python ?

Postby kwagyeman » Thu Mar 26, 2020 12:30 pm

Jpg compression is already pretty high... what do you need to compress?
Nyamekye,
User avatar
iabdalkader
Posts: 1193
Joined: Sun May 24, 2015 3:53 pm

Re: Something like chkdsk for SdCard in python ?

Postby iabdalkader » Thu Mar 26, 2020 8:12 pm

Maybe you can find an external compression module/library here:
https://github.com/micropython/micropython-lib

It won't be fast, but it should work.
User avatar
chrisPyres66
Posts: 148
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: Something like chkdsk for SdCard in python ?

Postby chrisPyres66 » Wed Apr 01, 2020 11:40 am

Yes, i agree jpeg has good compression even with lost.
The idea was to do a big pack to send....

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests