initial deployable version, targe.secret.exs gitignored

master
Stefan Haslinger 2021-12-14 10:58:50 +01:00
commit f16c1d2700
14 changed files with 423 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# Used by "mix format"
[
inputs: [
"{mix,.formatter}.exs",
"{config,lib,test}/**/*.{ex,exs}",
"rootfs_overlay/etc/iex.exs"
]
]

20
sensor_hub/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where third-party dependencies like ExDoc output generated docs.
/doc/
# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Place to store the network config
/config/target.secret.exs

33
sensor_hub/README.md Normal file
View File

@ -0,0 +1,33 @@
# SensorHub
SensorHub is an **IOT-Demo Project Weather Station**
## Targets
* Raspberry PI 3 as target:
`export MIX_TARGET = rpi3`
* If MIX_TARGET is unset, host project is buildt for testing.
* Documenation on [Targets](https://hexdocs.pm/nerves/targets.html#content)
## Build
* Install dependencies with `mix deps.get`
* Create firmware with `mix firmware`
* Burn to an SD card with `mix firmware.burn`
The SD-Card Reader is properly detected.
## Sensors
### VEML6075 UV-Sensor
* Sparkfun [Product Page](https://www.sparkfun.com/products/15089)
* 🔖 [Hookup Guide](https://learn.sparkfun.com/tutorials/qwiic-uv-sensor-veml6075-hookup-guide)
## Links
* 🔖 [Introduction to Qwiic](https://www.sparkfun.com/qwiic)
* Official Nerves docs: <https://hexdocs.pm/nerves/getting-started.html>
* Official website: <https://nerves-project.org/>
* Forum: <https://elixirforum.com/c/nerves-forum>
* Discussion Slack elixir-lang #nerves ([Invite](https://elixir-slackin.herokuapp.com/))
* Source code: <https://github.com/nerves-project/nerves>

View File

@ -0,0 +1,33 @@
# This file is responsible for configuring your application and its
# dependencies.
#
# This configuration file is loaded before any dependency and is restricted to
# this project.
import Config
# Enable the Nerves integration with Mix
Application.start(:nerves_bootstrap)
config :sensor_hub, target: Mix.target()
# Customize non-Elixir parts of the firmware. See
# https://hexdocs.pm/nerves/advanced-configuration.html for details.
config :nerves, :firmware, rootfs_overlay: "rootfs_overlay"
# Set the SOURCE_DATE_EPOCH date for reproducible builds.
# See https://reproducible-builds.org/docs/source-date-epoch/ for more information
config :nerves, source_date_epoch: "1639411956"
# Use Ringlogger as the logger backend and remove :console.
# See https://hexdocs.pm/ring_logger/readme.html for more information on
# configuring ring_logger.
config :logger, backends: [RingLogger]
if Mix.target() == :host or Mix.target() == :"" do
import_config "host.exs"
else
import_config "target.exs"
end

View File

@ -0,0 +1,3 @@
import Config
# Add configuration that is only needed when running on the host here.

View File

@ -0,0 +1,99 @@
import Config
# Use shoehorn to start the main application. See the shoehorn
# docs for separating out critical OTP applications such as those
# involved with firmware updates.
config :shoehorn,
init: [:nerves_runtime, :nerves_pack],
app: Mix.Project.config()[:app]
# Nerves Runtime can enumerate hardware devices and send notifications via
# SystemRegistry. This slows down startup and not many programs make use of
# this feature.
config :nerves_runtime, :kernel, use_system_registry: false
# Erlinit can be configured without a rootfs_overlay. See
# https://github.com/nerves-project/erlinit/ for more information on
# configuring erlinit.
config :nerves,
erlinit: [
hostname_pattern: "nerves-%s"
]
# Configure the device for SSH IEx prompt access and firmware updates
#
# * See https://hexdocs.pm/nerves_ssh/readme.html for general SSH configuration
# * See https://hexdocs.pm/ssh_subsystem_fwup/readme.html for firmware updates
keys =
[
Path.join([System.user_home!(), ".ssh", "id_rsa.pub"]),
Path.join([System.user_home!(), ".ssh", "id_ecdsa.pub"]),
Path.join([System.user_home!(), ".ssh", "id_ed25519.pub"])
]
|> Enum.filter(&File.exists?/1)
if keys == [],
do:
Mix.raise("""
No SSH public keys found in ~/.ssh. An ssh authorized key is needed to
log into the Nerves device and update firmware on it using ssh.
See your project's config.exs for this error message.
""")
config :nerves_ssh,
authorized_keys: Enum.map(keys, &File.read!/1)
# Configure the network using vintage_net
# See https://github.com/nerves-networking/vintage_net for more information
# Will be overwritten in target.secret.exs, that's NOT checked in into git.
config :vintage_net,
regulatory_domain: "US",
config: [
{"usb0", %{type: VintageNetDirect}},
{"eth0",
%{
type: VintageNetEthernet,
ipv4: %{method: :dhcp}
}},
{"wlan0", %{type: VintageNetWiFi}
]
config :mdns_lite,
# The `host` key specifies what hostnames mdns_lite advertises. `:hostname`
# advertises the device's hostname.local. For the official Nerves systems, this
# is "nerves-<4 digit serial#>.local". mdns_lite also advertises
# "nerves.local" for convenience. If more than one Nerves device is on the
# network, delete "nerves" from the list.
host: [:hostname, "nerves"],
ttl: 120,
# Advertise the following services over mDNS.
services: [
%{
protocol: "ssh",
transport: "tcp",
port: 22
},
%{
protocol: "sftp-ssh",
transport: "tcp",
port: 22
},
%{
protocol: "epmd",
transport: "tcp",
port: 4369
}
]
# Import target specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
# Uncomment to use target specific configurations
import_config target.secret.exs
# import_config "#{Mix.target()}.exs"

View File

@ -0,0 +1,18 @@
defmodule SensorHub do
@moduledoc """
Documentation for SensorHub.
"""
@doc """
Hello world.
## Examples
iex> SensorHub.hello
:world
"""
def hello do
:world
end
end

View File

@ -0,0 +1,44 @@
defmodule SensorHub.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: SensorHub.Supervisor]
children =
[
# Children for all targets
# Starts a worker by calling: SensorHub.Worker.start_link(arg)
# {SensorHub.Worker, arg},
] ++ children(target())
Supervisor.start_link(children, opts)
end
# List all child processes to be supervised
def children(:host) do
[
# Children that only run on the host
# Starts a worker by calling: SensorHub.Worker.start_link(arg)
# {SensorHub.Worker, arg},
]
end
def children(_target) do
[
# Children for all targets except host
# Starts a worker by calling: SensorHub.Worker.start_link(arg)
# {SensorHub.Worker, arg},
]
end
def target() do
Application.get_env(:sensor_hub, :target)
end
end

57
sensor_hub/mix.exs Normal file
View File

@ -0,0 +1,57 @@
defmodule SensorHub.MixProject do
use Mix.Project
@app :sensor_hub
@version "0.1.0"
@all_targets [:rpi, :rpi0, :rpi2, :rpi3, :rpi3a, :rpi4, :bbb, :osd32mp1, :x86_64]
def project do
[
app: @app,
version: @version,
elixir: "~> 1.9",
archives: [nerves_bootstrap: "~> 1.10"],
start_permanent: Mix.env() == :prod,
build_embedded: true,
deps: deps(),
releases: [{@app, release()}],
preferred_cli_target: [run: :host, test: :host]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {SensorHub.Application, []},
extra_applications: [:logger, :runtime_tools, :inets]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:nerves, "~> 1.7.4", runtime: false},
{:shoehorn, "~> 0.7.0"},
{:ring_logger, "~> 0.8.1"},
{:toolshed, "~> 0.2.13"},
{:nerves_runtime, "~> 0.11.3", targets: @all_targets},
{:nerves_pack, "~> 0.6.0", targets: @all_targets},
{:nerves_system_rpi3, "~> 1.17", runtime: false, targets: :rpi3},
{:nerves_system_rpi4, "~> 1.17", runtime: false, targets: :rpi4},
{:nerves_system_osd32mp1, "~> 0.8", runtime: false, targets: :osd32mp1},
{:nerves_system_x86_64, "~> 1.17", runtime: false, targets: :x86_64}
]
end
def release do
[
overwrite: true,
cookie: "#{@app}_cookie",
include_erts: &Nerves.Release.erts/0,
steps: [&Nerves.Release.init/1, :assemble],
strip_beams: Mix.env() == :prod or [keep: ["Docs"]]
]
end
end

40
sensor_hub/mix.lock Normal file
View File

@ -0,0 +1,40 @@
%{
"beam_notify": {:hex, :beam_notify, "1.0.0", "5b8dceed76f8ac4acadf4d2915ac85b98c42bb17d7dd58253c7593d2a0deedbd", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "a80331f6c3596918affa408d91ed634106b7ae71b3fc589432363aca68378362"},
"circular_buffer": {:hex, :circular_buffer, "0.4.0", "a51ea76bb03c4a38207934264bcc600018ead966728ca80da731458c5f940f8b", [:mix], [], "hexpm", "c604b19f2101982b63264e2ed90c6fb0fe502540b6af83ce95135ac9b6f2d847"},
"elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"},
"gen_state_machine": {:hex, :gen_state_machine, "3.0.0", "1e57f86a494e5c6b14137ebef26a7eb342b3b0070c7135f2d6768ed3f6b6cdff", [:mix], [], "hexpm", "0a59652574bebceb7309f6b749d2a41b45fdeda8dbb4da0791e355dd19f0ed15"},
"mdns_lite": {:hex, :mdns_lite, "0.8.4", "6daa3ff4ec046f2e87a0d8f6de315fe9607f469ae2fe5f5978c9ef16152e60cb", [:mix], [{:vintage_net, "~> 0.7", [hex: :vintage_net, repo: "hexpm", optional: true]}], "hexpm", "1fa1d1939eb8de081a76fe140641af6230e344f38077f9f30a1f65537f3b6eed"},
"muontrap": {:hex, :muontrap, "1.0.0", "53a05c37f71cc5070aaa0858a774ae1f500160b7186a70565521a14ef7843c5a", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "0d3cd6e335986f9c2af1b61f583375b0f0d91cea95b7ec7bc720f330b4dc9b49"},
"nerves": {:hex, :nerves, "1.7.12", "7fbe49c14c9f17efdb8213cb86ebf6b186437cfbbf10a9c6ab132bc61eb2ec27", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "43806d6c310959ebdff4e6998a5c330782d1a4bed1267950f4a7ebe9edad3344"},
"nerves_motd": {:hex, :nerves_motd, "0.1.6", "59460f68a8b02811a344435207ceaf67f80a0e06f373137f8b1b96b2009271e8", [:mix], [{:nerves_runtime, "~> 0.8", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_time_zones, "~> 0.1", [hex: :nerves_time_zones, repo: "hexpm", optional: true]}], "hexpm", "867bf49495fa834dc85b3f50f1baae6bfcfa136c855777279697f61d49deb379"},
"nerves_pack": {:hex, :nerves_pack, "0.6.0", "c9b82b2005a7ff5b247670e02ac3b1c75d07b0dac8eb02cb11fd429990c65900", [:mix], [{:mdns_lite, "~> 0.8", [hex: :mdns_lite, repo: "hexpm", optional: false]}, {:nerves_motd, "~> 0.1", [hex: :nerves_motd, repo: "hexpm", optional: false]}, {:nerves_runtime, "~> 0.6", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_ssh, "~> 0.2", [hex: :nerves_ssh, repo: "hexpm", optional: false]}, {:nerves_time, "~> 0.3", [hex: :nerves_time, repo: "hexpm", optional: false]}, {:ring_logger, "~> 0.8", [hex: :ring_logger, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10", [hex: :vintage_net, repo: "hexpm", optional: false]}, {:vintage_net_direct, "~> 0.10", [hex: :vintage_net_direct, repo: "hexpm", optional: false]}, {:vintage_net_ethernet, "~> 0.10", [hex: :vintage_net_ethernet, repo: "hexpm", optional: false]}, {:vintage_net_wifi, "~> 0.10", [hex: :vintage_net_wifi, repo: "hexpm", optional: false]}], "hexpm", "9d240008ac04fdac9e73c088c05ead78d4f4b8d7cea0f93b009a386c859f2503"},
"nerves_runtime": {:hex, :nerves_runtime, "0.11.8", "dbfb1fbe5507c25c359d95118f007723a6aaa546d98e3425a81b54a8ab2dc81f", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:system_registry, "~> 0.8.0", [hex: :system_registry, repo: "hexpm", optional: false]}, {:uboot_env, "~> 1.0 or ~> 0.3.0", [hex: :uboot_env, repo: "hexpm", optional: false]}], "hexpm", "575b3ff1e030bbc060ec851d3a3530e6ba174f5f40575a472b0ee9f57c281831"},
"nerves_ssh": {:hex, :nerves_ssh, "0.2.3", "616527fc3adffcb32e12cf9392565f23bde43e0da292c91d1ed344b945fd203a", [:mix], [{:nerves_runtime, "~> 0.11", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:ssh_subsystem_fwup, "~> 0.5", [hex: :ssh_subsystem_fwup, repo: "hexpm", optional: false]}], "hexpm", "accc4b53dce2054160ae4734a27945276016f45185af293cd4f0e3987f10d2af"},
"nerves_system_bbb": {:hex, :nerves_system_bbb, "2.12.3", "18d869156a52075baa987ac480df9c64a584d828f80ac791ae34ea4c98ff1791", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "eb28d6a49a2dc19ac7a32b305f154cbc1d56e1c74bf401e2ec171399403174a5"},
"nerves_system_br": {:hex, :nerves_system_br, "1.17.4", "5583f4104f76253c742748ca5e21f54ad9e112abe9270e1ad78d56bebaabd011", [:mix], [], "hexpm", "69a3d3e96b70f0201c17993bc4a95a1c776fb45f6fcac89be8b4297272b7a8aa"},
"nerves_system_osd32mp1": {:hex, :nerves_system_osd32mp1, "0.8.3", "1866a8a1c0b33abc36ad73ee206cb9791e36a36fb2c88669f8f78c796f051004", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "a9c60b664fe1e299ef012aa04c536b8a065e560521ed8a0f8639351d3278cf32"},
"nerves_system_rpi": {:hex, :nerves_system_rpi, "1.17.3", "b5e341aab15f6ee330c50628696f19ff816a928f2faa36a6c63fec4407e13262", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.3", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv6_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv6_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "93d16fcf52938520d02a4c51e5155ec788f2834f7e699d8ef328d829312f2225"},
"nerves_system_rpi0": {:hex, :nerves_system_rpi0, "1.17.3", "8073cdde5e1bdd7cf7a087b5f04e6a8b540ca128ff03a29117f9f63caefc22a2", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.3", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv6_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv6_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "b5448e6d04816c3c597637e3a431b4dab08df5811b1dee7d85cef02de43aef37"},
"nerves_system_rpi2": {:hex, :nerves_system_rpi2, "1.17.3", "217891bdbd91ee11a19131785ac184d5cfb4465d2823384eb966e765f6fe1653", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "4c4cecf77c6f6ca99473ba503c7bc1ce5a035aa550970a26b11f0d296db5c169"},
"nerves_system_rpi3": {:hex, :nerves_system_rpi3, "1.17.4", "680800afdff514ce2ea2304535c385e3b6bbde1d3dfec52b9502dbb17a61cd38", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "995ddc1968a6d7c6deb014c390294306b0962fe31121c2879a4a0d3eac5d070f"},
"nerves_system_rpi3a": {:hex, :nerves_system_rpi3a, "1.17.3", "5ee258f2c15e4c52117cf24959202b37820905b767fc0bab750a6f03f6da36e6", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.3", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "f84b7835908711b5de4fc36c05c5c750954242bb5e67b31d53eaf5a3061a4cf0"},
"nerves_system_rpi4": {:hex, :nerves_system_rpi4, "1.17.3", "96ec6174b924189ebba3d2e3d19270599d9b3ffb65bca35e8705b2a7d09f70a5", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.3", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_aarch64_nerves_linux_gnu, "~> 1.4.3", [hex: :nerves_toolchain_aarch64_nerves_linux_gnu, repo: "hexpm", optional: false]}], "hexpm", "b51cfcdc135927bce5404f5cf3c9841b3c2b96a5530b2f0c37bb6ae881fb22b0"},
"nerves_system_x86_64": {:hex, :nerves_system_x86_64, "1.17.3", "e40112eb4a90810c7a5915acb0d1d322ed3953366bb6218ad08ffb1bfb87ffdf", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.17.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_x86_64_nerves_linux_musl, "~> 1.4.3", [hex: :nerves_toolchain_x86_64_nerves_linux_musl, repo: "hexpm", optional: false]}], "hexpm", "ea9f4f77db2515e476f008a9c548515168768ba3ebb88fd360ff13f9edf2052a"},
"nerves_time": {:hex, :nerves_time, "0.4.4", "ea44adbc00b24886079ca657e8caf9db5dec0bbbc336da17bddff9725c5a61e4", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:muontrap, "~> 1.0 or ~> 0.5", [hex: :muontrap, repo: "hexpm", optional: false]}], "hexpm", "3b207649a612c4603b8747bb2ffb309ad0a23e70be7e27ed2823cd6b998b5fb5"},
"nerves_toolchain_aarch64_nerves_linux_gnu": {:hex, :nerves_toolchain_aarch64_nerves_linux_gnu, "1.4.3", "6aa784fd3779251a4438e9874ed646492c3a4289f10581d01c4d61acda7d0b2d", [:mix], [{:nerves, "~> 1.4", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_toolchain_ctng, "~> 1.8.4", [hex: :nerves_toolchain_ctng, repo: "hexpm", optional: false]}], "hexpm", "75ab06af12118b423b4bba870a4f10d81f83678fd7fc57278927ce9d52516c5e"},
"nerves_toolchain_armv6_nerves_linux_gnueabihf": {:hex, :nerves_toolchain_armv6_nerves_linux_gnueabihf, "1.4.3", "c75a3975388c3378deb72ed50178f34f8cc47b575b32546d22e522a577f6b8c0", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_toolchain_ctng, "~> 1.8.4", [hex: :nerves_toolchain_ctng, repo: "hexpm", optional: false]}], "hexpm", "33e3a174ff51f81bca3181560d33c065694828e8c8c72aada0b92a46ba7cfbe5"},
"nerves_toolchain_armv7_nerves_linux_gnueabihf": {:hex, :nerves_toolchain_armv7_nerves_linux_gnueabihf, "1.4.3", "ff5b8fed2a71daea7ac07a5a0a6ecec7a4985d2a617a89ab073591d441d9cda4", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_toolchain_ctng, "~> 1.8.4", [hex: :nerves_toolchain_ctng, repo: "hexpm", optional: false]}], "hexpm", "ffefca61b7282a5a10032e61b6dab6758d24eee732c5d8c16fe6aada52dd099a"},
"nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "1.8.5", "f2dfd6e3b5f85889561b9f00c71510eea87c3d05760d20780285deb3c29ca212", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}], "hexpm", "2f65b1866f034054f3d61ee672b6d02f4de1d0b40bef74f49527b98ab46a39fc"},
"nerves_toolchain_x86_64_nerves_linux_musl": {:hex, :nerves_toolchain_x86_64_nerves_linux_musl, "1.4.3", "2fb6fd7e618afb0bc2f3114bd316381229b288d7a2f392ea3538359717cd5263", [:mix], [{:nerves, "~> 1.0", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_toolchain_ctng, "~> 1.8.4", [hex: :nerves_toolchain_ctng, repo: "hexpm", optional: false]}], "hexpm", "bdb044a2be8fe99d7b2606e478c64051b4a4cac6a4b69a617f0438a20e480a7c"},
"one_dhcpd": {:hex, :one_dhcpd, "1.0.0", "fbadb9dd3aabdcdc7efd57c9fdb2b85217a615bc0b5bf1e4bef098f952d9b5e4", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "c7b8e241954e2ec75be530c731805c6ff296ef764791ecc5da76e2477c91a4b9"},
"ring_logger": {:hex, :ring_logger, "0.8.3", "c5850d97cbf984a229780b59832a9ddec602f8cd28ef81bafa55cd9b29eeac6d", [:mix], [{:circular_buffer, "~> 0.4.0", [hex: :circular_buffer, repo: "hexpm", optional: false]}], "hexpm", "50bb6cc689707558f3c75426149069c5097d77a58e2de5e18ed8f0ae071710ed"},
"shoehorn": {:hex, :shoehorn, "0.7.0", "fc23870fb6b470f5c520fee692637b120a36e163842ab497bbec7e8a1aa6cfe3", [:mix], [], "hexpm", "eeb317ac677b228906039ccf532a582ad9f6d31d7958c98f5c853fe0459e0243"},
"ssh_subsystem_fwup": {:hex, :ssh_subsystem_fwup, "0.6.0", "821b9cdf52b8dcc286183bce7641e62589373642a10180cd4cadd8e322bc4e8e", [:mix], [], "hexpm", "e5bcc923af4ae49368177437d20383730d096281beb18e9e9a36806aff1ca750"},
"system_registry": {:hex, :system_registry, "0.8.2", "df791dc276652fcfb53be4dab823e05f8269b96ac57c26f86a67838dbc0eefe7", [:mix], [], "hexpm", "f7acdede22c73ab0b3735eead7f2095efb2a7a6198366564205274db2ca2a8f8"},
"toolshed": {:hex, :toolshed, "0.2.25", "909672ae6b8c209cc189ff167e99497734bfed51cf88e0468e2f916afab221f2", [:mix], [{:nerves_runtime, "~> 0.8", [hex: :nerves_runtime, repo: "hexpm", optional: true]}], "hexpm", "a532bc6803a79c0f63b58cf38b00ca9eebb6969fc4f5788a1a4c44fa1bff2e84"},
"uboot_env": {:hex, :uboot_env, "1.0.0", "fdbe0afe65436f760cd372b16a58ccf7c76bbad1538f1766826e0ddbcaf80980", [:mix], [], "hexpm", "86754d5eae9643ca3094ee1d749b808f9d6f0d41b990e1191709b5a66c2b0757"},
"vintage_net": {:hex, :vintage_net, "0.11.3", "4b382a63862afb2603d7f0d7581370f4c31384f07ea27197f54d75588562680b", [:make, :mix], [{:beam_notify, "~> 1.0 or ~> 0.2.0", [hex: :beam_notify, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:gen_state_machine, "~> 2.0.0 or ~> 2.1.0 or ~> 3.0.0", [hex: :gen_state_machine, repo: "hexpm", optional: false]}, {:muontrap, "~> 1.0 or ~> 0.5.1 or ~> 0.6.0", [hex: :muontrap, repo: "hexpm", optional: false]}], "hexpm", "f1add6fa0ca0cfd2b25a4cd4118877b8abe3f13b85d5043ebb156bfcd8556aeb"},
"vintage_net_direct": {:hex, :vintage_net_direct, "0.10.3", "23d215dc4dc9e3198f0f1f064721f80ebb649e6f2ff87b7adb2af641f62230f4", [:mix], [{:one_dhcpd, "~> 1.0 or ~> 0.2.3", [hex: :one_dhcpd, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.9.1 or ~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "221dfb2d1d37fd70b3cda46c607b29dc62e5c23c355b6c47a90b8eb786070006"},
"vintage_net_ethernet": {:hex, :vintage_net_ethernet, "0.10.3", "5325c590459544f871b0a807061fa37c3833ed8f83b94b0a15d497177503d5c2", [:mix], [{:vintage_net, "~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "4ec1ae7b2188829e493f54e0ba9e36ea53e8c95aecdf5950011ce4f13fe4ed52"},
"vintage_net_wifi": {:hex, :vintage_net_wifi, "0.10.6", "f5509f7c455ee5f4bc52174ada4d8eaf6e6e597f9d5ba51f17ffed613c0e0a8a", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "2d94acb727ba5982e1c17b50cb08594d644f8da7bd8f9a56c68d2de972319080"},
}

View File

@ -0,0 +1,55 @@
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html
## Do not set -name or -sname here. Prefer configuring them at runtime
## Configure -setcookie in the mix.exs release section or at runtime
## Number of dirty schedulers doing IO work (file, sockets, and others)
##+SDio 5
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
## Use Ctrl-C to interrupt the current shell rather than invoking the emulator's
## break handler and possibly exiting the VM.
+Bc
# Allow time warps so that the Erlang system time can more closely match the
# OS system time.
+C multi_time_warp
## Load code at system startup
## See http://erlang.org/doc/system_principles/system_principles.html#code-loading-strategy
-mode embedded
## Disable scheduler busy wait to reduce idle CPU usage and avoid delaying
## other OS processes. See http://erlang.org/doc/man/erl.html#+sbwt
+sbwt none
+sbwtdcpu none
+sbwtdio none
## Save the shell history between reboots
## See http://erlang.org/doc/man/kernel_app.html for additional options
-kernel shell_history enabled
## Enable heartbeat monitoring of the Erlang runtime system
-heart -env HEART_BEAT_TIMEOUT 30
## Start the Elixir shell
-noshell
-user Elixir.IEx.CLI
## Enable colors in the shell
-elixir ansi_enabled true
## Options added after -extra are interpreted as plain arguments and can be
## retrieved using :init.get_plain_arguments(). Options before the "--" are
## interpreted by Elixir and anything afterwards is left around for other IEx
## and user applications.
-extra --no-halt
--
--dot-iex /etc/iex.exs

View File

@ -0,0 +1,4 @@
NervesMOTD.print()
# Add Toolshed helpers to the IEx session
use Toolshed

View File

@ -0,0 +1,8 @@
defmodule SensorHubTest do
use ExUnit.Case
doctest SensorHub
test "greets the world" do
assert SensorHub.hello() == :world
end
end

View File

@ -0,0 +1 @@
ExUnit.start()