You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subsys: mgmt: hawkbit: change hawkbit interface to support ip addresses
Previously, hawkbit interface only supported a url/hostname and a port,
and internally it resolves to an IP address. This does not work for
network layers that rely on NAT64, like OpenThread. Zephyr's
implementation of `getaddrinfo` is not aware of NAT64. DNS will resolve
an IPV4 address that needs to be converted to IPV6 with the NAT64
prefix.
Instead, this commit alters the Hawkbit interface to allow providing an
IP address and hostname as a string, so an application can provide an
already resolved IP address if desired. This commit also changes the
usage of `hawkbit_runtime_config.server_addr` to point to an IP address,
and uses a new variable `hawkbit_runtime_config.server_hostname` for the
URL. If `server_addr` is not provided, hawkbit will resolve
`server_hostname`.
This commit also adds a check for hostname strings that are too long.
Previously, hawkbit would simply truncate the hostname and quietly fail
to connect. Now it returns an error to the application.
This commit also changes how the controllerId is generated based on
device id, and disentangles the two. The controllerId is what hawkbit
uses to uniquely identify a device, and is not necessarily the same as
the device id, and should be fully customizeable by the user if needed.
Previously, all custom device ids were being prepended with
`CONFIG_BOARD`. When a user selects `CONFIG_HAWKBIT_CUSTOM_DEVICE_ID`,
they should be able to specify the full controllerId used with hawkbit.
Signed-off-by: Neal Jackson [email protected]
0 commit comments