My impression is that, if multiple processes try to send AT commands via the serial interface at the same time, the commands can get interleaved. (e.g. if I have a daemon monitoring cell signal, and I try to send an SMS at the same time.) Is there a tool, some sort of serial multiplexer, that I can use to prevent this from happening?
I think modemmanager has a dbus interface for sending AT commands, but I am not using modemmanager...
Depends upon " .. all those tools .. " In case of shell scripts/functions, just to be wrapped within flock usage. In worst case, you are correct. Other standard strategy is serialization. I.e. your daemon also listens to a (named) pipe, containing the AT-cmds from " ... other tools ..." . And your daemon then executes these cmds, and passes results back. You should provide more info about required functionality, to select appropriate solution. You might PM me.