This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Rime and mesh example in Contiki



Anyone has tried it?

How can I assign an address to the devices in order to comunicate?

I suspect is on "mesh" data structure, but it isn't not writen or initialized.

... in "mes.h" there is a def like this

struct mesh_conn {
  struct multihop_conn multihop;
  struct route_discovery_conn route_discovery_conn;
  struct queuebuf *queued_data;
  linkaddr_t queued_data_dest;
  const struct mesh_callbacks *cb;
};

which is declared as

static struct mesh_conn mesh;

Or maybe is generated by the function "mesh_open(&mesh, 132, &callbacks);"

I've found this doxygen doc (contiki.sourceforge.net/.../a01798.html) where is "The Rime communication stack" section but I'll apreciate any other source of info.

  • Using broadcast example I've been able to know which address is assigned for every device.

    Then changing the address used to call

    mesh_send(&mesh, &addr);

    modifiying addr.u8[0], and addr.u8[1] with correspondent value.

    I guess in first instance the node address is not set. Althoug I've realized that can be changed with

    linkaddr_set_node_addr (&my_addr);

    I tried unicast examples and the communication between neighbours was fine.

    Hovewer, in mesh example I haven't managed to send a message to another node one hoop beyond.

    It's like the mesh weren't be stablished.

    What could be wrong? Do I have to modify or add anything else to the code?

    I'dont yet uderstand how mesh functions do the discovery proccess.

    On the other hand the collect example works fine too, only changing the sink address.