sniff

Elixir Serial Port NIF

Notice: sniff focuses in the native interface to serial ports. For higher level serial port access see baud.

Installation and Usage

Add sniff to your list of dependencies in mix.exs:

  def deps do
    [{:sniff, "~> 0.1.7"}]
  end

Test

# test with socat ttys
./test.sh
# test with custom ttys (null modem)
export TTY0="/dev/ttyUSB0"
export TTY1="/dev/ttyUSB1"
mix test

Windows

Install Visual C++ 2015 Build Tools by one of the following methods:

From the Windows run command launch cmd /K c:\Users\samuel\Documents\github\sniff\setenv.bat adjusting your code location accordingly.

Ubuntu

Give yourself access to serial ports with sudo gpasswd -s samuel dialout. Follow the official Elixir installation instructions and install build-essential erlang-dev as well.

MacOS

Give yourself access to serial ports with sudo dseditgroup -o edit -a samuel -t user wheel.

Roadmap

Future

0.1.7

0.1.6

0.1.5

0.1.4

0.1.3

0.1.2

0.1.1

0.1.0

Research