Difference between revisions of "Installation"

From BITPlan can4eve Wiki
Jump to navigation Jump to search
Line 10: Line 10:
 
<source lang='bash'>
 
<source lang='bash'>
 
git clone https://github.com/BITPlan/can4eve
 
git clone https://github.com/BITPlan/can4eve
cd can4eve/obdii/
+
cd can4eve
 +
mvn install -D skipTests
 +
</source>
 +
with output:
 +
<source lang='bash'>
 +
...
 +
INFO] Reactor Build Order:
 +
[INFO]
 +
[INFO] com.bitplan.can4eve
 +
[INFO] com.bitplan.elm327
 +
[INFO] com.bitplan.can4eve.can4eve
 +
[INFO] com.bitplan.obdii
 +
[INFO]                     
 +
</source>
 +
 
 +
<source lang='bash'>
 +
cd /obdii/
 
./rebuild
 
./rebuild
 +
</source>
 +
 +
with output:
 +
<source lang='bash'>
 
...
 
...
 
[INFO] Building jar: ... /can4eve/obdii/target/com.bitplan.obdii-0.0.1-jar-with-dependencies.jar
 
[INFO] Building jar: ... /can4eve/obdii/target/com.bitplan.obdii-0.0.1-jar-with-dependencies.jar
Line 17: Line 37:
 
[INFO] BUILD SUCCESS
 
[INFO] BUILD SUCCESS
 
</source>
 
</source>
 +
 
= Testing =
 
= Testing =
 
<source lang='bash'>
 
<source lang='bash'>

Revision as of 18:39, 10 June 2017

These are the installation instructions as of 2017-06 for the alpha state of the project

get in touch

Before you start you might want to "register" with BITPlan so that we are ready to answer question and get feedback from you. There is no registration process for can4eve yet so please simply use the contact form at: http://web.bitplan.com/kontakt/ and enter "can4eve" as the subject.

downloading and compiling

git clone https://github.com/BITPlan/can4eve
cd can4eve
mvn install -D skipTests

with output:

...
INFO] Reactor Build Order:
[INFO] 
[INFO] com.bitplan.can4eve
[INFO] com.bitplan.elm327
[INFO] com.bitplan.can4eve.can4eve
[INFO] com.bitplan.obdii
[INFO]
cd /obdii/
./rebuild

with output:

...
[INFO] Building jar: ... /can4eve/obdii/target/com.bitplan.obdii-0.0.1-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Testing

mvn test
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.bitplan.obdii.TestELM327
CANTriplet: 0.0.1

Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.321 sec
Running com.bitplan.obdii.TestVehicle
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.061 sec
Running com.bitplan.obdii.TestWikiInfo
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Tests run: 19, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ----------------------------------------------

command line interface

java -jar target/com.bitplan.obdii-0.0.1-jar-with-dependencies.jar -h
Help
CANTriplet: 0.0.1

  usage: java CANTriplet
 --display [None | Console | Swing] : display
                                      the display to use one of:
                                       None,Console,Swing
 --host (--hostname) WERT           : host
                                      the host to connect to
 --limit (--framelimit) N           : limit
                                      the maximum number of frames to read
 --port (--portnumber) N            : port
                                      the port to connect to
 --vg (--vehicle-group) WERT        : vehicleGroup
                                      the vehicleGroup to connect to
 -c (--conn) WERT                   : connection device
                                      the connection to use
 -d (--debug)                       : debug
                                      create additional debug output if this
                                      switch is used
 -h (--help)                        : help
                                      show this usage
 -l (--log) WERT                    : log
                                      the logfile to write
 -p (--pid) WERT                    : pid to monitor
                                      the pid to monitor
 -t (--timeout) N                   : timeout in msecs
                                      the timeout for elm327 communication
 -v (--version)                     : showVersion
                                      show current version if this switch is
                                      used

test Script

This is the test script I am using on Mac OS computer from the command line to run the software:

#!/bin/bash
# 2017-04-02
dev=/dev/ttyUSB0
os=`uname`
case $os in
  Darwin) 
   #dev=/dev/tty.usbserial-113010822821
   dev=/dev/cu.usbserial-113010822821
  ;;
esac

#
# show usage
#
usage() {
  echo "$0 [-d|-h]"
  echo "  -h|--help   : show this usage"
  echo "  -d|--debug  : switch on debugging"
  #exit 1
}

# commandline option
option=$1

# optionally show usage
case $option in
  -h|--help) 
    usage
    options="--help"
    ;;
  # switch on debugging 
  # see https://sdqweb.ipd.kit.edu/wiki/Remote_Debugging_mit_Eclipse
  -d|--debug) options="--debug"
esac

soption="-F";
case $os in
  Darwin) soption="-f";;
esac
#stty $soption $dev 115200
stty $soption $dev 230400&
#stty $soption $dev 460800&
java -jar target/com.bitplan.obdii-0.0.1-jar-with-dependencies.jar $options --conn $dev --display Swing --log Ion

needed modification of testscript

You might want to modify:

  1. the name of the device dev=/dev/cu.usbserial-113010822821
  2. the baud rate 230400
  3. the log file directory Ion

According to your environment and device.

And you might want to make sure the log file directory exists