[英]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: 当卡连接到SDIO接口时,我可以轻松读取CID信息:
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. 但是,当我将同一张卡连接到USB-SDCard读卡器时,找不到在sysfs中读取它的任何接口。
Is there such interface in Linux? Linux中有这样的接口吗? Or, is there any other way to read from registers of SDcard over USB in Userspace, without modifying Linux Kernel ?
或者,是否有其他方法可以通过用户空间中的USB通过USB读取SD卡的寄存器,而无需修改Linux内核?
Many thanks. 非常感谢。
But when I connect same card to USB-SDCard reader, I couldn't find any interface to read it in sysfs.
但是,当我将同一张卡连接到USB-SDCard读卡器时,找不到在sysfs中读取它的任何接口。
That would be because it's not available. 那是因为它不可用。
USB SD card readers use the USB Mass Storage device class. USB SD卡读取器使用USB Mass Storage设备类。 This interface is media-agnostic -- it's essentially a simplified version of SCSI.
此接口与媒体无关-本质上是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.
它没有提供访问SD特定信息的任何标准方式,例如CID寄存器,并且大多数SD读取器没有实现任何此类功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.