Changelog
View Source[2.9.0] - 2025-10-04
Added
- The way firmware updates are downloaded and installed has been improved to support recovery of downloads in the event of application crashes and device reboots. The default update strategy has been encapsulated in a new module called
NervesHubLink.UpdateManager.StreamingUpdater, while the new optional caching updater strategy is implemented inNervesHubLink.UpdateManager.CachingUpdater. New update strategies can be added by implementing theNervesHubLink.UpdateManager.Updaterbehaviour. Please read the module documentation for more information. - The firmware update progress messages sent from Link to Hub have been improved to include more detailed information about the update process, including if the update was ignored, requesting it be rescheduled, or if an error occurred. These messages are backwards compatible with older versions of NervesHub.
- You can now connect to NervesHub using your TPM module for key and cert storage. If your project uses the TPM Hex library we will automatically configure the websocket to use the TPM module for reading the key and cert. Please refer to the readme for more information on how to configure this feature.
- The way firmware updates are downloaded and installed has been improved to support recovery of downloads in the event of application crashes and device reboots. The default update strategy has been encapsulated in a new module called
Updated
- Alarms relating to disk mounts being almost (or completely) full can be ignored. Previously only
/:disk_almost_fullAlarms were ingored, but this can now be configured to include other mounts. Please refer to the Extensions guide for more information. - How NervesHubLinks checks for network availability has been improved to reduce blocking of GenServer messages. Previously
:inet.gethostbyname/1was used, but under certain circumstances calls would take over 5 seconds, which would block calls to check on the status of the connection. Using:gen_tcp.connect/4allows for specifying a timeout, reducing the potential for the blocking of message processing.
- Alarms relating to disk mounts being almost (or completely) full can be ignored. Previously only
[2.8.1] - 2025-09-11
Added
- Send the firmwares validation status to NervesHub when the connection is established via an optional
Client.firmware_validated?/0callback. A default implementation is provided, while supporting overriding with custom logic. - Poll for firmware validation changes and send an update to NervesHub when the firmware is validated.
- Detect if a firmware revert has occurred and send this information to NervesHub when the connection is established. This is supported via an optional
Client.firmware_auto_revert_detected?/0callback. A default implementation is provided, while supporting overriding with custom logic. - Custom
Clients can now be implemented usinguse NervesHubLink.Client, eliminating the need to implement allClientbehavior callbacks.
- Send the firmwares validation status to NervesHub when the connection is established via an optional
Updated
- Support for Elixir 1.13.x has been removed
[2.8.0] - 2025-08-22
Added
- Add a client callback for when the device is connected (#312) (Thanks @amclain)
- Enable per-message WebSocket compression via Mint extensions (#318)
Updated
- Don't create duplicate Disconnected alarms (#317)
- Clear previous
CheckFailedalarms before setting a new one (#317) - Support the use of
:alarm_handlerfor health reports, removing theAlarmistrequirement (#317)
Fixed
- SSL:
cacertsno longer overridecacertfile(#321) (Thanks @D4no0)
- SSL:
[2.7.3] - 2025-04-15
- Fixed
- Fix pattern match for :disksup.get_disk_data()
[2.7.2] - 2025-03-28
Fixed
- Retrieve disk info differently based on OTP version
- Emit a warning when trying to retrieve public certs through Erlang on < OTP 25
Updated
- Force whenwhere 0.1.2 to fix compatibility with OTP 24 and earlier
[2.7.1] - 2025-03-26
- Fixed
- Revert Backoff/Certificate move to fix breaking change
[2.7.0] - 2025-03-19
Invalid Release
This release is now invalid, it contains unintended breaking changes to
NervesHubLink.Certificate and NervesHubLink.Backoff. Please use 2.7.1.
Added
- Improve how custom sets of metrics are defined (#279)
- Optional network traffic metrics (#267)
- REUSE compliance
Updated
- Use Credo within the CI build to ensure code quality (#257)
- Fix how download retry config is fetched (#280)
- Update documentation structure (#281)
- Require Alarmist when using alarms in the default health report (#263)
[2.6.0] - 2024-12-03
This update includes Extensions, a mechanism to handle extensions on a device
for custom data and/or reporting outside the firmware update mechanism. These
are isolated from the socket as to not get in the way of potential firmware
updates and can be defined in external libs as well as this one by implementing
the NervesHubLink.Extensions behavior. Extensions are controlled by NervesHub
and can be adjusted at the product or device level for granular control.
Added
- Add support for Extensions using the Socket (#228)
- Initial extensions supported are
NervesHubLink.Extensions.HealthandNervesHubLink.Extensions.Geo
- Initial extensions supported are
- Add support for Extensions using the Socket (#228)
Updated
- Bump device_api_version to 2.2.0; check README for details (#255)
[2.5.2] - 2024-10-09
- Updated
- Change to only configure if connecting (#229)
[2.5.1] - 2024-08-09
- Updated
- Fix issue causing shared secret authentications to fail until Erlang is able to catch the system time up. (#225)
[2.5.0] - 2024-07-14
This latest release requires Elixir 1.13 or later.
- Added
- Run a NervesHub script on device (#207)
- Updated
- Simplify connection settings (#214)
[2.4.0] - 2024-06-24
- Added
- Configure heartbeat msec (#197)
- Apply back pressure to downloader on slow updates (#202)
- Updated
- Fix no match error when uploading files (#190)
- Make shared secret auth the default (#176)
- Archive public keys can default to fwup public keys if not configured (#187)
[2.3.0] - 2024-05-11
- Added
- check for network connectivity before connecting (#181)
- Updated
- Log unknown messages from NervesHub
- Clearer and more consistent logging
[2.2.1] - 2024-04-19
Added
- New alarms via Erlang
alarm_handlerthat can be monitored directly or via libraries such as:alarmistNervesHubLink.DisconnectedNervesHubLink.UpdateInProgress
- NervesTime has been added as a dependency.
- Download current firmware public keys on device connection. If no public firmware signing keys are defined in your config, NervesHubLink will request them from NervesHub when establishing a connection.
- New alarms via Erlang
Updated
:public_keyCA certificates are used by default. If CAStore is included in your project it will be preferred.
[2.2.0] - 2024-03-18
This update includes Archives, which is an extra fwup file that is downloaded as part of a deployment. This allows you to send an update for something smaller than the whole firmware. Archives are validated with separate public keys for safety.
- Added
- Archive downloading and processing for extra packages
[2.1.1] - 2024-02-05
- Fixed
UploadFilestream changed to be backwards compatible with Elixir 1.16 and older
[2.1.0] - 2024-02-05
This update should be relatively safe and backwards compatible. It introduces some
new features with NervesHub including Pre-shared key authentication and file
upload/download ability through the console change. If you were previously
relying on NervesHubLink.Connection functions then you will need to review
and update your code to use NervesHubLink connection functions instead.
Removed
NervesHubLink.Connectionwas removed in favor is using the connection state of the socket instead.
Added
- Use the console channel to save files to the device (#131)
- Send a file to an attached NervesHub web console (#130)
- Pre-shared key authentication as an alternative to certificate authentication
Updated
- Default SNI from host if none specified
- Default to CAStore when no
:ca_certsare provided
[2.0.0] - 2023-08-22
The new release of NervesHubLink starts adding new features from NervesHub 2.0, such as identifying the device you have open in NervesHub and hooks to help prevent a thundering herd of device reconnects. It also cleans up the code base a bit by removing unused packages. Make sure to run mix deps.unlock --unused after updating to keep your lock file up to date.
Removed
- NervesHubCLI and NervesHubCAStore as dependencies
- NervesHubLinkCommon as dependencies, it was merged into this repo
Added
- Identify callback from NervesHub, a new message from the server that will let you blink an LED or anything else that will help you identify the device you're looking at is the one you have open in NervesHub.
- Add a client callback for changing the backoff timeouts on reconnects (#128)
[1.4.1] - 2023-05-26
Added
- Expose
NervesHubLink.console_active?for checking active IEx sessions (#123) - Improvements for Elixir 1.15 and OTP 26
- Expose
Fixed
- Stops IEx process with
:normalinstead of causing a crash (#121)
- Stops IEx process with
[1.4.0] - 2022-10-07
- Fixed
- Default to TLS 1.2 for all connections. This fixes issues if TLS 1.3 is used or attempted. See NervesHubWeb: Potential SSL Issues for more information.
[1.3.0] - 2022-09-06
- Fixed
- Use
Slipstream.push/5for safe publishing - Don't apply update by default if the UUID is the same
- Use
[1.2.0] - 2022-05-13
:nerves_hub_link_common 0.4.0Removed
- Elixir 1.10 is no longer supported. This matches the minimum version of
nerves_hub_link_commonwhich is Elixir 1.11
- Elixir 1.10 is no longer supported. This matches the minimum version of
Fixed
- Allow for
:slipstream ~> 1.0
- Allow for
[1.1.0] - 2021-12-09
Removed
- Elixir 1.8 and 1.9 are no longer supported. These hadn't been tested on CI and were removed when we started testing Elixir 1.13.
Added
- Retry timeouts are now being set on Slipstream via the
:reconnect_after_msecparameter. The timeouts start at 1 second and double up to 60 seconds plus a random amount of jitter. Previously the timeouts started under a second and maxed out at 5 seconds without jitter. These timeouts were chosen to reduce the load on NervesHub servers when large numbers of devices disconnect. They can be overridden.
- Retry timeouts are now being set on Slipstream via the
[1.0.1] - 2021-11-16
- Fixed
- A crash in the remote console would occur if a window resize message was received before the IEx process was started
[1.0.0] - 2021-10-25
This release only bumps the version number. It doesn't have any code changes.
[0.13.1] - 2021-10-19
- Fixed
NervesHubLink.reconnect/0no longer times out and instead disconnects the socket forcing the reconnection logic
[0.13.0] - 2021-10-01
Potentially Breaking
- Added
- Switch the websocket client to the Slipstream library for communication with NervesHub. There are no API changes. This should only be a change to the internals, but you may notice timing differences especially around retries.
[0.12.1] - 2021-08-19
- Added
NervesHubLink.reconnect/0to force reconnection of the socket and channels
0.12.0
fwup 1.0.0
Enhancements
- added
:fwup_envoption to the Configurator to support environment variables which are needed infwup
- added
0.11.0
- Breaking Changes
- This release includes a change to how CA certificates are used in the connection
to NervesHub. If you are connecting to the publicly hosted https://nerves-hub.org,
then no changes are required.
If you are manually supplying
:ca_certsconfig value to connect to another instance of NervesHub, then you will need to update you config following the instructions of CA Certificates in the README.
- This release includes a change to how CA certificates are used in the connection
to NervesHub. If you are connecting to the publicly hosted https://nerves-hub.org,
then no changes are required.
If you are manually supplying
0.10.2
- Fixes
- Fix issue that allowed unresolved atom keys in
:fwup_public_keysconfig which would break firmware updates by failing to validate the public key - Add missing dependency on
:inets
- Fix issue that allowed unresolved atom keys in
0.10.1
- Fixes
- Fix typo that would cause the device to fail to reboot after applying an update
0.10.0
nerves_hub_link_common 0.2.0Potential Breaking Changes
- This enforces the update data structure exchanged between device and server
and is mostly internal. However, if you implement your own
NervesHubLink.Clientbehavior, then you will need to yourNervesHubLink.Client.update_available/1to accept a%NervesHubLink.Message.UpdateInfo{}struct as the parameter instead of a map with string keys which was used until this point.
- This enforces the update data structure exchanged between device and server
and is mostly internal. However, if you implement your own
Enhancements
- Report API version to NervesHub. While there's currently only one version of the Device API, this is anticipation that we may want to change it in the future.
- On reconnect, notify NervesHub of firmware currently being downloaded so that NervesHub can differentiate failed firmware updates from network hiccups.
- Allow devices to implement their own reboot logic by implementing the
NervesHubLink.Client.reboot/0callback
Fixes
- Check
firmware_urlis valid before attempting update
- Check
0.9.4
- Enhancements
- Supports resuming failed downloads by offloading the responsibility of downloading
and applying updates to a new package:
nerves_hub_link_common
- Supports resuming failed downloads by offloading the responsibility of downloading
and applying updates to a new package:
v0.9.3
- Fixes
- Fixes misleading default error message report
- Ensures
:nerves_keyis started before use to deal with optional dependency start order bug
v0.9.2
- Enhancements
- Supports incoming
window_sizemessage from web channel to change the TTY size
- Supports incoming
v0.9.1
- Enhancements
- Send fwup version to server when connecting. This is required If you are using patchable firmware updates.
v0.9.0
This release supports the new NervesHub console terminal. After upgrading,
remote sessions should look almost the same as ssh-based ones: tab-completion,
colors, and commandline history work as expected now.
v0.8.2
- Bug Fixes
- Fixes a broken call to
handle_fwup_messageon fwup success (thanks @bmteller! :heart:)
- Fixes a broken call to
v0.8.1
- Enhancements
- Flatten console data being sent to NervesHub
- Log all fwup progress percentage messages
v0.8.0
nerves_hub_cli -> 0.10.0- This decouples the CLI from the deprecated:nerves_hublib and frees this lib to do the same. If you are setting:nerves_hub, org: orgin your config, compilation will fail until you change it to use this lib key:
config :nerves_hub_link, org: orgnerves_hub_user_api -> 0.6.0Enhancements
- Updates example app
- Cleanup and structural changes
- The default NervesHub certificates are no longer stored in the
privdirectory so if you're not using them, they won't be included.
Fixes
- Fixes an issue where a device may get an update message from the server while performing an update which would cause things to crash.
- decouples
:nerves_hubconfig values - see note above
v0.7.6
Various cleanup and structure changes
- Enhancements
- Add
Configuratorbehavior - Gives the user a chance to do some configuration at runtime :nerves_keyas optional dep
- Add
v0.7.5
- Bug fixes
- Check NervesKey is provisioned before attempting to use it
v0.7.4
- Enhancements
- Rename to
NervesHubDevice - Remove
HTTPsupport to use channels exclusively - Reorganize as a an
Applicationand remove ability to start a supervisor separately - Support using
NervesKeyvia a configuration flag
- Rename to
v0.7.3
Bug fixes
- Fix a NervesHub remote console issue due to missing
:io_requesthandling
- Fix a NervesHub remote console issue due to missing
Enhancements
- Add support for querying the NervesHub connection state so that this is easier to plug into Erlang's heart callback. This makes it possible to have a device automatically reboot if it can't reach NervesHub for a long time as a last ditch attempt at recovery. This has to be hooked up.
v0.7.2
- Enhancements
- Report firmware update progress so it can be monitored on NervesHub.
v0.7.1
- Bug fixes
- Handle firmware download connection timeout to fail more quickly when connections fail
v0.7.0
- New features
- Support remote IEx access from authorized NervesHub users, but only if
enabled. To enable, add
config :nerves_hub, remote_iex: trueto yourconfig.exs
- Support remote IEx access from authorized NervesHub users, but only if
enabled. To enable, add
v0.6.0
New features
- Support remote reboot request from NervesHub
Bug fixes
- Fix decoding of private key from KV
v0.5.1
- Bug fixes
- Increased download hang timeout to deal with slow networks and <1 minute long hiccups
- Fixed naming collision with a named process
v0.5.0
- Enhancements
- nerves_hub_cli: Bump to v0.7.0
- The Phoenix Channel connection no longer uses the topic
firmware:firmware_uuidand instead connects to the topicdevice.
v0.4.0
This release has backwards incompatible changes so please read carefully.
The configuration key for firmware signing keys has changed from :public_keys
to :fwup_public_keys.
If you are not using nerves-hub.org for your NervesHub server, the configuration
keys for specifying the device endpoint for the server have changed. Look for
:device_api_host and :device_api_port in the documentation and example for
setting these.
- Enhancements
- All firmware metadata is now passed up to the NervesHub. This will make it possible for the server to make decisions on firmware that has been loaded outside of NervesHub or old firmware that has been unloaded from NervesHub.
- Code cleanup and refactoring throughout. More passes are planned.
v0.3.0
Enhancements
- Add uuid and dn to http headers for polling requests
Bug fixes
- Fix crash when no updates were available
v0.2.1
- Bug fixes
- Use CA certificates from
:nerves_hubinstead of:nerves_hub_core.
- Use CA certificates from
v0.2.0
- Enhancements
- Updated docs.
- Added support for NervesKey.
- Added support for performing conditional updates.
- Include
fwupelixir dependency for interfacing withfwup. - Update deps and code to make it possible to run on host for testing.
- Automatically call
NervesHub.connect()instead of requiring it to be specified. - Improved error handling and reporting.
v0.1.0
Initial release