The mmcsdpub Publisher

Updated: May 06, 2022

The mmcsdpub device publisher retrieves and publishes information about cards inserted into SD readers.

The publisher depends on the devb-sdmmc or devb-mmcsd driver for SD card readers. Regardless of your hardware, the SD driver runs continuously and manages the SD device paths and communication with cards.

Architecture


Architectural diagram showing mmcsdpub and the SD driver it uses to learn of card insertions and to retrieve device information, which it publishes through PPS
Figure 1. MMC/SD publisher architecture

The arrows between components in Figure 1 show information flow. For example, when cards are inserted into or removed from card reader slots, the SD driver updates the states of the SD device entries (for instance, /dev/sda0 or /dev/sdb0).

The mmcsdpub publisher monitors those same /dev entries and, when it notices a state change, asks the driver to retrieve the device and mount information, which it then writes to the appropriate PPS objects. Subscribed applications receive PPS updates when the content of those objects change, which occurs whenever SD or MMC cards are inserted or removed.

The mmcsdpub publisher works with setups where the device entries exist as long as the driver is running (even when the slots are empty) and also with setups where the device entries get created and deleted when cards are inserted and removed.