简体   繁体   中英

Read CID of SDcard connected to USB-SD Reader under Linux

I can read CID info easily when the card is connected to SDIO interface:

stulluk@debian:~$ cat /sys/bus/mmc/devices/mmc0\:0007/cid
0150414a4836344713da8544b3012300
stulluk@debian:~$

But when I connect same card to USB-SDCard reader, I couldn't find any interface to read it in sysfs.

Is there such interface in Linux? Or, is there any other way to read from registers of SDcard over USB in Userspace, without modifying Linux Kernel ?

Many thanks.

But when I connect same card to USB-SDCard reader, I couldn't find any interface to read it in sysfs.

That would be because it's not available.

USB SD card readers use the USB Mass Storage device class. This interface is media-agnostic -- it's essentially a simplified version of SCSI. It doesn't provide any standard way of accessing SD-specific information, like the CID register, and most SD readers don't implement anything of the sort.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM