Project:HUGnet Unsolicited Packets

From HUG Wiki

Jump to: navigation, search

Unsolicited packets are sent from an endpoint without being asked for by the controller board or data collector. They are sent for a variety of reasons. They always stem from the fact that the endpoint wants to talk to the data collector. Since it doesn't know what address the data collector is at, these are always sent to address 000000.

Contents

Theory

Unsolicited packets are a mechanism for the endpoint to contact the data collector. An endpoint can't know that a packet that is sent to it is from the data collector. It might be from another endpoint, it might be from a one shot script, or it might be from a secondary data collector. Since it doesn't know it sends unsolicited packets to a dummy address.

Handling

Any packet to the address 000000 should be ignored by an endpoint. This is trivial and will not be covered further.

A controller board should only send this packet from downstream interfaces to upstream interfaces. This means that an unsolicited packet will only travel towards a data collector. It will not get sent out on other HUGnets connected to the rs485 network. This is mostly to save bandwidth.

A data collector should take that packet and respond to it in some way. This page mostly covers why and endpoint might send one of these packets and what the data collector should do about them.

Types

Powerup

Sent when an endpoint powers up.

Command

5E

Response

The response to a powerup packet is to read the configuration out of the endpoint. This checks that the endpoint came back up in the same configuration it went down in. It also allows the database to automatically pick up endpoints so they don't have to be manually added to the database.

Reconfiguration

A reconfiguration of E2 values

Command

5D

Response

The response is the same as Powerup

Boredom

Warning: This is not implemented yet.


Boredom means that the endpoint has not been talked to by the data collector or any other device in too long. It will send out a packet to tell the data collector that it exists. This makes it so that an endpoint will be found even if its power up packet is not caught by the system.

Command

Not set.

Response

The response will depend on the circumstances:

The endpoint is known but is not being polled
The configuration is read out of the endpoint. This is done mostly to tell the endpoint that it was heard.
The endpoint is unknown
The configuration is read out of the endpoint. This should be done automatically by the software because the configuration is probably pretty old if we didn't know about the device. The device will also be polled if it is scheduled to be polled.
The device is known but ignored because it didn't respond for a long time.
The configuration will be read and the device will be polled.

See Also