Quick Start

Requirements

  • AMB decoder connected to local network; UDP and TCP connection from PC enabled to decoder
  • Windows 10 or 11 PC available
  • Downloaded AMMC decoder zip file. Version 6+

Running on Windows

Unzip the downloaded zip file and run to connect to an AMB decoder with -a for autoconnect enabled mode:

cd windows64
.\ammc-amb.exe -a

>  Discovering decoders...
> Connecting to decoder 10.0.11.10
...

or use ammc-amb.exe 10.0.11.10 for direct connection to specific decoder

and see JSON output in console like this

>>> {"msg":"PASSING","passing_number":1,"transponder":232323,
"rtc_time":"2022-10-11T22:57:36.099241435+02:00","strength":0.0,"resend":false,"tran_code":"ID:232323","loop_id":"55"}
>>> {"msg":"PASSING","passing_number":2,"transponder":232323,
"rtc_time":"2022-10-11T22:57:37.099376962+02:00","strength":0.0,"resend":false,"tran_code":"ID:232323","loop_id":"55"}
>>> {"msg":"PASSING","passing_number":3,"transponder":232323,
"rtc_time":"2022-10-11T22:57:38.099548065+02:00","strength":0.0,"resend":false,"tran_code":"ID:232323","loop_id":"55"}

the JSON listed on console can be sent to WebSocket or to a database

Or use --help to show all command line options with description

PS C:\> .\target\release\ammc-amb.exe --help
AMM Converter (www.ammconverter.eu) 6.2.0-dev/b71d3db0bf95885c18eb85e003b63e48809ce37c
Author: skokys@gmail.com
Decodes timing line passings from decoders

USAGE:
    ammc-amb.exe [OPTIONS] [INTERFACE]

ARGS:
    <INTERFACE>    Use IP address for LAN connections. COM or /dev/... for serial interface

OPTIONS:
    -a, --autoconnect
            Discovers local network for available decoders and connects if possible

    -b, --db <db>
            Url string to database; MySql, MongoDB, Postgres or Redis. Examples:
            "mongodb://user:password@localhost:27017/ammc",
            "mysql://root:password@localhost:3306/mysql",
            "postgresql://postgres:mysecretpassword@localhost:5432/postgres",
            "redis://user:password@localhost:6379/0"

    -c <db_connection_timeout_ms>
            Connection timeout to database in milliseconds [default: 1000]

    -h, --help
            Print help information

    -m <timeout_ms>
            Connection timeout to decoder in milliseconds [default: 3000]

    -q, --quite
            enable quite mode, reports errors and warning only

    -r, --requery_db
            Re-query database for latest passing number to be downloaded from decoder (not available
            for all decoders)

        --skip_telemetry_upload
            skips AMMC runtime telemetry upload to cloud

    -t, --timesync
            Sets computer's time to decoder on startup

    -u, --timesync_utc
            Set's UTC time to decoder on startup

    -v, --verbose
            Enable verbose output

    -V, --version
            Print version information

    -w, --websocket <websocket_port>
            WebSocket server port number for JSON messages

    -y <db_connection_pool_size_max>
            Maximum DB connection pool size, min is by default 1 [default: 10]