Skip to content

Conversation

@divkam
Copy link
Contributor

@divkam divkam commented Jan 31, 2017

No description provided.

@divkam
Copy link
Contributor Author

divkam commented Jan 31, 2017

@jnorgan @plasticchris

@divkam
Copy link
Contributor Author

divkam commented Jan 31, 2017

For the sensor firmware update, the only version we need to compare is the tvoc_app_fw_version. I have added the boot fw and hardware version just in case we need it in the future.

periodic.proto Outdated
}

message tvoc_version {
optional uint32 tvoc_app_fw_version = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain what these two fields represent? app_fw_version & boot_fw_version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

app_fw_version - sensor application firmware version
boot_fw_version - sensor boot firmware version.
Only the application firmware version needs to be compared in order to issue an update. Will add this in comments as well

@divkam
Copy link
Contributor Author

divkam commented Jan 31, 2017

Expected values for tvoc_app_fw_version:
0.2.4 - 0x0204
0.2.11 - 0x020B
1.0.0 - 0x1000
1.1.0 - 0x1100 (latest sensor firmware version)

boot_fw_version and hw_fw_version can be ignored

@pims
Copy link
Contributor

pims commented Feb 1, 2017

@divkam can you elaborate on how this is intended to be used?

@divkam
Copy link
Contributor Author

divkam commented Feb 1, 2017

The motivation behind this change is to update the gas sensor application firmware to the latest version (as provided by the manufacturer). The application firmware is a *.bin file that is about 5kB in size. This file needs to be downloaded on to the device SD card. Once it is downloaded on the device SD card, device firmware will check the update_tvoc_fw in the sync response to program and update the sensor.

The firmware version will be part of the periodic upload, which the server can use to issue a sensor firmware update

@pims
Copy link
Contributor

pims commented Feb 1, 2017

@divkam thanks. How do we intend to get it on the SD? Is it possible to use the presence of this file in the FileDownloads instead?

@divkam
Copy link
Contributor Author

divkam commented Feb 1, 2017

Download to SD card is using the existing FileDownload mechanism in the sync response.

@pims
Copy link
Contributor

pims commented Feb 1, 2017

Ok, so why the extra Boolean? Can we infer that we should update by the presence of the file?

@divkam
Copy link
Contributor Author

divkam commented Feb 1, 2017

The same download mechanism is used for sleep sound downloads. So, the file could be a tone instead of a firmware binary.

@divkam
Copy link
Contributor Author

divkam commented Feb 2, 2017

As discussed with @pims, merging only the periodic upload of gas sensor firmware version for now. Will add additional fields (if needed) later for the sensor firmware update.

periodic.proto Outdated
optional int32 uv_count = 7;
}

message tvoc_version {
Copy link
Contributor

Choose a reason for hiding this comment

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

the protobuf convention is to have message names be UpperCamelCase like KeywordStats for instance.

Copy link
Contributor

Choose a reason for hiding this comment

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

it's not like we've been consistent, but it's good practice 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, will change.

@divkam divkam merged commit 873cdf6 into master Feb 2, 2017
@divkam divkam deleted the tvoc-fw-update branch February 2, 2017 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants