Automotive Message Broker
This page aims to provide information about the Automotive Message Broker (AMB) running on Tizen.
- 1 What is AMB?
- 2 AMB in the IVI 3.0 release:
- 3 How do I get it on Tizen?
- 3.1 Configure AMB on Tizen
- 3.2 FAQ
- 3.3 Other AMB plugins
- 3.4 Creating plugins for AMB
- 3.5 Links
What is AMB?
AMB is a framework for accessing vehicle information from an application without the application having to know the specific details of the vehicle's network. AMB is maintained with scalability, stability, performance and security in mind. AMB's plugin architecture makes it very scalable (see plugin section in FAQ below). AMB is frequently performance tested using valgrind/callgrind and other profiling software. AMB security is an important goal. More information can be found on the AMB Security page
AMB in the IVI 3.0 release:
AMB received many improvements during this development cycle. Documentation has been greatly improved and bluemonkey now supports zones. Additionally, a new tool ambctl has been developed that makes testing AMB from the command-line a breeze. Finally, AMB now includes the crosswalk vehicle extension that implements the W3C automotive business groups vehicle and data specifications.
Binary images and source code for this release are available here for both 32 and 64-bit for X86 and ARM architectures. AMB provides a open standard API for applications to target that is not vehicle specific or proprietary. This means applications written to use this API will "just work" on vehicles that support AMB. This creates value for vendors to use AMB and maximizes application deployment.
How do I get it on Tizen?
AMB is included by default on Tizen IVI images.
Configure AMB on Tizen
AMB installs a configuration file to
/etc/ambd/config. By default, ambd, the daemon that comes with AMB, is configured to load the example and dbus plugins. You may also want to try one of the other plugins (zypper se | grep automotive-message-broker-plugins.
Configuring and using the OBD-II plugin
One particularly interesting plugin for developers is the OBD-II plugin. This plugin uses ELM-327 compatible scantools to communicate with any OBD-II compliant vehicle. In the US, most vehicles later than 1996 are OBD-II compatible. Vehicles later than 2008 sold in the US have OBD-CAN (ISO 15765-4) which many scantools also support. AMB is tested in Tizen using the OBDLink MX scantool and the ECUSim OBD-II simulator. A simulator is not required, but makes things a bit easier for testing at a desk instead of in a car.
To configure AMB to use the OBD-II plugin, use your favorite editor (vi comes installed by default so we will use that for now) and edit the config:
We want to change the example "Source" plugin to the obd2-plugin. Here is an example of a OBD-II enabled config from the AMB source tree: obdsourceconfig. Make changes to the "device" and "baud" as necessary. Most USB scantools show up as "
/dev/ttyUSB*". If you are using the OBDLink MX or any other bluetooth scantool, use the bluetooth address as your device (ie "device" : "00:00:00:AA:BB:CC"). For many bluetooth scantools such as the OBDLink MX, baud rate doesn't matter.
Now let's stop the already running ambd and start a new instance:
systemctl stop ambd.service ambd -d4
If everything is configured correctly, the ECUSim (or engine if testing in a vehicle) is started, you should see the example "Sink" plugin outputting data from the car.
How do I write apps that use AMB?
Most apps will use the AMB DBus API. This API is documented here
I want to make an AMB plugin, where should I start?
There are two types of plugins, plugins that produce data called "sources" and plugins that consume data called "sinks". There are example plugins for both of these types and the plugin interfaces are documented in the AMB docs.
Where are the docs?
The current stable release documents can be found here:
For the current unstable release, you can generate the docs manually. The instructions are here
In Tizen docs can be found in /usr/share/docs/automotive-message-broker/ after installing the docs package:
zypper in automotive-message-broker-doc
Individual plugins also have documentation. This can be found in the README file in the plugin's subfolder (ie dbus README).
Where is the source?
I have software that already grabs data from the vehicle. Can I use this with AMB?
Yes. You can write a source plugin that uses your software.
Other AMB plugins
Creating plugins for AMB
AMB has a couple example source and sink plugins that should act as a guide for new plugins. These are located in the plugins/ path. AMB's internal documentation is periodically updated here.