NervesHubLink.ConsoleChannel (nerves_hub_link v0.10.0) View Source

Starts an IEx shell in process to allow remote console interaction

The remote console ability is disabled by default and requires the remote_iex key to be enabled in the config:

config :nerves_hub_link, remote_iex: true

Once connected, shell data on the device will be pushed up the socket for the following events:

The following events are supported from the Server:

  • phx_close or phx_error - This will cause the channel to attempt rejoining every 5 seconds. You can change the rejoin timing in the config
    config :nerves_hub_link, rejoin_after: 3_000
  • dn - String data to send to the shell for evaluation
  • restart - Restart the IEx shell process
  • window_size - A map with :height and :width keys for resizing the terminal

The following events are supported from this client:

  • up - String data to be displayed to the user console frontend

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.