NervesHubLink integration
This section walks you through integrating a device with a NervesKey with NervesHub.
Last updated
Was this helpful?
This section walks you through integrating a device with a NervesKey with NervesHub.
Last updated
Was this helpful?
Devices must be registered with NervesHub via the commandline tools, web user interface or via an API integration first to authenticate with a NervesKey. The only exception is if you are using the JITP feature in which case registration is automated.
The command-line tools are the easiest for this. Follow to get them installed.
You will need the device's manufacturing serial number for this step. If you don't have it NervesKey.manufacturer_sn/1
can retrieve it. From the CLI, run mix nerves_hub.device create
. Fill in the manufacturing serial number when it asks for an identifier. Fill in the description
and tags
fields as you'd like:
If you are not using the Signer CA approach you also want to upload a certificate per device. This can be done using:
You can tell nerves_hub_link
to read those certificates and key from the chip and assign the SSL options for you by enabling add it as a dependency in your mix.exs
:
NervesKey will default to using i2c bus 1 and :primary
cerificate pair.
NervesHubLink will use the NervesKey library by default if it is available. NervesHubLink itself needs to be configured a bit: