Skip to content

Conversation

@dhineshkumarmcci
Copy link
Contributor

No description provided.

@dhineshkumarmcci
Copy link
Contributor Author

Tested the code changes, able to modify the AppEUI in FRAM, write zero to devAddr, unjoin network and rejoin the network. Also the file has been removed on updating AppEUI successfully.

cMeasurementLoop::fsmDispatch: enter stWriteFile
cMeasurementLoop::fsmDispatch: enter stTryToUpdate
cFramStorage::kAppEUI: update: success
cMeasurementLoop::fsmDispatch: enter stSleeping
using light sleep
EV_JOINING
EV_TXSTART
EV_JOIN_TXCOMPLETE

Copy link
Member

@terrillmoore terrillmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments. Not ready to merge.

)
{
auto const pFram = gCatena.getFram();
pFram->saveField(cFramStorage::kDevAddr, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can return an error. Check return value. As a consequence, rejoinNetwork can return an error.

Copy link
Contributor Author

@dhineshkumarmcci dhineshkumarmcci Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I have planned to check return value, unfortunately API saveField is of datatype void.

In this case, I believe we can use API getField to read the value written in FRAM, and then compare to check for error.

@terrillmoore Please advice on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I filed a bug report but didn't make the change. No, don't use getField(); the saveField() API is going to change to be bool, and we'll deal with it then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created a pull-request for changes with McciCatena::cFram::saveField() - Catena-Arduino-Platform PR-317

if (pFram == nullptr)
return false;

pFram->saveField(cFramStorage::kAppEUI, AppEUI);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check error status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I have planned to check return value, unfortunately API saveField is of datatype void.

In this case, I believe we can use API getField to read the value written in FRAM, and then compare to check for error.

Please advice on this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous.

Copy link
Member

@terrillmoore terrillmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more change needed, then OK to merge.

@dhineshkumarmcci dhineshkumarmcci merged commit 8e68909 into master Aug 25, 2021
@dhineshkumarmcci dhineshkumarmcci deleted the issue21 branch August 25, 2021 15:20
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

Successfully merging this pull request may close these issues.

3 participants