Skip to content
sanshengshui edited this page May 19, 2023 · 3 revisions

toolkit-CoAP

Synopsis

~ toolkit coap
CoAP Client Toolkit

usage:
toolkit coap [-h] [COMMAND]

user-friendly CoAP protocol client toolkit

Options are:
  -h, --help   Print version information and exit.

commands:
  describe, desc   introduction and description of CoAP protocol
  media-types, mt  List supported MIME types
  discover, disc   list available resources
  get              Request data from CoAP Resource
  post             Create/Update data in CoAP Resource
  put              Update data in CoAP Resource
  delete, del      Delete CoAP Resource

Copyright (c) 2019-2023, IoT Technology
Developed by mushuwei
  • toolkit coap desc: introduction and description of CoAP protocol;

  • toolkit coap mt: List supported MIME types;

  • toolkit coap disc: list available resources;

  • toolkit coap get: Request data from CoAP Resource;

  • toolkit coap post: Create/Update data in CoAP Resource;

  • toolkit coap put: Update data in CoAP Resource;

  • toolkit coap del: Delete CoAP Resource;


Introduce and description

~ toolkit coap desc
RFC7252 CoAP (Constrained Application Protocol)

The Constrained Application Protocol (CoAP) is a specialized web transfer protocol
for use with constrained nodes and constrained networks in the Internet of Things.
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.

------------------------ protocol -------------------------------
|      0        |      1        |      2        |      3        |
|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver| T |  TKL  |     Code      |            Message ID         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Token (if any, TKL bytes) ...                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Options (if any) ...                                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1|   Payload (if any) ...                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Official address: https://coap.technology/
The English reference: https://www.rfc-editor.org/rfc/rfc7252.html

List available resources

usage:

Option Explanation
uri URI of the server to connect to

asciicast


Request data from CoAP Resource

usage:

Option Long Version Explanation
uri URI of the server to connect to
-a --accept accepted response content-type

asciicast


Create/Update data in CoAP Resource

usage:

Option Long Version Explanation
uri URI of the server to connect to
-f --format Payload content-type
-p --payload

asciicast


Update data in CoAP Resource

usage:

Option Long Version Explanation
uri URI of the server to connect to
-a --accept accepted response content-type
-f --format Payload content-type
-p --payload

asciicast


Delete CoAP Resource

usage:

Option Explanation
uri URI of the server to connect to

asciicast


toolkit-config


toolkit-MQTT

  • toolkit mqtt desc: introduction and description of MQTT protocol;
  • toolkit mqtt set: mqtt settings information management;
  • toolkit mqtt shell: mqtt shell mode;

toolkit-CoAP

Synopsis:

  • toolkit coap desc: introduction and description of CoAP protocol;

  • toolkit coap mt: List supported MIME types;

  • toolkit coap disc: list available resources;

  • toolkit coap get: Request data from CoAP Resource;

  • toolkit coap post: Create/Update data in CoAP Resource;

  • toolkit coap put: Update data in CoAP Resource;

  • toolkit coap del: Delete CoAP Resource;


toolkit-NBIOT

NB-IoT


Test

Clone this wiki locally