Code Monkey home page Code Monkey logo

raspberrypi_nvidiajetson-sdcard-smartquery's Introduction

Monitor SD card health and status using Raspberry Pi / NVIDIA Jetson Nano

Get S.M.A.R.T / CID data for Transcend Embedded microSD / SD products.


The various statuses of microSD products are located in the SMART block of the device. By reading and analyzing the SMART block, you can get the product name, serial number, firmware version, Erase count, health, etc. of the device, so as to monitor and find the device early potential problems. This document provides a way to use the MMC test tools called mmc-utils that get SMART block to enable SMART command via the native microSD slot or Transcend RDF5 Card Reader on Raspberry Pi / NVIDIA Jetson Nano.

Note : The project works for Transcend Embedded microSD / SD products.

Hardware requirements

  1. Supported Platforms

    • Raspberry Pi 1 or later model
    • NVIDIA Jetson Nano
  2. Supported SD cards

    • Transcend Embedded microSD 430T / 450I / 460I / 460T
    • Transcend Embedded SD SDC460T / SDC400I / SDC240T
  3. Supported Card Reader

    • Transcend RDF5

Install Raspberry Pi OS

  1. Download and install Raspberry Pi OS Imager(64-bit or 32-bit) to the tartget microSD with an SD card reader at https://www.raspberrypi.com/software

  2. Insert the microSD to Raspberry Pi native microSD or SD slot.

Install NVIDIA Jetson nano OS

  1. Download Jetson Nano Developer Kit SD Card Image from https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write

  2. Write the SD card image into the target microSD using a graphical program like Etcher.

  3. Insert the microSD to NVIDIA Jetson native microSD slot.

Usage with native microSD or SD slot.

  • The mmc-utils package and modify it to support SMART DUMP function. Please download the source code and modify it step by step.
  1. Download the code by following command with terminal.
 git clone https://kernel.googlesource.com/pub/scm/utils/mmc/mmc-utils
  1. Update the 4 files in mmc-utils folder to the corresponding files.

  2. Use the Make command to compile the updated source code.

 make
  1. After build success, check the availability of the mmc tool by -h
 sudo ./mmc โ€“h
  1. Get SMART buffer by following command.
 sudo ./mmc smtbuffer /dev/mmcblk0
  1. Get SMART information by following command.
 sudo ./mmc smart /dev/mmcblk0
  1. Get Card life by following command.
 sudo ./mmc health /dev/mmcblk0
  1. Get CID information by following command.
 sudo ./mmc cidinfo /dev/mmcblk0

Usage with the RDF5 Card Reader

Please change the < device > parameter by the USB card reader device. ex. /dev/sda

Command Execution

  1. To dump SMART raw data

    Buffer Buffer

  2. To show SMART info

    SMART SMART

  3. To show card life(Heath)

    Heath Heath

  4. To show CID info

    CIDInfo CIDInfo

Note: For other SMART / CID Data Structure, please refer to Transcend Embedded microSD / SD datasheet.
sdsmart sdcid

raspberrypi_nvidiajetson-sdcard-smartquery's People

Contributors

charlottechents avatar kechun0218 avatar slcheng avatar transcend-info avatar wbjismyname avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raspberrypi_nvidiajetson-sdcard-smartquery's Issues

ioctl fail: Invalid argument

Is the source code up to date?
It doesn't work well in my environment.

[Environment]
MicroSD: 430T 64GB
Card Reader: RDF5
OS: Fedora Linux 35 (Workstation Edition)
Device Name: /dev/sdb, /dev/sdb1

[Execution result]
sudo ./mmc smtbuffer /dev/sdb
ioctl fail: Invalid argument
CMD56 function fail, /dev/sdb

sudo ./mmc smtbuffer /dev/sdb1
ioctl fail: Invalid argument
CMD56 function fail, /dev/sdb1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.