Skip to content

Configuration

Jim Schaad edited this page Jun 17, 2017 · 4 revisions

Configuration

The ICoapConfig interface provides the ability to change and define behaviors for a CoAP Endpoint.

File Format

The file uses the format of = where each occurs once per line.

Configuration Fields

General Usage Fields

DefaultPort: The default port that is to be associated with the network address for the coap protocol. The default value is 5683.

DefaultSecurePort: The default port that is to be associated with the network address for the coaps protocol. The default value is 5684.

AckTimeout: Base value for how long to wait before re-sending a message in the reliability layer. The default value is 2000ms.

AckRandomFactor: Random adjustment to be applied in computing the first timeout for a message. The default value is 1.5. The equation used for the timeout value is AckTimout + AckTimeout*(AckRandomFactor-1)*rand(0, 1)

AckTimeoutScale: This is the factor by which the timeout is multiplied on each retry as as a back-off parameter. The default value is 2.0.

MaxRetransmit: The number of times that a message is to be re-transmitted without a response until one gives up. This only applies to confirmable messages. The default value is 4.

UseRandomIDStart: Generate a random value for the ID of the message to be sent. Messages are then numbered sequentially from that point. The default value is true. If set to false, then the IDs will start with 0.

UseRandomTokenStart: This value is no longer used.

TokenLength: The length of the token to be sent with a request. The default value is 4. The range of values is between 0 and 8. A random token will be generated of the given length, if a unique token has not been generated after a given number of attempts, the generation token will be increased by one and generation will be attempted at that length. Tokens are checked for uniqueness based on the client address not based on the server address.

NotificationMaxAge: Used in the computation to determine if an observe notification is new. The default is 128 seconds. This value is expressed in milliseconds.

NotificationCheckIntervalTime: Along with NotiicationCheckIntervalCount, this is used to determine how frequently a notification send back is going to be a CON rather than a NON response. The default value is 246060 seconds (1 day). This value is expressed in milliseconds.

NotificationCheckIntervalCount: See above. The default value is 100

NotificationReregistrationBackoff: Input parameter to how often a stale observation point is going to be re-queried after the last notification goes stale. It is assume that an observation request has been lost after MaxAge of the last message + this value + a random value of 2 to 15 seconds. The default value for this is 2 seconds. This value is expressed in milliseconds.

ChannelReceiveBufferSize: This value defaults to 0

ChannelSendBufferSize: This value defaults to 0

ChannelReceivePacketSize: This value defaults to 2048.

OSCOAP_MaxMessageSize

OSCOAP_DefaultBlockSize

OSCOAP_BlockwiseStatusLifetime

OSCOAP_ReplayWindow'

Blockwise Configuration Fields

MaxMessageSize: This is the payload size that will require that the message be split into multiple messages using the blockwise protocol. The default value is 1024.

DefaultBlockSize: Unless otherwise negotiated, this is the size of blocks that will be transmitted as part of themessage. The default value is 512.

BlockwiseStatusLifetime: How long to keep a blockwise transfer active before closing it because it was not transferred. The default value is 10 minutes.

Deduplicator Specific Fields

Deduplicator: Which deduplicator should be used to scavenge the sessions which have been expired. Unlike most of the configuration parameters, changing this value will not change any of the deduplicators that have already been created. There are three deduplicators that are defined for use:

  • MarkAndSweep: This is the default deduplicator. It place all exchanges in a single array and periodically goes through looking for ones which have expired and removing them.

  • CropRotation: This uses a number of arrays. At a given interval the arrays are rotated around and the oldest is freed. This means that exchanges stay in the cache longer, but it takes less effort to remove them when it is time.

  • Noop: No exchanges are recovered. This would be used only with short term endpoints.

CropRotationPeriod: Frequency that the saved exchanges are rotated when using the crop rotation deduplicator. The default is 2000ms with a count of 3 blocks. This means that by default an item will be in the deduplicator for 4 seconds.

ExchangeLifetime: Length to keep an exchange around when using the sweep deduplicator. The default value is 247 seconds.

MarkAndSweepInterval: Frequency that a sweep will be done when using the sweep deduplicator. The default value is 10 seconds.

HTTP/CoAP Proxy Specific Fields

HttpPort: The HTTP port used for the server by the HTTP/CoAP proxy server. The default value for this is 8080.

Clone this wiki locally