Tuesday, March 01, 2011

Reading raw disks with python - Windows/Linux/Mac

We have been working for a while on an embedded solution that geo-tags jerks using an accelerometer (I know it sounds funny :)). Not wanting to increase the overhead on our tiny < 16MHz 8 bit AVR and maintain our precise sampling requirements, we came up with a simple filesystem that does the job and this fancy format meant that we needed some code on the computer end to read the sdcard. Took us a while to search out the raw disk file for Windows. The following snippet shows how to search the disk at a particular address - [Our disk structure had the word MOMS at that address.]

tl;dr Snippet to read the raw disk using python on Windows/Linux/MacOSX

5 comments:

Anonymous said...

Are you trying to map bad roads? ;-)

Good start! I want read-write access without a chance of destroying the system drive...

Any idea how to distinguish which drive is used for what, esp. on win?

register website said...
This comment has been removed by a blog administrator.
STC Technologies said...

Good organisations..

Anonymous said...

It seems that there is not a built in file() function...

Traceback (most recent call last):
File "", line 1, in
NameError: name 'file' is not defined

Unknown said...

Once you have recorded something to a disc or tape, you will then need to distinguish it from other similar media. How can this be done? Of course, by labeling — either with a pen or by applying some sort of label. CD & DVD Copies