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

migrate device from TTN V2 to TTN V3 #22

Merged
merged 11 commits into from
Aug 25, 2021
Merged

migrate device from TTN V2 to TTN V3 #22

merged 11 commits into from
Aug 25, 2021

Conversation

dhineshkumarmcci
Copy link
Member

No description provided.

@dhineshkumarmcci
Copy link
Member 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.

examples/Catena4430_Sensor/Catena4430_cMeasurementLoop.cpp Outdated Show resolved Hide resolved
)
{
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
Member 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
Member 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
Member 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.

examples/Catena4430_Sensor/Catena4430_cMeasurementLoop.h Outdated Show resolved Hide resolved
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.

examples/Catena4430_Sensor/Catena4430_cMeasurementLoop.cpp Outdated Show resolved Hide resolved
@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.

2 participants