The mmcsdpub Publisher

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

This publisher depends on the following services:
Drivers for SD card readers
Depending on your system, you might use either a devb-sdmmc or a devb-mmcsd driver. Regardless of its exact type or your hardware, the SD driver runs continuously and manages the SD device paths and communication with cards.
mcd
The mcd utility mounts the filesystems of inserted SD (and MMC) cards by making requests to the SD driver. The mountpoints chosen by mcd depend on the rules in its mountpoint file.

Architecture

Figure 1. MMC/SD publisher architecture

The arrows between components in Figure 1 show information flow. For example, when SD cards are inserted into or removed from card reader slots, the SD driver updates the states of the SD device entries (e.g., /dev/sda0 or /dev/sdb0). The mcd service monitors the states of the devices represented by those entries and when it notices that a card has been inserted, mcd sends mount requests to the SD driver process, which manages the device paths.

Meanwhile, mmcsdpub also monitors those same /dev entries and when it notices a state change, mmcsdpub communicates with 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.