doc:rfc_rtd-can-raw-mode
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
doc:rfc_rtd-can-raw-mode [2014/03/02 03:25] – admin | doc:rfc_rtd-can-raw-mode [2014/03/02 06:48] (current) – removed admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== CANraw Mode Protocol for the OOBD Firmware ====== | ||
- | |||
- | | OOBD Team | S. Koehler | | ||
- | | Request for Comments:7 | | ||
- | | Obsoletes: - | | | ||
- | | Category: Draft Standard | Sep 2013 | | ||
- | |||
- | |||
- | ===== Status of this Memo ===== | ||
- | |||
- | |||
- | This memo provides information about how to read CANraw data through the OOBD firmware. | ||
- | ===== Copyright Notice ===== | ||
- | |||
- | |||
- | Copyright (C) OOBD Team (2013). | ||
- | ===== Introduction ===== | ||
- | |||
- | The CAN Raw mode supports two features: | ||
- | * sending complex CAN Frame sequences onto the bus | ||
- | * dumps received frames to the serial port | ||
- | |||
- | |||
- | ===== Concept ===== | ||
- | |||
- | |||
- | ==== Initialization ==== | ||
- | |||
- | | ||
- | |||
- | Select the CANraw mode protocol | ||
- | |||
- | p 1 1 0 0 | ||
- | |||
- | This activates the CANraw mode protocol, clears the internal PID list and sets the CAN bus into " | ||
- | |||
- | Select the HS-CAN interface | ||
- | |||
- | p 8 4 0 | ||
- | |||
- | Select HS-CAN bus speed to 500kbit/s (for other bitrates please have a look to the firmware syntax here: [[brokenlink|The OOBD Firmware Syntax]]) | ||
- | |||
- | p 8 3 3 | ||
- | |||
- | Set CAN-Transceiver to normal operating mode | ||
- | |||
- | p 8 2 3 | ||
- | |||
- | Set CAN filter Start address | ||
- | |||
- | p 8 10 1 $000 | ||
- | |||
- | Set CAN filter mask (here: all frames $000 - $7FF are enabled) | ||
- | |||
- | p 8 11 1 $000 | ||
- | |||
- | Activate CANraw listen mode | ||
- | |||
- | p 7 1 1 | ||
- | |||
- | Hint: | ||
- | |||
- | If there are already CAN-Messages received on the HS-CAN interface they will be directly transmitted from the firmware to the serial Bluetooth interface so that they are directly accessible by any application (i.e. OOBD-Android). See the chapter Example for more details. | ||
- | |||
- | ==== Configuration ==== | ||
- | |||
- | No configuration | ||
- | |||
- | ===== Commands ==== | ||
- | |||
- | You can send your data, as usual formatted as hexadecimal coded string | ||
- | |||
- | | ||
- | |||
- | The input buffers covers maximal 4095 bytes, which should be sufficient for quite complex CAN telegram sequences. | ||
- | |||
- | |||
- | === The Data Format === | ||
- | |||
- | |||
- | The OOBD CAN raw format does not only allow single CAN frames, it can also send (if necessary) quite long telegram sequences. To do this, the data format is as follow: | ||
- | |||
- | The data consists of one or more blocks: | ||
- | |||
- | Block_1 [Block_2 .. Block_n] | ||
- | |||
- | |||
- | Each block consists of the following Byte sequence: | ||
- | |||
- | CAN-ID_Byte3 (MSB) CAN-ID_Byte2 CAN-ID_Byte1 CAN-ID_Byte0 (LSB) Nr_Of_Bytes (1-8) Data_Byte_1 .. Data_Byte_nr_of_Bytes Delay_until_next_Frame (x10ms) | ||
- | |||
- | |||
- | so first comes 4 bytes of CAN-ID, then the number of Bytes in that frame, then the Bytes of that frame and finally a delay (as multiplier of 10 ms), how long it should be wait until the next frame of this sequence will be send. When setting delay to 0, all frames will be send in one go. | ||
- | |||
- | The number of Bytes must be equal to the data bytes given. | ||
- | |||
- | |||
- | Following the scheme above, there can be so much blocks send in one go as fit into the input buffer of 4095 bytes. | ||
- | |||
- | |||
- | ==== Errors ==== | ||
- | |||
- | FIXME explain errors | ||
- | |||
- | |||
- | ==== Examples ==== | ||
- | |||
- | receiving frames: | ||
- | |||
- | # 170943 0x1f6 0x0 8 00 00 01 49 00 03 00 0a | ||
- | # 170943 0x91 0x0 7 2e f4 6f 12 ef 00 00 | ||
- | # 170944 0x2fd 0x0 6 00 e5 e2 00 2e f0 | ||
- | |||
- | FIXME Sending frames: | ||
- | |||
- | ===== Implementation Details ===== | ||
- | |||
- | |||
- | | ||
- | |||
- | |||
- | ===== Security Considerations ===== | ||
- | |||
- | |||
- | This RFC raises security issues. Sending frames on the bus might create unexpected reactions | ||
- | . | ||
- | ===== References ===== | ||
- | |||
- | |||
- | ===== Authors' | ||
- | |||
- | |||
- | Steffen Koehler | ||
- | |||
- | Phone: +49 172 410 35 98 | ||
- | |||
- | EMail: | ||
- | ===== Appendix ===== | ||
- | | ||
- | |||
- | ===== Full Copyright Statement ===== | ||
- | |||
- | |||
- | Copyright | ||
- | |||
- | This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, | ||
- | |||
- | The limited permissions granted above are perpetual and will not be revoked by the OOBD Team or its successors or assigns. | ||
- | |||
- | This document and the information contained herein is provided on an "AS IS" basis and THE OOBD TEAM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." | ||
- | | ||
- | |||
- | ===== Updates ===== | ||
- | |||
- | |||
- | ===== Obsoletes ===== | ||
- | |||
- | |||
- | ===== Obsoleted-by ===== | ||
- | |||
- | |||
- | ===== Updated-by ===== | ||
- | |||
- | |||
- | ===== Contact ===== | ||
- | |||
- | |||
- | ===== Distribution Lists ===== | ||
- | |||
- | |||
- | The OOBD-RFC announcements are distributed via the oobd-commit-messages@googlegroups.com mailing list. | ||
- | |||
- | To join (or quit) the list goto https:// |
doc/rfc_rtd-can-raw-mode.1393727130.txt.gz · Last modified: 2014/03/02 03:25 by admin