Previous Topic

Next Topic

Book Contents

Book Index

Device Registration Process

The first connection establishment and registration of a SHIP node MAY be triggered by different mechanism, e.g. push button ("auto accept"), a commissioning tool ("commissioning") or if a SKI is entered into the SHIP node ("user input" or "user verify").

If the "auto accept" mode is active a SHIP node SHALL set its own "register" flag for the service discovery to true and SHALL also start a service discovery for other SHIP nodes that also have set the "register" flag on "true" and connect to those SHIP nodes. If a SHIP node discovers more than one other SHIP node with a "register" flag set to true, it SHALL pick one SHIP node by any means appropriate (e.g., it could interpret additional information contained in the service discovery). If the "auto accept" mode is inactive a SHIP node SHALL set its own "register" flag for the service discovery to false and SHALL stop searching for other SHIP nodes that also have set the "register" flag on "true".

The other verification modes ("user verify", "user input" and "commissioning") SHALL have no effect on the register flag.

If a SHIP node has a trusted SKI from another local SHIP node but was not able yet to successfully finish registration with this other SHIP node the SHIP node SHALL cyclically retry to connect to the SHIP node with the corresponding SKI.

If the other local SHIP node aborts the SME "hello" a SHIP node SHOULD NOT retry to connect to this SHIP node again, as long as the register flag of the other SHIP node is set "false". If the register flag of the other SHIP node is set "true" a SHIP node SHALL retry to connect to the other SHIP node again.The first connection between a SHIP node and a web server is established without mDNS and in the following order:

  1. Retrieve IP and port from DNS (Only if URL is used, if IP is used this step can be skipped)
  2. Connect to IP and port
  3. Verify public key of the web server
  4. SHIP message exchange (SME) Connection Mode Initialization
  5. SHIP message exchange (SME) Connection Data Preparation

The first connection with local SHIP nodes is established in the following order:

  1. If auto accept is active set register flag in service discovery on true
  2. if auto accept is active, search for SHIP nodes with register flag in service discovery on true, else if user verify, user input or commissioning is used, just search for SHIP nodes with corresponding SKIs
  3. Connect to IP and port retrieved over service discovery OR accept incoming connection
  4. Verify public key of the communication partner
  5. SHIP message exchange (SME) Connection Mode Initialization
  6. SHIP message exchange (SME) Connection Data Preparation

With the SME "hello" message a SHIP node can confirm the trustworthiness of the communication partner. If a SHIP node trusts the communication partner, the SHIP node SHALL store the credentials of the communication partner.

If a SHIP node only supports one simultaneous active connection it MAY close the server during the registration phase, to be able to establish a client connection. In this case the constraint SHIP node SHALL wait a time of X milliseconds before it closes the server and tries to establish a connection to another SHIP node that has set the register flag in service discovery on "true". X SHOULD be a random value between 0-30000 milliseconds.

Successful Registration

If both sides have confirmed trustworthiness of each other with a SME "hello" message, the registration is successfully completed. Every new connection between this both devices MUST now be viewed as reconnection and not a registration, until one of both SHIP nodes purposely aborts the SME "hello" handshake.

See also