HA-I01.01

Part description

Current development revision

This document describes the protocol used for automatic assignment of device identification numbers (CAN-IDs) to newly attached bus devices.

Mode of operation

When a HA-CAN bus device is manufactured, the device identification number (CAN-ID) of it is not yet known. For ease of use, it is desirable that this does not have to be programmed into the device manually when the device is attached, but automatically assigned by the control software. The control software keeps a list of all attached devices anyways (together with their configuration), so it can assign the next free CAN-ID to any new device that is seen. The operator can then manually configure this device as required, and at a time suiting operation's needs, while the device is already active on the bus, but not hindering other bus transactions.

For this functionality, a specific CAN-ID is defined under which the Automatic CAN Address Assignment (ACAA) datagrams are transmitted. This CAN-ID is reserved, and will not be used for regular bus device communications. Only ACAA traffic is permitted using this CAN-ID. The ACAA process is designed to be fast enough for assigning a "real" CAN-ID to a new device on the bus before another new device is added in all practical situations, given the intent of this whole project.

Protocol description

The ACAA protocol consists of two steps. First, a request for a CAN address is sent to the bus using the specified ACAA CAN ID, and under this CAN ID the address is transmitted to the client. Afterwards, to ensure correct transmission and receipt of the assigned address, a check transmission is sent to the client and acknowledged by it. Only after successful reception of this check packet is the client allowed to store the new address as its fixed CAN identity, and only after receipt of the check acknowledgment is the ACAA server allowed to permanently register this CAN ID for the new device.

If assignment and verification fails in any step, the new client device must start the process from the beginning. The server is in this case expected to hand out only a limited number of addresses through ACAA, and, if assignment repeatedly fails, stop responding to ACAA queries and request operator intervention. If the assignment process failes from ACAA server viewpoint after handing out the new CAN ID, it must mark the respective ID as blocked, and request operator intervention before marking it as clear to hand out again.

CAN-ID

Device ID 121 has been assigned and reserved for the ACAA traffic.

Protocol

Frame

New device (client)

<->

ACAA manager (server)

Comments

RTR?

MTID

CANID

Length

Data

RTR?

MTID

CANID

Length

Data

1

RTR

13

121

2

70 DTID

->

Address request for device type DTID

2

<-

-

13

121

2

71 CANID

Assignment of bus address CANID

3

<-

RTR

13

CANID

1

72

Request for confirmation of new address

4

-

13

CANID

1

72

->

Confirmation of successful configuration

Note: Server should wait 20 to 30 ms between step 2 and 3 to allow for client's adjustment of address configuration.


CategoryElectronics


THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.

For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.

HomeAutomation/Parts/HA-I01/HA-I01.01 (last edited 2011-05-25 19:55:09 by ThiemoNordenholz)