Steps to Simulate the MQTT in Contiki Cooja Simulator?
Share
MQTT Simulation Model using Contiki Cooja Simulator
Description:
MQTT is an ISO standard publish-subscribe based messaging protocol. It works on Application layer, Message broker used distributes topics to clients. Topics are UTF-8 string-based with hierarchical structure. There is no direct connection between clients also QoS(Quality of Service) levels are used in messaging services.
Source code
Step 1: Install mqtt packages
mqtt-sn-contiki package download and extract at location: home/user/contiki in Vmware workstation
Step 2: Open cooja simulator
In terminal: cd contiki/tools/cooja >> ant run
Create new simulation(ctrl+n).
Step 4: Connect the border router and broker/server.
Open terminals and change directories to following location:
1.cd contiki/examples/ipv6/rpl-border-router >> make connect-router-cooja
2.cd contiki/mqtt-sn-contiki/tools/mosquitto.rsmb/rsmb/src
sudo ./broker_mqtts config.mqtt //to connect mosquitto broker to clients.