1.0.3 • Published 6 years ago

coap.mqtt.lwm2m v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Introduction

coap.mqtt.lwm2m.client is a command-line tool for everyday work with coap,mqtt,or lwm2m.

  • coap-client: It is a simple command-line tool for interacting with CoAP servers.

Installation

aiocoap, it is the python CoAP library.

To install this module,first,download the library file,then modify the file named resource.py

return self._resources[request.opt.uri_path], request.copy(uri_path=request.opt.uri_path) line 253
return self._resources[request.opt.uri_path], request.copy(uri_path=copy()) the initial code

finally,run " python setup.py install " to install the library

the lwm2m-client,it's written according to the aiocoap

you can download the library file from https://github.com/wangnuannuan/lwm2m-client.git

 python setup.py install

the usage

coap-client -h -m METHOD --observe-exec CMD --proxy HOST[:PORT] --content-format MIME -q --interactive

  • --non, Send request as non-confirmable (NON) message,Default: False
  • --method, Name or number of request method to use ,Default: “GET”
  • --observe, Register an observation on the resource,Default: False
  • --observe-exec,Run the specified program whenever the observed resource changes, feeding the response data to its stdin
  • --accept, Content format to request
  • --proxy, Relay the CoAP request to a proxy for execution
  • --payload, Send X as payload in POST or PUT requests. If X starts with an '@', its remainder is treated as a file name and read from.
  • --content-format, Content format sent via POST or PUT
  • -v, --verbose, Increase the debug output
  • -q, --quiet, Decrease the debug output
  • --dump,Log network traffic to FILE
  • --interactive, Enter interactive mode # careful: picked before parsing
  • --credentials, Load credentials to use from a given file
  • url,CoAP address to fetch

mqtt-client -h -a HOST -k KEEPALIVE -u USERNAME -t TOPIC --qos

  • -d ,if the debug is true,run the mqtt client
  • -a ,host the client to connect
  • -i,the client id
  • -k,the time keepalive,default=60
  • -p ,the server port
  • -u,username
  • -P,the password
  • -t,the topic to subscribe or unsubscribe
  • --payload,the message to publish

lwm2m-client -n endpointname -s setobjvalue

  • -n,the device name
  • -c,if yes ,then create object,for example/3303/0,if enter n,it will stop create object
  • -s,if yes,then set the object value,for example /3303/0 5700 0,if enter n,it will stop set object value
  • -r,(yes)run the client
1.0.3

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago