Giter Site home page Giter Site logo

qmi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qmi's Issues

Messages can be split between device reads

The current driver code assumes that every data buffer read from the QMI driver can be completely decoded. Sentry crash reports picked up a serial number report being split across two reads, so this assumption is wrong. It looks like this has only happened a few times over a whole lot of devices. Everything recovers after parsing crashes and restart.

A fix to this will likely fix #100.

QMI.Driver.fail_transaction_id crash

This gets recovered, but it seems strange that the responses got out of sync somehow. Posting here just in case it shows up again.

14:29:47.891 [error] GenServer :"Elixir.VintageNetQMI.QMI.wwan0.Driver" terminating
** (MatchError) no match of right hand side value: {nil, %{}}
    (qmi 0.8.3) lib/qmi/driver.ex:196: QMI.Driver.fail_transaction_id/3                                                                                                                (qmi 0.8.3) lib/qmi/driver.ex:192: QMI.Driver.handle_report/2                                                                                                                      (stdlib 3.17.1) gen_server.erl:695: :gen_server.try_dispatch/4                                                                                                                     (stdlib 3.17.1) gen_server.erl:771: :gen_server.handle_msg/6                                                                                                                       (stdlib 3.17.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3                                                                                                                  Last message: {:dev_bridge, #Reference<0.1377127605.2118909953.231868>, :read, <<1, 38, 0, 128, 1, 4, 2, 10, 1, 32, 0, 26, 0, 2, 4, 0, 1, 0, 14, 0, 1, 4, 0, 0, 0, 0, 0, 16, 2, 0, 3, 0, 17, 4, 0, 2, 0, 218, 0>>}
State: %QMI.Driver.State{bridge: #PID<0.3286.0>, device_path: "/dev/cdc-wdm0", indication_callback: #Function<0.22973782/1 in VintageNetQMI.indication_callback/1>, last_ctl_transaction: 4, last_service_transaction: 273, ref: #Reference<0.1377127605.2118909953.231868>, transactions: %{}}

Support QMI_WDS_GET_PKT_SRVC_STATUS_IND indication

Placeholder for adding support for this indication we're seeing pretty consistently, but has not really been needed.

%{
  message: <<34, 0, 18, 0, 1, 2, 0, 2, 0, 18, 1, 0, 4, 19, 2, 0, 128, 136, 20, 1, 0, 5>>,
  service_id: 1,
  transaction_id: 1,
  type: :indication
}

Consider using libqmi JSON definitions?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.