Skip to content
John edited this page Feb 14, 2015 · 3 revisions

Introduction

ebusd comes with two helpful tools. See details below.

ebusctl

Client for accessing ebusd via TCP.

Command-line

In order to directly send a request to ebusd, use ebusctl like this:

ebusctl [OPTION...] COMMAND [CMDOPT...]

This will send COMMAND together with CMDOPT options to ebusd and print the response. Use "help" as COMMAND for help on available ebusd commands.

In order to use the interactive mode, use ebusctl like this:

ebusctl [OPTION...]

Command-line options

These are the possible OPTION values (default value shown in square brackets: [default]):

  • -p, --port=PORT
    Connect to PORT on HOST [8888]

  • -s, --server=HOST
    Connect to HOST running ebusd (name or IP) [localhost]

  • -?, --help
    Give this help list

  • --usage
    Give a short usage message

  • -V, --version
    Print program version

ebusfeed

Feed data from an ebusd DUMPFILE to a serial device.

Command-line

ebusfeed [OPTION...] [DUMPFILE]

Command-line options

These are the possible OPTION values (default value shown in square brackets: [default]):

  • -d, --device=DEV
    Write to DEV (serial device) [/dev/ttyUSB60]

  • -t, --time=USEC
    Delay each byte by USEC us [10000]

  • -?, --help
    Give this help list

  • --usage
    Give a short usage message

  • -V, --version
    Print program version

With no DUMPFILE, /tmp/ebus_dump.bin is used.

Example

In order to setup two pseudo terminals for using ebusfeed, you can use "socat" like this:

  1. run socat to create two bidirectional byte streams:
    socat -d -d pty,raw,echo=0 pty,raw,echo=0
  2. create symbol links to appropriate devices, e.g.
    ln -s /dev/pts/2 /dev/ttyUSB60
    ln -s /dev/pts/3 /dev/ttyUSB20
  3. start ebusd:
    ebusd -f -d /dev/ttyUSB20
  4. start ebusfeed:
    ebusfeed /path/to/ebus_dump.bin