fwup, serves the remote console and support scripts, and runs the extensions.
This page describes NervesHubLink 2.14.0.
Add it to your project
mix.exs
config/target.exs
host with your own instance’s device endpoint if you do not use NervesCloud. Shared secrets must be enabled on the instance. See feature prerequisites.
Add to project and Connecting walk through the full setup, and the device authentication pages cover certificates, NervesKey and TPM.
How it picks an authentication method
NervesHubLink builds its connection settings with a configurator module. It picks one in this order:- The module in
config :nerves_hub_link, configurator: MyConfigurator, if set. NervesHubLink.Configurator.NervesKey, if thenerves_keylibrary is in your project.NervesHubLink.Configurator.TPM, if thetpmlibrary is in your project.NervesHubLink.Configurator.SharedSecret.
Configuration keys
Set these underconfig :nerves_hub_link. Defaults are from NervesHubLink.Configurator.Config.
Connection
The socket reconnects with a delay that starts at 1 second and doubles up to 60 seconds, with up to 50% jitter. Override it with
reconnect_after_msec in socket.
device_api_host, device_api_port and device_api_sni are deprecated. Use host and sni.
See Transport and Connection lifecycle.
Authentication
Updates
From 2.13.0, firmware and archives that cannot be signature verified are refused. A device with no keys configured that receives none from NervesHub stops taking updates.
Console and extensions
Client identification
From 2.14.0, NervesHubLink sendsNHL/<version> as the User-Agent of its WebSocket connection, as it already did for firmware downloads. NervesHub 2.5.2 and later record it for each connection. A User-Agent you set in the socket headers is kept. See Choosing a device client.
Library documentation
The library’s own documentation is on HexDocs and matches the version you install.nerves_hub_link on HexDocs
The guides and the module reference.
The Devices That Sleep guide describes a feature that is on the
main branch but in no tagged release as of nerves_hub_link 2.14.0 and NervesHub 2.5.4. See Sleeping devices.
