Skip to content

Testing ODELogger Plugin #194

paulbourelly999 edited this page May 24, 2021 · 3 revisions

Introduction

The ODELogger Plugin allows real-time message logging of J2735 messages to jpo-ode using the message broker Apache Kafka. The plugin uses librdkafka, a C/C++ client library to connect to a kafka broker running as a container with jpo-ode.

jpo-ode Setup

The first step is to setup ODE. Currently, we have an EC2 ODE instance on AWS. This is what I used to run ODE. After logging into AWS simply start the ODE instance and use the provided ssh command from the connect page. In order for this to work you will also need to download and move the ODE.pem file into the directory from which you run your ssh command.

After successfully connected to the ODE EC2 instance, navigate to the deploy/latest/jpo-ode/ directory. Here you will find the docker-compose file for running ODE. Before calling docker-compose up, us vi, vim or a text editor of your choice to open the .env file in this directory and ensure that the DOCKER_IP variable is set to the public IP for the EC2 ODE instance. This can be found on the AWS admin portal and changes on every restart of the instance. After correcting this value, run docker-compose up -d (detached mode to avoid logs of all the containers being started in terminal). This should bring up all the relevant containers. You should now be able to access the jpo-ode by navigating to :8080 on your browser.

V2X-Hub setup

To run V2X-Hub you can either pull an existing image from https://hub.docker.com/r/usdotfhwaops/v2xhubamd/ with a tag-name corresponding to the 193-odeloggerplugin-bug-fixes branch or you can checkout the code and build it locally in a VM. Click for custom v2x-hub build instructions. After building V2X-Hub, simply run V2X-Hub and login into the admin portal by navigating to :8080 in your browser. After logging on, click the Disable toggle and the top of the page to list the disabled plugins, scroll to the ODELoggerPlugin and set the KakfaBrokerIp to the public IP for the EC2 ODE instance. Enable the ODELoggerPlugin and any BSMs or SPaT messages received by V2X-Hub should now also be forwarded to ODE. To confirm this you can send and encoded SPaT message to the MessageReceiverPlugin using the python script, and check the ode web-page for the decoded output. Each message received by the ODE will be decoded and printed on the webpage output box.