"action": "add",
"diagnostic_request": {
"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"pid": 5,
"payload": "0x1234",
"action": "add",
"diagnostic_request": {
"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"pid": 5
}
"action": "add",
"diagnostic_request": {
"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"pid": 5,
"frequency": 1
"action": "cancel",
"diagnostic_request": {
"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"pid": 5
}
**bus** - the numerical identifier of the CAN bus where this request should be
sent, most likely 1 or 2 (for a vehicle interface with 2 CAN controllers).
-**id** - the CAN arbitration ID for the request.
+**message_id** - the CAN message ID for the request.
**mode** - the OBD-II mode of the request - 0x1 through 0xff (1 through 9 are the
standardized modes and 0x22 is a common proprietary mode).
**multiple_responses** - (optional, false by default) if true, request will stay
active for a full 100ms, even after receiving a diagnostic response message.
- This is useful for requests to the functional broadcast arbitration ID
+ This is useful for requests to the functional broadcast message ID
(`0x7df`) when you need to get responses from multiple modules. It's possible
to set this to `true` for non-broadcast requests, but in practice you won't
see any additional responses after the first and it will just take up memory
by the VI, the result looks like:
{"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"pid": 5,
"success": true,
echo:
{"bus": 1,
- "id": 1234,
+ "message_id": 1234,
"mode": 1,
"success": false,
"negative_response_code": 17}
**bus** - the numerical identifier of the CAN bus where this response was
received.
-**id** - the CAN arbitration ID for this response.
+**message_id** - the CAN message ID for this response.
**mode** - the OBD-II mode of the original diagnostic request.
The response to a simple PID request would look like this:
- {"success": true, "bus": 1, "id": 1234, "mode": 1, "pid": 5, "payload": "0x2"}
+ {"success": true, "bus": 1, "message_id": 1234, "mode": 1, "pid": 5, "payload": "0x2"}
## Commands
The `device_id` command triggers the VI to inject a unique device ID (e.g. the
MAC address of an included Bluetooth module) into into the outgoing data stream.
+If no device ID is available, the response message will be "Unknown".
+
**Request**
{ "command": "device_id"}
**Response**
-f the predefined requests were enabled or disabled successfully, the `status` in
+If the predefined requests were enabled or disabled successfully, the `status` in
the response will be `true`.
{ "command_response": "predefined_obd2", "status": true}
+### Celluar C5 Configuration
+
+The ModemConfigurationCommand message allows users to change certain aspects of modem operation on-the-fly (at runtime). The modem configuration settings are stored in flash memory and are untouched by the bootloader during a software update (assuming the correct cellular_c5 linker file is used during compilation of vi-firmware). Thus, new modem settings persistent across power cycles.
+
+The ModemConfigurationCommand message provides three sub-messages for particular groups of modem settings. These are NetworkOperatorSettings, NetworkDataSettings, and ServerConnectSettings. These configuration messages are described in great detail within the [cellular_c5_config](vi-firmware/docs/advanced/cellular_c5_config.mkd) documentation.
+
+Currently, only the ServerConnectSettings sub-message is supported in the vi-firmware's command interpreter. All other settings are currently compile-time only.
+
+The ServerConnectSettings part of ModemConfigurationCommand allows the user to set the host server name and port that the device will use when opening a TCP socket to upload data. This destination must be running an HTTP server similar to OpenXCWebServer, which defines a set of supported HTTP transactions where the body is comprised of data in the familiar OpenXC Message Format.
+
+**Request**
+
+ { "command": "modem_configuration",
+ "server": {
+ "host": "www.myhost.com",
+ "port": 10000
+ }
+ }
+
+**Response**
+
+ { "command_response": "modem_configuration", "status": true}
\ No newline at end of file