<div dir="ltr">Hey
Bjørn and Aleksander,<div>Thanks !</div><div>I tested the Bjørn's patch and it works fine</div><div>I attached the log for the first 5 transactions.</div><div>Is the result as expected?</div><div><br></div><div>Thanks,</div><div>Edward Chang</div><div><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 22, 2020 at 3:59 PM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Bjørn & Edward<br>
<br>
> >> I've opened a new issue in gitlab for your problem:<br>
> >> <a href="https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/9" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/9</a><br>
> >> Will take a look at the problem sometime this week.<br>
> ><br>
> > Something is incrementing the transaction id between each fragment:<br>
> ><br>
> > [21 ä¹ 2020, 09:55:23] [Debug] [/dev/cdc-wdm_pcie] Sent message (translated)...<br>
> > <<<<<< Header:<br>
> > <<<<<< length = 4096<br>
> > <<<<<< type = command (0x00000003)<br>
> > <<<<<< transaction = 4<br>
> > <<<<<< Fragment header:<br>
> > <<<<<< total = 65<br>
> > <<<<<< current = 0<br>
> > <<<<<< Contents:<br>
> > <<<<<< service = 'qdu' (6427015f-579d-48f5-8c54-f43ed1e76f83)<br>
> > <<<<<< cid = 'file-write' (0x00000003)<br>
> > <<<<<< type = 'set' (0x00000001)<br>
> > <<<<<< Fields:<br>
> > <<<<<< DataBuffer =<br>
> > ..<br>
> ><br>
> > <<<<<< Header:<br>
> > <<<<<< length = 4096<br>
> > <<<<<< type = command (0x00000003)<br>
> > <<<<<< transaction = 5<br>
> > <<<<<< Fragment header:<br>
> > <<<<<< total = 65<br>
> > <<<<<< current = 1<br>
> > <<<<<< Contents:<br>
> > <<<<<< service = 'invalid' (00000000-0000-0000-0000-000000000000)<br>
> > <<<<<< cid = '(null)' (0x00000000)<br>
> > <<<<<< type = 'query' (0x00000000)<br>
> ><br>
> ><br>
> ><br>
> > That's not good. The function is supposed to err out both transactions<br>
> > when it sees this second fragment with a new transaction id:<br>
> ><br>
> > If the function receives a fragment that is not the first fragment of a<br>
> > new command with a new TransactionId, both commands shall be<br>
> > discarded. One MBIM_FUNCTION_ERROR_MSG message per TransactionId shall<br>
> > be sent.<br>
><br>
> A proposed quickfix here:<br>
> <a href="https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/merge_requests/32" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/merge_requests/32</a><br>
><br>
<br>
Nice! this makes sense, nice catch :)<br>
<br>
Edward, would you be able to test with Bjørn's patch?<br>
<br>
> But as noted: A real fix for proxied fragments will have to prevent<br>
> other clients from interfering. Access to a device should be blocked<br>
> once a client starts a fragmented transaction, until either all<br>
> fragments have been submitted or some reasonable timeout. I guess<br>
> MAX_TIME_BETWEEN_FRAGMENTS_MS could be re-used.<br>
><br>
> This means that fragmented transactions must be tracked by the proxy.<br>
><br>
<br>
I've opened a new Issue to track this:<br>
<a href="https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/10" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/10</a><br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>