CoAP | Simple CoAP library for Particle Core and Photon | Runtime Evironment library
kandi X-RAY | CoAP Summary
kandi X-RAY | CoAP Summary
CoAP simple server, client library for Particle Photon, Core.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CoAP
CoAP Key Features
CoAP Examples and Code Snippets
Community Discussions
Trending Discussions on CoAP
QUESTION
I am trying to control my lights via a simple discord bot but am running into an issue. I need to run this command and am using discord.py to do it:
...ANSWER
Answered 2022-Feb-24 at 11:59You can not use just '
inside '
-delimited string, as python
get confused. Please consider using '''
-delimited string which allows you to have '
inside that is replace
QUESTION
I am using the node-wot browser library and I would like to connect IoT-devices communicating via MQTT and CoAP to the browser. As the browser/ library is not capable of communicating via MQTT or CoAP, are there any implementations of HTTP-CoAP or HTTP-MQTT proxies available which can process thing descriptions?
The idea would be to have a proxy where I could connect my device to, simply by providing a w3c wot thing description. Ideally the proxy would create another thing description which I could use to connect the browser to the proxy via HTTP.
...ANSWER
Answered 2021-Dec-15 at 21:44For me the requirements are not that clear.
The open source project Eclispe/Californium comes with coap2http cross proxy functionality (and also http2coap). You may try it demo-apps/cf-proxy2
QUESTION
Im trying to run this CoAP server from https://github.com/Tanganelli/CoAPthon on a raspberry pi. i cant seem to find much instructions. This was one of the CoAP that my instructor wanted us to use, my instructor pretty much left us hanging with no help at all but this link.
i followed the install instructions on the github page, the only thing that wouldnt install is the section
Install instructions for CoRE Resource Directory. Mongod wouldnt install for this section so i gave up. so i dont know if this section is important or not
What are the commands for the terminal to get it running and doing something.
it says to type in to run the server coapserver.py.
...ANSWER
Answered 2021-Dec-04 at 06:52For future individuals that might need help with this, use aioCoAP, its much easier then CoAPthon
get it from here https://aiocoap.readthedocs.io/en/latest/installation.htmlg
all you need to do is mess with three files labeled server.py, clientPUT.py and clientGET.py Add resources and classes for sensors and what not to server.py ClientPUT.py is where you would add your code for the sensors or whatever you need. ClinetGET.py you alter the uri
run it by type in the command in the terminal (go to directory first that has the server) type in python server.py
in another terminal do the same thing but instead run python clientPUT.py
and the server should be running then all you need is a client for the get request. If you were like me and needed to use Copper go here to install it for chrome https://github.com/mkovatsc/Copper4Cr
QUESTION
When trying to create simple coap server with asyncronous function and asyncio.run it return Event loop is closed. Code below:
...ANSWER
Answered 2021-Nov-16 at 15:29This is an issue resulting from aiocoap still using (and, in some places, using badly) idioms to support Python 3.7 or (in obsoleted parts) even previous versions.
I'm aware asyncio.run()
is preferred, but until the next aiocoap release (in which I plan to update the examples too), the old idiom is what works best across the range of supported Python versions.
QUESTION
I am using the development kit nrf9160 from Nordic Semiconductor. The server hostname in my code is "californium.eclipseprojects.io" and peer "5684".
I want to send a JSON payload using the PUT-method from CoAP. For this I am creating my JSON Payload with the following function:
...ANSWER
Answered 2021-Nov-06 at 10:09The result of
QUESTION
I try to initialize 2 DTLS sessions with 2 different peers. The first otCoapSecureConnect
returns OT_ERROR_NONE
, the second one returns OT_ERROR_INVALID_STATE
. Does OpenThread allow multiple CoAP secure connections ?
ANSWER
Answered 2021-Jul-28 at 04:31The current CoAP Secure APIs in OpenThread only supports a single active session.
QUESTION
I feel like this question has been asked a bunch of times, but none of the answers I have found seem to be working for me. I'm extremely new to CMake and C/C++ as I come from the world of Java, and am struggling to understand cmake and how it works.
Anyways, basically I have the folder structure below. This is an esp-idf project, so I don't know if that has anything to do with what I'm running into.
...ANSWER
Answered 2021-Jul-09 at 13:46The ESP-IDF build system is built on top of CMake. This means you can use all the standard features of CMake in your files. However, the the ESP-IDF system predefines many functions, and makes many assumptions about the layout of your project, supposedly to make things "easier". Instead of reading CMake documentation, start by reading and understanding the ESP-IDF build system documentation:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
It looks to me like there is a particular layout expected for subcomponents, including the format of the CMakeLists.txt
file. Specifically, move Metriful
under a new directory called components
, or add Metriful
to EXTRA_COMPONENT_DIRS
near the top of your root CMakeLists.txt
If Metriful is not written as an esp-idf component, this may not work. However, the document also describes how to link to "pure CMake" components, which will look something like this (at the end of your root CMakeLists.txt
).
QUESTION
I am working on a C project for the university where a CoAP server is to be hosted on a TM4C129EXL. It is particularly important to choose a FreeRTOS operating system. Unfortunately, I had to learn that Texas Instruments has stopped supporting FreeRTOS. There are no options for me to switch to another operating system. It is for this reason that I turn to you.
I'm looking for a sample program in which Free RTOS is executed on a TM4C129EXL board. In the best case, I would be happy about a Code Composer Studio Project, as this is the IDE we work with from the university.
If you do not have any sample code available, I would be happy to receive any other information regarding FreeRTOS and CoAP of course with reference to the TM4C129EXL.
...ANSWER
Answered 2021-Apr-30 at 14:14You did not specify if you had any requirements in terms of FreeRTOS
version, but you can either:
- use the demo provided in file
SW-EK-TM4C1294XL-2.1.4.178.exe
available on TI WEB site as is - you will find it in directoryexamples\boards\ek-tm4c1294xl-boostxl-senshub\senshub_iot
- use this example as a basis to use a more recent version of FreeRTOS: you just would have to replace FreeRTOS source code by the most recent one, and maybe to modify some code in the demo: some function names/signatures may have changed across major versions.
The procedure hereafter describes step by step how to create a minimalist FreeRTOS program with Code Composer Studio 10.3.0 and FreeRTOS v202104.00 in a Windows 10 environment using the second approach. You may have to adjust the drive letter to you specific setup, I am using D
: for the purpose of this example..
Download Code Composer Studio 10.3.0, FreeRTOS v202104.00 and SW-EK-TM4C1294XL-2.1.4.178.exe.
Install Code Composer Studio with support for the
Tiva-C
MCU familly. When prompted for a workspace name, specifyD:\ti\workspace_v10
.Unzip
FreeRTOSv202104.00.zip
intoD:\
.Unzip
SW-EK-TM4C1294XL-2.1.4.178.exe
intoD:\SW-EK-TM4C1294XL-2.1.4.178
.Launch CCS
Use the menu item
File/New/CCS Project
, and create an 'Empty Project (with main.c).
[]
- Click on the
Finish
button. - Create the following directories:
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\inc
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\include
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC\ARM_CM4F
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\MemMang
- Copy
D:\SW-EK-TM4C1294XL-2.1.4.178\examples\boards\ek-tm4c1294xl-boostxl-senshub\senshub_iot\FreeRTOSConfig.h
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS
- Copy all
.h
files fromD:\SW-EK-TM4C1294XL-2.1.4.178\driverlib
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
. - Copy
D:\SW-EK-TM4C1294XL-2.1.4.178\driverlib\gcc\libdriver.a
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\driverlib
. - Copy all
.h
files fromD:\SW-EK-TM4C1294XL-2.1.4.178\inc
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\inc
. - Copy all files present in
D:\FreeRTOSv202104.00\FreeRTOS\Source\include
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\include
. - Copy all
.c
files present inD:\FreeRTOSv202104.00\FreeRTOS\Source
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel
. - Copy all file present in
D:\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\ARM_CM4F
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\GCC\ARM_CM4F
- Copy
D:\FreeRTOSv202104.00\FreeRTOS\Source\portable\MemMang\heap_4.c
intoD:\ti\workspace_v10\TM4C129EXL-FreeRTOS\FreeRTOS-Kernel\portable\MemMang
. - Edit
D:\ti\workspace_v10\TM4C129EXL-FreeRTOS\main.c
, and replace its content by:
QUESTION
I want to upload a file from a CoAP client by using the californium standard forwarded proxy to a server which supports http-communication.
Is there an alternative with CoAP to build a post Request with a name of the RequestParameter and a payload contents the Value of file?
...ANSWER
Answered 2021-Apr-15 at 05:49CoAP (and so Californium) focus on efficiency for small payloads. POST files will not be the domain of CoAP at all. If you really want that, just load the payload from the file and POST that. Ensure, you configured the MAX_RESOURCE_BODY_SIZE in Californium.properties according your requirements. If you use Californium on both sides, both need to be configured. Alternatively, you may disable the "transparent blockwise" using a 0 MAX_RESOURCE_BODY_SIZE. That will then require, that you handle the single blocks and block-option on your own.
QUESTION
I am using the coap, copper, txthings as described in this turtoriall https://www.win.tue.nl/~lrahman/iot_2016/tutorial/txThings_2016.pdf.
Everything is setup and working well but I can't understand what one of the options refer to, my packet is as follows,
...ANSWER
Answered 2021-Mar-13 at 19:10Some hints for the parts I understand:
0xb5 other 0x05, block
- Option 11, len=5, Uri-Path, value "other" (RFC 7252)
- Option 11, len=5, Uri-Path, value "block" (RFC 7252)
0x10
Option 12, len=0, Content-Format, value 0 (RFC 7252)
0xb1,0x06
Option 23, len=1, Block1, value 0x06 (num=0,m=false,szx=6/1024 bytes) (RFC 7959)
0x41,0xe6
Option 27, len=1, Block2, value 0xe6 (num=14,m=false,szx=6/1024 bytes) (RFC 7959)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CoAP
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page