Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JMont18
Novice
1,206 Views

IOT Cloud Analytics Example

Hello,

I'am new to using the Intel Edison and have been running through the IOT Examples on the Eclipse IDE in C/C++, using the Arduino breakout board. Im trying to run the IOT Cloud Analytics Example but I can't get it working.

I have gone through the steps in the guide below:

https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics Intel® IoT Platforms: Getting Started: Cloud Analytics | Intel® Software

And can successfully send values from the terminal to the temperature component on my dashboard using:

iokit-admin observation temperature "value"

But when i try to send values using the UDP, i.e:

echo -n '{"n": "temperature", "v": 21.0}' | nc -w1 127.0.0.1 41234

I get the following message:

BusyBox v1.22.1 (2016-03-08 12:09:34 PST) multi-call binary.

Usage: nc [IPADDR PORT]

I've tried a several things but just can't seem to get this working? Any help would be much appreciated.

8 Replies
idata
Community Manager
27 Views

Hello jmontague001,

 

 

I would like to replicate what you were trying to do, could you please let us know if there is any other detail we must know about your configuration specially of how you registered components (if I'm not mistaken, you were ok until this point, am I right?). It would be of much help for us.

 

 

I'll be waiting for your reply.

 

-Peter.
JMont18
Novice
27 Views

Hi Peter,

I registered my component by using the "iotkit-admin register temperature temperature.v1.0" command and can successfully send data to the analytics site using the "iotkit-admin observation temperature 10" command.

Its the next section in the guide "verifying that the local agent can send UDP messages" that im having a problem with. When i type in the echo command I get the Usage nc message. Below is the iotkit-agent status and the problem im having.

idata
Community Manager
27 Views

Now I understand, you are entering the command echo -n '{"n": "temperature", "v": 21.0}' | nc -w1 127.0.0.1 41234 on the Edison console. As you can see in https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics# Verifying_that_the_local_agent_can_send_UDP_messages, you have to run the command from a PC. What the command does is send a message (from your PC) to the localhost port and then it is sent to the IoT Analytics site.

 

 

Try it on your PC and let me know if it helps. I'll be glad to help you in case you encounter any issue.

 

-Peter.
JMont18
Novice
27 Views

In the guide it just says to open up a new terminal window, which I've tried but I can't get it to connect. When I start Putty and try connecting to the localhost 127.0.0.1 port 41234 I get an error: Network error connection refused?

idata
Community Manager
27 Views

You are right, the guide is a little bit confusing when explaining that part. If you are using Windows, you will have to install Node.js (from https://nodejs.org/en/) and download send_udp.js (from https://github.com/enableiot/iotkit-agent) and then run it from cmd with the command:

 

 

cd /path/to/where/you/downloaded/send_udp.js

 

node send-udp.js temp 21.0

 

 

Try that and let me know if it works. (By the way, I will send your feedback about the guide to the appropriate team, thanks a lot for your help!).

 

 

Peter.
JMont18
Novice
27 Views

Hi Peter,

I've downloaded Node.js and the send_udp.js file but when I send the command in the cmd window nothing happens and there is no values received on the dashboard?

Although when i run the example in the eclipse IDE it now works sending the temperature sensor data successfully from the Edison to the Analytics website.

idata
Community Manager
27 Views

Hi jmontague001,

 

 

I just tested it and I'm watching the same behavior. Let me check what's going on. I will try to update you as soon as possible.

 

 

-Peter.
idata
Community Manager
27 Views

Hello jmontague001,

 

 

I've an update for this case.

 

 

Unfortunately Intel® Cloud Analytics have been discontinued. Nevertheless, there are several alternatives to this service, you can go to https://software.intel.com/en-us/iot/hardware/edison under the section Connect with MQTT to learn about this alternatives.

 

 

We apologize for any inconvenience this might cause.

 

-Peter.