Simple QMI proxy application example.

Christian Melki christian.melki at t2data.com
Mon Oct 25 14:21:10 UTC 2021



On 10/25/21 2:16 PM, Bjørn Mork wrote:
> Aleksander Morgado <aleksander at aleksander.es> writes:
> 
>> If you're looking for a "raw" program that uses the qmi-proxy
>> connection directly without using libqmi-glib, I'm not sure there is
>> any out there yet.
> 
> I have been using the proxy in my own extremely hackish perl test
> scripts.  This isn't something anyone should use as-is, but might serve
> as an example of how to use the proxy without libqmi-glib (or even C):
> 
> https://git.mork.no/wwan.git/tree/scripts/qmi.pl#n2636
> 
> Please don't laugh at my perl code... ;-)
> 

Thanks. :)

>> Shouldn't be too difficult to setup one though; the qmi-proxy just
>> listens on an abstract unix socket (:qmi-proxy) and then relies on a
>> custom operation in the CTL service named "Internal Proxy Open", with
>> command ID 0xFF00, and which receives as input a TLV with id 0x01
>> formatted as a string and including the device path to open. After
>> that, it's all plain QMI back and forth.
> 
> Precisely.  It's a very simple interface.
> 

Looks rather straightforward, yes.

> I also started on the attached implementation for uqmi a long time ago,
> but never finished it...  Lost interest since it mostly makes more sense
> to run a full fledged ModemManager on emebedded devices too.  Those that
> are not powerful enough are just not interesting ajnyway.
> 

Well. It's not just a question of computational power, RAM and storage 
that you can waste at will.

For example, say you're doing radio access monitoring and logging. 
You'll need to be able to update/fetch radio parameters _frequently_ as 
you're moving. Wrapping stuff in scripts or forcing glib into another 
framework might not be the best / easiest of choices.

I'd like to be able to fetch EARFCN, PCI, CID, RSRP, SINR, RSRQ, RI and 
ULRSSI equivalents from the RAT through QMI. Preferrably upwards a rate 
of 10Hz or better if possible.

And since the embedded device will probably run something like mm, nm 
etc, qmi-proxy seemed like a sane choice.

> But attaching as a semi-working example implementation
> 
> 
> Bjørn
> 


More information about the libqmi-devel mailing list