Spool Directories
Iridiumd
Iridiumd is a daemon process that runs both SBD (Short Burst Data) and SMS (Short Message Service). SBD and SMS don’t interact with each other, but they are put in the same daemon for better management of modem access and to reuse code where their functionalities overlap.
Spool Directories
Spool directories are lockless, supporting one reader and multiple writers. This requires writes to be made to a temp file on the same file system for which a tmp directory is provided. Once the new file is populated and closed, the destination directory is listed to determine the next file name and the atomic rename system call is used to move it there. If another process preempts the writer and the destination file already exists, the call simply fails and the writer increments the file name and rename attempt until it succeeds.
Base Directory | Subdirectory | Storage/fs | Writer | Reader | Description | ||||
---|---|---|---|---|---|---|---|---|---|
/sd/var/spool/sms | in | microsd ext4 | sms | sms | MT SMS messages are spooled here upon receipt from modem in the format of the header from the CMGL command “ | ” and then the PDU hex. | |||
/sd/var/spool/sms | out | microsd ext4 | sms | sms | MO SMS PDUs stored in raw format. | ||||
/sd/var/spool/sms | tmp | microsd ext4 | Directory to write temporary files to so that they can be atomically renamed to either in or out. This directory must always be on the same filesystem. This is key to lockless operation with potentially multiple writers. | ||||||
/var/spool/asterisk | in -> outgoing | tmpfs | symlink | ||||||
/var/spool/asterisk | out | tmpfs | asterisk | sms | MO SMS messages spooled from asterisk dial plan and picked up by sms daemon. | ||||
/var/spool/asterisk | outgoing | tmpfs | sms | asterisk | This name is hard-coded by asterisk, although it is logically used for inbound messages. | ||||
/var/spool/asterisk | tmp | tmpfs | |||||||
Base Directory | /sd/var/spool/sms | Storage/fs | Writer | Reader | Description | ||||
in | sms | sms | MT SMS messages are spooled here upon receipt from modem in the format of the header from the CMGL command “ | ” and then the PDU hex. |