January 2018
Intermediate to advanced
524 pages
13h 33m
English
CoAP is lightweight and its implementation both on a client and server basis should take few resources. Here, we use the Python-based aiocoap library. More can be read on aiocoap in: Amsüss, Christian, and Wasilak, Maciej. aiocoap: Python CoAP Library. Energy Harvesting Solutions, 2013–. http://github.com/chrysn/aiocoap/. Many other free CoAP clients and servers exist with several written in low-level C code for extremely constrained sensor environments. Here, we use a Python environment for brevity.
The client implementation is:
#!/usr/bin/env python3import asyncio #necessary for asynchronous processing in Pythonfrom aiocoap import * #using the aiocoap library
The following is main loop for the client. The client uses ...
Read now
Unlock full access