Skip to content

Consider using libqmi JSON definitions? #90

@ewildgoose

Description

@ewildgoose

Hi, I wrote an elixir wrapper around qmicli from libqmi. It works quite well (I will surely get around to opensourcing it real soon, especially if there were volunteers to help improve it?). However, I wanted something direct in elixir, especially as the protocol is quite straightforward

However, when I look at the code in nerves, I'm not sure that I understand what I'm seeing? There seems to be custom parsing functions for each QMI function we can call, despite that we can potentially automate much of that parsing (because the response and call are TLV params)? I wonder if you are aware of the JSON description files that are used to generate much of libqmi C code, here:

https://github.com/freedesktop/libqmi/tree/master/data

I concede that whilst I'm pretty sure we can do some magic with macros to take this json and use it to generate functions to call and parse the QMI functions/responses, I also concede it's above anything I've tried so far...

So Q. Is there any interest to create a low level "codec", which is autogenerated from libqmi definitions?

Note that I expect on top of that to need to add a higher level API which translates some of these values, ie as is qmicli to libqmi. Many of the low level responses benefit from scaling, translating, coalescing, etc

Any thoughts? Also, is there a mailing list that would be a more appropriate place to discuss this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions