Translate

2013年8月22日星期四

Daily Life with Arduino Open Source

An artical "Recovering Data From a Broken SD Card Using Arduino" posted by EETimes, has taught us how to use Arduino open source in our daily life,expecially the use of SD Card.

Here are two methods for communicating with an SD card.

The typical method employed by your computer or most other devices is called SDIO (secure digital input output). SDIO allows for different methods of digital rights management as well as functional commands, such as write-protecting the card.

The other method of communication is through SPI (serial peripheral interface), a standard serial interface. Communication over SPI is much slower.

Severin Schols was aware of both of these methods, which is how he was able to retrieve data from a seemingly dead SD card. When his computer would no longer read it, he decided to attempt reading the SPI mode. To do this, he attached it to an Arduino clone using an SD card shield (expansion pack).

He started out just attempting to read the card information with a piece of code that came as an example with the Arduino. Surprisingly, the card information was displayed. This meant that even though his computer couldn't read it, the SPI interface was still functional. He proceeded to dump all the files off the card in hex format. At first an error prevented him from dumping all the files, but someone else pointed out that it was because he was not properly closing the files after he opened each one. Once the files were dumped as hex, he was able to use a quick python script to parse them.

He notes that there is another method that could dump the entire contents of the card in hex all at once, but for a 4 Gbyte card it could take days to complete.

All scripts that he used are available on his site. However, he probably just got really lucky that only the SDIO burned up, and not the SPI, too. You shouldn't count on this recovery method always working.


                          (from EETimes)

没有评论:

发表评论

Electronics Calculator Kit Build

1.Introduction:   ICStation Multi-functional Calculator DIY  Kit is powered by two CR2032 button batteries, integrates five different comput...