Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol implementation details are insufficiently abstracted over #224

Closed
fhars opened this issue May 26, 2021 · 3 comments
Closed

Protocol implementation details are insufficiently abstracted over #224

fhars opened this issue May 26, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@fhars
Copy link

fhars commented May 26, 2021

The library expects that users provide some generic MQTT subscribe and unsubscribe functions, but doesn't really tell what to do with packets recieved in response to these subscriptions, which is a bit unfortunate as the application has to pass the data received using different events (OtaAgentEventReceivedJobDocument or OtaAgentEventReceivedFileBlock). So one has to rifle through the source of the library to find out which topics it may subscribe to and then dispatch in the application code. And this is quite error prone as you have to very specific about which data you pass to the library, if you for example pass everything that matches "$aws/things/+/jobs/#" as an OtaAgentEventReceivedJobDocument event, you invariably run into

1454 39489 [Cloud] [DEBUG][Cloud][39489] Packet on $aws/things/MwAcABNQUk5VODkg/jobs/AFR_OTA-fw-dev-20210526-124903/update/accepted{"timestamp":1622034320}
...
1474 39658 [OTA] [DEBUG][OTA][39658] Found valid event handler for state transition: State=[WaitingForFileBlock], Event=[ReceivedJobDocument]

which then aborts the current transfer, re-requests the next job and starts the transfer again, which then gets about as far as the attempt before. Also, the AppCallback is never called with OtaJobEventProcessed for these messages, so the buffers used for these messages are never freed (which can be seen as a saving grace in this case, as it prevents the code from downloading the first few blocks of the update in an endless loop until the included data volume on the SIM card is exhausted).

@dachalco dachalco assigned dachalco and pvyawaha and unassigned dachalco and pvyawaha May 27, 2021
@pvyawaha
Copy link
Contributor

pvyawaha commented Sep 1, 2021

Hello,

Thank you for reporting this , we are now actively looking into reproducing and fixing the issue and also looking into test cases and support for OTA on platforms with cellular connectivity.

@yanjos-dev yanjos-dev added the enhancement New feature or request label Dec 6, 2021
@lightblu
Copy link

+1 and see #218 (comment) - this at least needs to be much better documented.

@n9wxu
Copy link
Member

n9wxu commented Dec 20, 2023

No further development will be performed on this library. See the readme.

@n9wxu n9wxu closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants