취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

CoAP Client for LabVIEW?

Hi!

 

I would like to be able to acquire data from diverse sensors that implement the CoAP protocol: http://coap.technology

It seems there is no native implementation in LabVIEW for this, but there are plenty for other platforms.

 

I guess one solution can be to deploy one those implementations and access them as a gateway from LabVIEW (ie a Phyton based one), but it will require to install and maintain additional software.

 

May I have your pointers on what can I do or where can I look to implement a client for CoAP devices in LabVIEW?

 

 

Quite appart, if someone is interested I have found this nice implementation of IBM's IoT services based on MQTT written in LabVIEW: https://developer.ibm.com/recipes/tutorials/national-instruments-labview-for-the-iot-foundation

 

Thank you guys!

 

 

 

Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 포인트
1/17 메시지
7,769 조회수

From the looks of it, it's a HTTP REST-based protocol, so you can just use the HTTP Client VIs to make requests and get the response back. The url/headers/content of the request will change according to the specification but you might not need to implement the low-level HTTP functions. If you do, the HTTP protocol isn't too complicated to implement as a wrapper of the TCP/IP VIs.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 포인트
2/17 메시지
7,712 조회수

Sam,

 

Thank you for your kind response.

 

I'm commited to make it work despite of my huge ignorance on this subject. Actually, now I'm headed in the direction you mention using the HTTPVIEWHTTPClient.lvlib.vi library in LabVIEW 2014 SP1.

 

However I haven't been able to sucessfully get a valid response from a public test server for CoAP.

 

First of all, I have to mention that CoAP is UDP based, not TCP. I'm wondering if those libraries can be used...

 

However, here it is my setup:

VeryBasicTest.png

Using the URL coap://coap.me:5683/hello it should return "world" (I have tested this with Copper (Cu), an add-on for Firefox which is a CoAP client). Instead, I get the LabVIEW error code 363524 that states that the protocol is not supported.

 

If instead, I fire the URL http://coap.me/hello, I get the response [:error, "Not Found"] which is okay, as that is the same response I get from any web browser. Using the same with the port 5683, I mean: http://coap.me:5683/hello it provides a 363500 LabVIEW error, that states it does not get response from the server, which is what I expected, the server is not configured to listen at that port http requests...

 

Currently, I'm trying to figure it out how to work with the UDP functions, but in the meantime, if you have an additional input, I really would appreciate it.

 

Thank you!

Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 포인트
3/17 메시지
7,679 조회수

Just an update: I concluded that the way to go is to use the UDP palette.

Currently I have been able to get a valid response from the test server after I placed a basic "header" according to the protocol.

Now I'm building on top of that.

Later I'll share my findings about this in case anyone else is interested.

Best regards

Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 포인트
4/17 메시지
7,662 조회수

Hi MVidal,

 

Have you successfully designed the CoAP client in LabVIEW?

 

I have a similar problem - I need to design a CoAP server.  I wonder if it will be too different from creating a CoAP client?

 

 

Regards.

0 포인트
5/17 메시지
7,416 조회수

Hi!

 

Yeah I was able to build it. Actually it was quite straight forward to write the client after reading the specification: http://tools.ietf.org/html/rfc7252

Altough I only implemented the parts that are useful in my case, which are quite basic and may not be a fully compliant one (ie. some Methods/Messages not implemented, No observer, etc), but it won't be that hard to add them. What I wasn't able to solve was the support of ipv6, as LabVIEW does not offer it, but it is ok in ipv4.

 

I'm sorry I don't have info about the server implementation. I haven't read about it. Though for your reference I found this link quite useful during my task: http://trac.tools.ietf.org/wg/core/trac/wiki/PlugFest

 

Good luck with your project!

Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 포인트
6/17 메시지
7,398 조회수

Can you share an example .vi of you implementation? Thank you.

0 포인트
7/17 메시지
7,098 조회수

This replies with ACK:

coap.png

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 포인트
8/17 메시지
4,594 조회수

So, you are looking for help, but you are not willing to share?

0 포인트
9/17 메시지
4,424 조회수

@Martin_Sokolov

What do you mean? Did you notice the original post was about 7 years ago and that I have posted later about my findings the issues I have encountered?

 

Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 포인트
10/17 메시지
4,417 조회수