-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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.
|
There was a problem hiding this 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_SDcard.cpp
Outdated
Show resolved
Hide resolved
examples/Catena4430_Sensor/Catena4430_cMeasurementLoop_SDcard.cpp
Outdated
Show resolved
Hide resolved
) | ||
{ | ||
auto const pFram = gCatena.getFram(); | ||
pFram->saveField(cFramStorage::kDevAddr, 0); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
examples/Catena4430_Sensor/Catena4430_cMeasurementLoop_SDcard.cpp
Outdated
Show resolved
Hide resolved
if (pFram == nullptr) | ||
return false; | ||
|
||
pFram->saveField(cFramStorage::kAppEUI, AppEUI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check error status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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_SDcard.cpp
Outdated
Show resolved
Hide resolved
examples/Catena4430_Sensor/Catena4430_cMeasurementLoop_SDcard.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
No description provided.