IPC GET_STATUS messages

65 views
Skip to first unread message

Matthew Osborne

unread,
Apr 12, 2023, 4:08:49 PM4/12/23
to swupdate
Hello, 
we've recently updated from v2020-11 to v2022-05 and have noticed that the `getstatus status_func` callback function specified using `swupdate_async_start` is no longer being called during an update.
Is this expected?
Thanks,
Matt

Matthew Osborne

unread,
Apr 12, 2023, 6:36:02 PM4/12/23
to swupdate
Looks like it is this change...  We are checking for message type GET_STATUS in the callback before using it... In the latest version they all have type ACK.
diff.png

Stefano Babic

unread,
Apr 13, 2023, 8:35:59 AM4/13/23
to Matthew Osborne, swupdate
Hi Matthew,

On 13.04.23 00:36, Matthew Osborne wrote:
> Looks like it is this change...  We are checking for message type
> GET_STATUS in the callback before using it... In the latest version they
> all have type ACK.
> diff.png

Can you use plai text instead of attaching picture, please ? It makes no
sense.

IPC messages are thought to be acknowledged or rejected by the receiver.
The type should be ACK or NACK instead of returning back the type of
request.

Best regards,
Stefano Babic

>
> On Wednesday, 12 April 2023 at 13:08:49 UTC-7 Matthew Osborne wrote:
>
> Hello,
> we've recently updated from v2020-11 to v2022-05 and have noticed
> that the `getstatus status_func` callback function specified using
> `swupdate_async_start` is no longer being called during an update.
> Is this expected?
> Thanks,
> Matt
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/e84a9489-8354-45a3-bc2f-f4ab6f9016ebn%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/e84a9489-8354-45a3-bc2f-f4ab6f9016ebn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Message has been deleted
Message has been deleted
Message has been deleted

Matthew Osborne

unread,
Apr 13, 2023, 11:25:20 AM4/13/23
to swupdate
Sure, we use the client library getstatus callback; after updating from v2020-11 to v2022-05 the type of messages being passed to this callback has changed from GET_STATUS to ACK.
Just wanted to check that this is intended; we are using the client library as recommended to maintain compatibility, so wasn't expecting this to change.
Best regards,
Matt

Stefano Babic

unread,
Apr 13, 2023, 11:33:45 AM4/13/23
to Matthew Osborne, swupdate
On 13.04.23 17:25, Matthew Osborne wrote:
> Sure, we use the client library getstatus callback; after updating from
> v2020-11 to v2022-05 the type of messages being passed to this callback
> has changed from GET_STATUS to ACK.
> Just wanted to check that this is intended;

This was a fix: an IPC message should return if was successful or not.

> we are using the client
> library as recommended to maintain compatibility, so wasn't expecting
> this to change.

Yes, it is not supposed to be changed, with exception for fixes.

Best regards,
Stefano

> Best regards,
> Matt
>
> On Wednesday, 12 April 2023 at 15:36:02 UTC-7 Matthew Osborne wrote:
>
> Looks like it is this change...  We are checking for message type
> GET_STATUS in the callback before using it... In the latest version
> they all have type ACK.
> diff.png
>
> On Wednesday, 12 April 2023 at 13:08:49 UTC-7 Matthew Osborne wrote:
>
> Hello,
> we've recently updated from v2020-11 to v2022-05 and have
> noticed that the `getstatus status_func` callback function
> specified using `swupdate_async_start` is no longer being called
> during an update.
> Is this expected?
> Thanks,
> Matt
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/540da8f6-7340-47bc-9f66-148af8e5b8a7n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/540da8f6-7340-47bc-9f66-148af8e5b8a7n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Matthew Osborne

unread,
Apr 13, 2023, 12:01:57 PM4/13/23
to swupdate
Thanks for the clarification, we'll adjust our message type check accordingly.

I have also noticed that we are sometimes no longer receiving the same information from the callback that we did in the previous version.
For example, when the certificate is not valid we would receive get status callbacks that mirror each of the messages being output on the console:
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   filename sw-description
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   size 10288
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   filename sw-description.sig
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   size 2602
[ERROR] : SWUPDATE failed [0] ERROR : Signature verification failed
[ERROR] : SWUPDATE failed [0] ERROR : Compatible SW not found
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...

We now no longer get any status callbacks in this case.
We were using the status callback text to get some more information about the failure; i.e. parsing out "ERROR : Signature verification failed".
Not sure how to work around this one.

Sorry for the churn, my replies are getting automatically deleted for some reason?

Thanks again,
Matt
Reply all
Reply to author
Forward
0 new messages