Closed masa-raritan closed 4 years ago
Yes, this can be done. I'm working on this in a dedicated branch: https://github.com/Legrandgroup/libezsp/tree/add-version-getter-to-api
Hello @masa-raritan, can you check if the code introduced in PR #57 fits your need?
Hi @lionelains. This should fit my needs. Is there a way to read out the firmware version from the update binaries too?
I guess it is then OK to merge this into master, and close this issue. Am I right? Meanwhile, I am going to check if version can be extracted from gbl files.
Yes, thank you.
Code in PR #57 implements this and has been merged into master, available in release v2.1.0. Example on how to use the getter this can be found here: https://github.com/Legrandgroup/libezsp/blob/8571574085160bc71177f68795f09b17b3c2ad7f/example/mainEzspStateMachine.h#L105
Note you should check that the libezsp library exports its NSEZSP::CLibEzspState state as NSEZSP::CLibEzspState::READY before you invoke NSEZSP::CEzsp::getAdapterVersion() or you might get an empty or incomplete version returned.
Is there a way to read out the firmware version from the update binaries too?
I have added a small utility for this purpose in the source tree: https://github.com/Legrandgroup/libezsp/commit/e5fa2d38fe1234d53d1c11625bcb91fbefac1602
Please provide a getter each of the following:
The firmware version is needed to check the dongle for an firmware update and for informational purposes of course.