Skip to contentSkip to conversation

Enabling SD Card Detection for USB SD Card Reader

DISCUSSION Tom Gibson 2 participants 2 messages May 4, 2018

lore
Share & tools
lore

Tom Gibson

author
#0 lore raw

Hi,

We would like to enable our Yocto distribution to auto-detect when an SD card is inserted in a USB SD card reader, in much the same way as a card is detected on desktop linux such as Ubuntu. We have got our USB card reader working with the generic-storage driver, but at the moment we have to do something like 'fdisk -l' to refresh the attached storage after a card is inserted or removed in order for it to it to be listed in /dev. The card reader shows up as /dev/sda regardless of whether there is a card present or not, but the partition on the card only shows up as /dev/sda1 after forcing the refresh.

Any pointers towards which service we need to install to enable this functionality appreciated!

Regards,

Tom Gibson
C Software Limited

#1 lore raw
Quoted 16 lines · Tom Gibson

Hi,

We would like to enable our Yocto distribution to auto-detect when an SD card is inserted in a USB SD card reader, in much the same way as a card is detected on desktop linux such as Ubuntu. We have got our USB card reader working with the generic-storage driver, but at the moment we have to do something like ‘fdisk -l’ to refresh the attached storage after a card is inserted or removed in order for it to it to be listed in /dev. The card reader shows up as /dev/sda regardless of whether there is a card present or not, but the partition on the card only shows up as /dev/sda1 after forcing the refresh.

Quoted 3 lines

Any pointers towards which service we need to install to enable this functionality appreciated!

perhaps you should be able to use udisks2