qmi-dialer is a (hopefully) easy-to-follow example of how to use QMI to establish a connection and extract some information.