简体   繁体   中英

Can't add device via http on FIWARE-IoTAgent

I'm learning about IoT and trying to use Fiware for a project and got stuck when trying run some commands while following the fiware-IoTAgent-Cplusplus deployment guide.

I could successfully run:
curl -X GET http://172.17.0.4:8080/iot/about

Sending the above command I got the following result:
Welcome to IoTAgents identifier:qa:8080 1.3.1 commit 124.g0b78609 in Sep 14 2016

When I tried to run the following command it returns "pidfile not found [FAILED]", so I must have missed some configuration
service iotagent start protocol

Any other requests returns 'The request is not well formed':

curl -X POST http://x.x.x.x:8080/iot/services \
-i \
-H "Content-Type: application/json" \
-H "Fiware-Service: service2" \
-H "Fiware-ServicePath: /srvpath2" \
-d '{"services": [{ "apikey": "apikey2", "token": "token2", "cbroker":           "http://127.0.0.1:1026", "entity_type": "thing", "resource": "/iot/d" }]}'

Any ideas of what can be done? Thanks.

You are trying to use an old version of the IoTAgents that is no longer supported. Please, try to use one of the new Node.js versions (eg: https://github.com/telefonicaid/iotagent-ul )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM