Linux下读取连接到USB-SD Reader的SD卡的CID [英] Read CID of SDcard connected to USB-SD Reader under Linux

查看:98
本文介绍了Linux下读取连接到USB-SD Reader的SD卡的CID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当卡连接到 SDIO 接口时,我可以轻松读取 CID 信息:

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:~$

但是当我将同一张卡连接到 USB-SDCard 读卡器时,我在 sysfs 中找不到任何接口来读取它.

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

Linux 有这样的接口吗?或者,有没有其他方法可以在不修改Linux内核的情况下通过USB在用户空间读取SD卡的寄存器?

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 ?

非常感谢.

推荐答案

但是当我将同一张卡连接到 USB-SDCard 读卡器时,我在 sysfs 中找不到任何接口来读取它.

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

那是因为它不可用.

USB SD 读卡器使用 USB 大容量存储设备类.该接口与媒体无关——它本质上是 SCSI 的简化版本.它不提供任何访问 SD 特定信息(例如 CID 寄存器)的标准方式,而且大多数 SD 读取器没有实现任何此类内容.

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.

这篇关于Linux下读取连接到USB-SD Reader的SD卡的CID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆