nerves_firmware_http v0.4.1 Nerves.Firmware.HTTP

HTTP/JSON microservice to query and update firmware on a Nerves device.

Defines an acceptor that receives and installs firmware updates. Simply use use HTTP PUT to send a firmware to the URI for the device, specifying Content-Type application/x-firmware

Also defines a provider for the application/json content type that allows an HTTP GET to reutrn information on the current firmware status and metadata in JSON form.

Configuration

In your app’s config.exs, you can change a number of the default settings by setting keys on the nerves_frirmware_http application:

keydefaultcomments
:port8988
:path“/firmware”
:stage_file“/tmp/uploaded.fw”Firmware will be uploaded here before install, and deleted afterward
:json_providerJSX
:json_opts[]
:timeout120000

So, for instance, in your config.exs, you might do:

  config :nerves_firmware_http, port: 9999,
                                path: "/services/firmware",
                                stage_file: "/my_tmp/new.fw"
                                json_provider: Poison,
                                json_opts: [space: 1, indent: 2]
                                timeout: 240_000

Summary

Functions

Application start callback

Functions

start(type, args)
start(atom, term) :: {:ok, pid} | {:error, String.t}

Application start callback