Comments (7)
The idea is to use the simple server from the OCF Iotivity-Lite project, however I'm a way off this yet, not only do I have to get this working as a COAP client with a normal COAP server such as coap.me for instance I then have to mod it to work with iotivity which has its own slightly different COAP implementation.
At the mo though I'm still trying to get it working reliably on IPV6 loopback, the network stack needs some work, the port from C# didn't work well with Dart, it needs to be reworked I think. This is why the package is still not published on pub. Its been a low priority package(too low!) for me for a while now.
Feel free to work on it if you wish.
from coap.
Is it possible to use simple server from iotivity-lite? In principle Iotivity lite simple server can work without the security layer, I've check this. In any case, in iotivity-lite, simple server/client interact with each other if them were built without the security layer. Or will there be any problems with this because of your specific implementation of CoAP?
from coap.
Iotivity-Lite simple client/server do interact with each other without security out of the box, I've tried this, first step, I want the coap client to interact with the simple server in the same way. I've not even thought about security yet. I don't have a specific implementation of COAP, its just vanilla COAP, its Iotovity that alters the implementation(or they certainly used to).
from coap.
If change one line in the lookupHost method of the CoapUtil class (coap_util.dart), as shown below:
static Future<InternetAddress> lookupHost(String host) async {
final Completer<InternetAddress> completer = Completer<InternetAddress>();
final List<InternetAddress> addresses =
// await InternetAddress.lookup(host, type: InternetAddressType.IPv6);
await InternetAddress.lookup(host, type: InternetAddressType.IPv4);
logResolvedAddresses(addresses);
if (addresses != null && addresses.isNotEmpty) {
completer.complete(addresses[0]);
} else {
completer.complete(null);
}
return completer.future;
}
can avoid crash when running simple_client:
/usr/lib/dart/bin/dart --enable-asserts --enable-vm-service:56502 --pause-isolates-on-exit /home/michael_k/IdeaProjects/coap_dart/examples/simple_client.dart
Observatory listening on http://127.0.0.1:56502/
Resolved address : InternetAddress('127.0.0.1', IPv4)
SJH - isLinkLocal - false
SJH - isLoopback - true
SJH - isLinkMulticast - false
SJH - type - InternetAddressType: IPv4
Simple client, sending request to localhost with path .well-known/core, waiting for response....
No response received, closing client
But no more than that. Check the performance of the client is not yet possible. I tried to use ./simpleserver of iotivity-lite, changing ports, but so far I have not achieved any results. Sorry.
Using pure dart to implement iotivity-lite is a great idea. The only pity is that while nothing works. By the way, I think that writing a dart wrapper for the native code of iotivity-lite is no less difficult, therefore your approach is completely justified.
from coap.
IIRC Iotivity is intended to use IPV6 transport, I think you need to change the simple server to use IPV4 but I'm not sure. COAP itself is intended to use IPV6, see here, so I want to get the package to use IPV6 first, hence I'm testing this first. The intention is to publish a COAP package for Dart, with a selectable option to use Iotivity(or any other variants), not to publish an Iotivity specific package,
from coap.
Ok. I tried to use coap.me to check, but without success. Maybe I do not understand something. There are two lines:
- Crawl CoAP Server on IP Address [coap.me] on port [5683] and
- Or maybe crawl CoAP Server on URI [coap: //coap.me: 5683].
Is the port you are using - really 5683, and should ".well-known / core" be specified as an IP address?
from coap.
Yes, this is expected, as I said above the package is not yet finished and fully tested
from coap.
Related Issues (20)
- Multicast requests using blockwise currently not working HOT 6
- Method not allowed with post request HOT 6
- Since version 4.2.0 observe non confirmable not working properly HOT 13
- Killing network during requests causes uncatchable exception
- Remove Coap prefix from internal classes HOT 1
- Support OSCORE
- Add funding links to package HOT 1
- Planning of next releases HOT 24
- Problem with error handling on timeout or cancel HOT 8
- Address TODO comments across the code base
- Example tdls HOT 36
- openssl (dtls) messages are not processed HOT 15
- Behaviour of observe in case of lost connection HOT 4
- Unhandled Exception when connection is lost HOT 17
- Pure dart dtls HOT 1
- Update to Dart 3 HOT 1
- Slight tweak proposal to Uri handling HOT 1
- Use enhanced enums HOT 13
- TCP support HOT 4
- Response ETags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coap.