mosquitto and mosquitto-clients Debian/Ubuntu packages. Check whether mosquitto server is running. If it is not running, find out the commands (program names) allowing you to start it, and start it.
Find out the commands (program names) allowing to create publish and subscribe to topics packets.
Send a message of some topic using a publisher, afterwards start a subscriber of that topic, and finally send another message of the same topic. Does the subscriber show both messages or not?
Capture with wireshark the packet sent by the publisher and the packet received by the subscriber. Write down the MQTT type and their QoS found in the packet.
home/x/y, with x = {kitchen, hall, room} and y = {temperature, light, batterypercentage}.
Create a client which monitors all the sensors of the kitchen, echoing them each time they change in the following precise format:
hh:mm:ss hall, humidity is 70
hh:mm:ss kitchen, temperature is 30
Emergency in ...: current temperature is ...
Optional work: Write a publisher or a subscriber in a programming language of your choice which has bindings to MQTT on computer or smartphone. Check that it works with the broker and with the previous programs. You may need to install additional packages. More information at http://blog.guiguiabloc.fr/index.php/2014/11/13/mqtt-faites-communiquer-vos-objets-simplement.
eduroam filters MQTT packets, hence you need to use your phone as router for this exercice. If using a phone is not possible for you, skip this exercice (or use a colleague's phone).
Listen on all topics starting with irco/. Send a text using irco/yourname. Check that you receive it, other colleagues receive it too, and that you receive other colleagues' texts.
What risk does this exercice introduce on your laptop (if you listen on # for ex.), from security point of view?
nmap, wireshark, and rabbitmq-server Debian/Ubuntu packages. Write down all the binary programs provided by rabbitmq-server package.
Find out the programs allowing to start the RabbitMQ broker. Start it.
Write down the port(s) RabbitMQ server listens on.
Find out the commands (program names) allowing to create queue, send and receive a message.
amqp-tools package. Create a queue. Send a message and get it. Capture with wireshark the packet sent with the message, and the packet to get that message. Is it simple to understand?
Activate the MQTT plugin in the RabbitMQ broker. Write down the additional port(s) RabbitMQ server listens on.
Use mosquitto clients to subscribe and publish messages, using the RabbitMQ broker.
Install netcat-traditional (or netcat-openbsd) package. Use nc to create three clients (two subscribers and one publisher), like this:
Use ABORT command to see that the transaction is cancelled.
Where is the message queue, i.e. where are the messages stored waiting to be read?
Create an AMQP subscriber to the same destination. Send to it a message. Check that both subscribers receive the message.
Enable MQTT and STOMP protocol support, see https://activemq.apache.org/components/classic/documentation/mqtt and https://activemq.apache.org/components/classic/documentation/stomp. (AMQP does not work.)
Check with nmap that it is listening on MQTT and STOMP ports.
Start a STOMP subscriber and an MQTT subscriber. Send a message with STOMP and check that both subscribers receive it. What do you conclude?
Install a CoAP client (look in lectures or search on Debian repository).
nc for sending the two messages above.