Problem with the communication between lwm2m client and Iot Agent

249 views Asked by At

In these days my teacher gives me to develop a system which uses these components:

I have a problem with the communication between client and Iot Agent.

I start the Context Broker and Iot Agent with the respective line commands and then I try to execute the code of client from Eclipse but it doesn't speak with the Iot Agent (listening on that port 5684). The Iot Agent doesn't give me any error while the client says "Unable to connect to any server, next try in ...". Primarily, I'd like to ask if what I'm trying to do is possible. Second, if it is possible, I'd like to ask if this problem is due to a bad Iot Agent configuration (i mean the file config.js) or to the necessity to previously map the client in the Iot Agent.

1

There are 1 answers

1
Fernando Méndez Requena On

Could you post your full error logs ? By the way, I recommend you to use LW2M2 code located github official site and install Fiware and dependecies using docker.

For your first question your components are ok and I suggest you to use docker to install dependencies before comment

 version : "2"

services:
  mongo:
    image: mongo:3.2
    command: --nojournal
    ports:
      - "27017:27017"
    expose:
      - "27017"
  orion:
    image: fiware/orion
    links:
      - mongo
    ports:
      - "1026:1026"
    command: -dbhost mongo
    expose:
      - "1026"
  mosquitto:
    image: ansi/mosquitto
    ports:
      - "1883:1883"
    expose:
      - "1883"

For your second question, by the default is not necessary to set up config.js file unless you want to work with differents ports. So if you use docker-compose file before, by default it will works great.

I hope it helps you.