summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-07-29 15:21:08 +0200
committerArthur Guyader <arthur.guyader@iot.bzh>2019-08-12 15:06:45 +0200
commitf846986ed6159030e5ddb3827d9f1c5e2a82742f (patch)
tree3fe355d608145cf7525bddcafae36da39425f0d6
parent3adf3c20f481865ac513df5483df788d1553f606 (diff)
Update documentation.
Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I9e6b07ef48d634fe643e0eb2477fedfd34a7abb9
-rw-r--r--docs/3-Installation-J1939.md22
-rw-r--r--docs/4-Usage.md35
2 files changed, 31 insertions, 26 deletions
diff --git a/docs/3-Installation-J1939.md b/docs/3-Installation-J1939.md
index 8ab15f33..8098d47f 100644
--- a/docs/3-Installation-J1939.md
+++ b/docs/3-Installation-J1939.md
@@ -79,25 +79,3 @@ cp include/uapi/linux/can.h /usr/include/linux/can.h
cp include/uapi/linux/can/j1939.h /usr/include/linux/can/
```
-
-
-### Activate J1939 CMAKE
-
-To activate J1939 at the compilation.
-
-Edit the file conf.d/cmake/cmake/config.cmake
-
-And change the line :
-
-```cmake
-option(WITH_FEATURE_J1939 "Activate J1939" OFF)
-```
-
-With :
-
-```cmake
-option(WITH_FEATURE_J1939 "Activate J1939" ON)
-```
-
-
-
diff --git a/docs/4-Usage.md b/docs/4-Usage.md
index cdd8d586..6c6d1380 100644
--- a/docs/4-Usage.md
+++ b/docs/4-Usage.md
@@ -140,6 +140,20 @@ j1939="can2"
> configuration file match those specified in your generated source file with
> the `CAN-config-generator`.
+
+
+## Change name of ECU for J1939
+
+To change the name of an ECU to J1939, you must go to the file conf.d/cmake/config.cmake and modify the value at :
+
+
+```cmake
+# Define name for ECU
+set(J1939_NAME_ECU 0x1239)
+```
+
+
+
# Run it, test it, use it.
You can run the binding using **afm-util** tool, here is the classic way to go :
@@ -257,10 +271,18 @@ You can also subscribe to an event with the ID or the PGN of the message definit
```json
-low-can subscribe { "id" : 1568}
-low-can subscribe { "pgn" : 61442}
+low-can subscribe {"id" : 1568}
+low-can subscribe {"pgn" : 61442}
```
+And subscribe to all ID or PGN :
+
+```json
+low-can subscribe {"id" : "*"}
+low-can subscribe {"pgn" : "*"}
+```
+
+
You can stop receiving event from it by unsubscribe the signal the same way you did for subscribe
```json
@@ -325,11 +347,16 @@ and its value.
Examples:
```json
+# Authentification
+low-can auth
# Write a raw can frame to the CAN id 0x620
-low-can write { "bus_name": "hs", "frame": { "can_id": 1568, "can_dlc":
-8, "can_data": [ 255,255,255,255,255,255,255,255]} }
+low-can write { "bus_name": "hs", "frame": { "can_id": 1568, "can_dlc": 8, "can_data": [ 255,255,255,255,255,255,255,255]} }
# Write a signal's value.
low-can write { "signal_name": "engine.speed", "signal_value": 1256}
+# Write J1939 'single frame'
+low-can write { "bus_name": "j1939", "frame": { "pgn": 62420, "length":8, "data": [ 255,255,255,255,255,255,255,255]} }
+# Write J1939 'multi frame'
+low-can write { "bus_name": "j1939", "frame": { "pgn": 62420, "length":9, "data": [ 255,255,255,255,255,255,255,255,254]} }
```
To be able to use write capability, you need to add the permission