Nobdy
Contents
Overview
Goal: To implement a featureful, stable middleware suite that provides an extensible and flexible interface to automotive sensor and actuator buses for the purpose of enabling car manufacturers, owners and developers the power to create new software that enhances the safety, economy and enjoyment of the driving experience.
Design: the best resource to understand the architecture of nobdy is the (rather out of date) presentation at the 2011 San Francisco MeeGo Conference by tripzero.
License: GPL 2
Installation
System Requirements:
- GNU Toolchain (gcc, g++, make, binutils . . . )
- Qt 4.7 or greater
- QJson (for select plugins)
- gpsd 2.9x (for GPS integration)
- git
Supported Platforms: Ubuntu 11.10 (Oneiric Ocelot) or greater; Mer and Tizen (RSN); MeeGo-IVI (tested 1.1 and 1.2); Fedora (14 and 16 tested).
Supported Architectures: x86, x86_64 and ARMv7; in general architectures where Qt 4.7 or greater will run.
OpenICE Binary Packages
Supported distributions: Ubuntu and Debian
Tested on: Ubuntu 11.10 on i386, Debian Wheezy on AMD x86_64
Coming soon: RPMs for Mer, Fedora and OpenSUSE
The binary packages will place new files in the following locations:
obdsim application: /usr/local/bin (or /usr/bin, depending on configuration) nobdy application: /usr/bin configuration files: /etc/nobdy shared libraries: /usr/lib plugins: /usr/lib/nobdy
In order to develop nobdy code, please also install libobd-dev and nobdy-dev in a fashion similar to the packages below.
How to install on Ubuntu
Open a text terminal and type:
sudo apt-add-repository ppa:openice/ppa sudo apt-get update sudo apt-get install libobd nobdy qjson genericobd2
For GPS support,
sudo apt-get install gpsd gpsd-clients
Note: recently (3/15/2012), many distros have started packaging gpsd 3.4-2. Many in our community use obdgpslogger. Unfortunately obdgpslogger requires the older gpsd 2.95-8 that was packaged earlier, so as of this moment some hackery is required to have GPS integration with both obdgpslogger and nobdy in the same installation.
How to install on Debian
Using a text editor with su privileges (e.g. "sudo emacs"), add these lines to /etc/apt/sources.list:
deb http://ppa.launchpad.net/openice/ppa/ubuntu oneiric main deb-src http://ppa.launchpad.net/openice/ppa/ubuntu oneiric main
Save the file, then type in a text terminal:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D71C8BE sudo apt-get update sudo apt-get install libobd nobdy qjson genericobd2
The same remarks about GPS apply as for Ubuntu.
How to install on Mer
Copy the correct repo file for your arch to /etc/zypp/repos.d:
NOTE: if using Yum, use /etc/yum/repos.d
$ zypper refresh $ zypper install nobdy nobdy-provider-logger nobdy-subscriber-tcp nobdy-tests
After the installation, navigate to the tests directory and run the logger test:
$ cd /usr/lib/nobdy/tests $ ./loggerprovider.websocket.sh & $ cd html5 $ chromium-browser index.html
The html5 websocket test works with chromium 18 and firefox 9.
From Source
nobdy source is hosted on gitorious
grab the source using git:
git clone git://gitorious.org/nobdy/nobdy.git
also consider grabbing the OBD-II plugin if you want to use nobdy with your scantool:
git clone git://gitorious.org/nobdy/genericobd2.git
NOTE: You will also need libobd. See genericobd2 for details.
Generally, compiling can be done with:
qmake make make install (as root)
Some plugins are not enabled by default and can be enabled with CONFIG+=[feature] during the qmake process. For example, if one were to enable the gpsd plugin:
qmake CONFIG+=gpsd
Current "features" are:
dcdcusb cv gpsd
Running Nobdy
General Information
In order to run nobdy, users must acquire the necessary hardware to connect to their vehicles, choose a method of displaying or storing the generated data, and then create a configuration file that reflects these choices. Editing the configuration template in /etc/nobdy/plugins.xml will permanently change the default settings. Setting may be changed temporarily at runtime by specifying a configuration file on the command-line:
nobdy -c <edited_config_file.xml>
where users would replace <edited_config_file.xml> with the name of their config.
nobdy has three types of plugins: Providers, Subscribers, and Stream plugins. The providers and subscribers are akin to the source and sink plugins that are familiar from gstreamer or pulseaudio. Providers are plugins that talk to various hardware (or, in the case of loggerprovider, reads a recorded database) and "provide" the information from these devices to nobdy. Subscribers are plugins that may request information from nobdy. These plugins can log, or expose the information to external applications. Finally, Stream plugins (called internally NobdyStream) are plugins that provide an interface for applications through the NobdyStream interface. These plugins are usually coupled with subscribers that expose the data externally.
TODO: display picture of how all the plugins interact
Providers
- logger provider plays back nobdy-style logs recorded with the logger subscriber plugin.
- genericobd2 - OBD-II plugin with bluetooth support
- sim - Simulation provider using DBus
- tcp provider - provides data from another nobdy instance over tcp sockets (usually used with the tcp subscriber).
- opencv - Provides image data from a web camera (dash camera)
- dcdcusb - for use with the dcdc-usb power supply. Provides battery voltage and accessory state information.
- gpsd provider - provides gps information from gpsd. (How to run older gpsd-2.95-8 on Wheezy.)
Subscribers
- example - simple example subscriber
- logger subscriber - logs various data in a sqlite database. The data can be played back into nobdy with the logger provider. Contents of sqlite databases can be viewed using the sqlitebrowser program that is packaged for Ubuntu and Debian. The logfile formats used by nobdy and obdgpslogger are currently incompatible.
- tcp subscriber - extends nobdy data over a tcp socket.
Common use cases
Compatible Hardware
Related projects
- OBDref, a small library that is meant to act as a layer between on-board diagnostics ("OBD") hardware drivers and higher level software applications
- obdgsplogger, a bunch of small tools that log OBDII and GPS data on Linux, OSX and others and write useful output formats like sqlite, GPX and KML.
- Car DIY, car computer designs and parts info at mp3car.com
- QCANObserver, also Qt-based. Runs on BeagleBone via its CAN cape.
- OpenXC Platform, a project that makes CAN data available via an Android SDK and an Arduino-compatible hardware
Related documents
- OBDref, a useful database of automotive bus protocols and many of their associated parameter IDs (pids).
- General information about car DIY, car computer designs and parts at mp3car.com
- Renesas' excellent "Introduction to CAN"
- General information about git in Jon Loeliger's Version Control with Git ebook and Scott Chacon's "A Tale of Three Trees" presentation.
Reporting Bugs
Please report bugs to #linuxice IRC on freenode.net by posting the URL of a pastebin submitted to linuxice.pastebin.com. The best text to include in a pastebin includes:
1. a detailed description of the invocation of nobdy, including the contents of the config file and the versions of any other relevant packages (libobd, genericobd2, qjson, obdgpslogger or gpsd).
2. a copy of the messages output by nobdy into the shell window.
3. a backtrace of any segmentation violations from a core file.
4. Please also include the output of "uname -a" and (if you have installed binary packages) "dpkg -l '*obd*' '*gps*'".
How to get a backtrace of a segmentation violation on Ubuntu 11.10
1. Edit /etc/security/limits.conf as suggested by http://heykevinle.blogspot.com/2007/10/ubuntu-core-dump.html On Debian Wheezy, users apparently still need to put "ulimit -c unlimited" in their .profile as well.
2. Logout by clicking on the upper-right-hand gear.
3. Log back in and run the program as before. You should get a file called core in the directory where nobdy was invoked when it had a segmentation violation.
4. Type
gdb nobdy core
Your core file may be called core.<pid> in some cases. Some users will need to install gdb first.
5. Type "bt" at the gdb prompt to generate a backtrace.
6. Append the output into the pastebin you opened at linuxice.pastebin.com and submit the pastebin. Post the URL at #linuxice.
Known Problems
Contact
Questions? Please ask on #linuxice on freenode IRC. Many project contributors can also be reached on mp3car.com forums.