t-mon / qtcoap Goto Github PK
View Code? Open in Web Editor NEWConstrained Application Protocol (CoAP) library written in Qt.
License: GNU General Public License v3.0
Constrained Application Protocol (CoAP) library written in Qt.
License: GNU General Public License v3.0
Hello I just wanted to confirm whether this libqtcoap library uses DTLS for security or not?
After the discover request from a local californium server (as well as the test server coap://vs0.inf.ethz.ch/)t , the reply is treated as an error and the program exists after giving the error.
The error is Error: "The server did not respond after 4 retransmissions
What may be the cause of the error?
void Core::onReplyFinished(CoapReply *reply)
{
if (reply->error() != CoapReply::NoError) { // this is where the error comes
qDebug() << "Error:" << reply->errorString(); // this line gives the error: Error: "The server did not respond after 4 retransmissions."
reply->deleteLater();
exit(-1);
}
if (reply == m_discoverReply) {
qDebug() << "Discovery finished";
qDebug() << "------------------------------------------" << endl;
CoreLinkParser linkParser(reply->payload());
foreach (const CoreLink &link, linkParser.links()) {
qDebug() << link;
qDebug() << link.path();
dataList.append(new dataobject(link.title(), link.path()));
}
qDebug() << "Data change emitted";
} ...
......
}
```
The Core::onReplyFinished(CoapReply *reply) finished method does not recognize one of the replies of a get request and instead executes the last else of the method. What might be the problem here?
} else if (reply == m_reply) { // the get request should execute this
//qDebug() << "------------------------------------------" << endl << reply;
QString path = reply->request().url().path();
QString payload = reply->payload();
} else { //but instead executes part
qWarning() << "Unknown reply received: Please report a bug if you get this message";
}
Hello t-mon,
First of all, I'd like to thanks so much for sharing the source code.
Would you please show how to build a simple CoAP server by using this library?
Thanks and Best Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.