ECOLE NATIONALE SUPERIEURE
POLYTECHNIQUE DE
YAOUNDE
TRAVAUX PRATIQUES DES SYSTEMES DES TELECOMMUNICATIONS MOBILES
THEME: Travaux pratiques avec Packet Tracer pour la mise en œuvre de l’IoT
PROFESSEURPr:EMMANUEL TONYE
ETUDIANT
: ADAMOU
MASSAMA
CLASSE: 4 -GTEL
MARICULE
: 16P136
ETUDIANT
: EKASSI ELOUNDOU JEAN ANICET
CLASSE: 4 -GTEL
MARICULE
: 18P277
ETUDIANT
: KETCHEMEN
TCHOUNDJEUH ARMEL ROSTAND
CLASSE : 4 -GTEL
MARICULE
: 17P212
ETUDIANT
: NKUH RHOLY NKONGNYUH
CLASSE: 4 -GTEL
MARICULE16P162
:
PRACTICALS ON IOT SOLUTIONS ON CISCO PACKET
TRACER
INTRODUCTION
With a fast increase and rise in technology, there has been a boom in what we could call “smart
objects”. That has led to the creation of partially intelligent objects. The main application is in
smart phones. Phones with an operating system, a memory, a CPU. They can process information
faster than the previous type of phones and the greatest thing is that it evolves too.
With that in mind, the demand in smart objects increased and with the polishing of the internet it
literally was possible. But how??
The internet being the largest network ever, the idea to render things smarter was to render it a
little intelligent using the internet. But using the internet would not be sufficient indeed. There
was the need of developing objects that would actively and rapidly communicate through the
internet, hence rendering other institutes smarter.
There came the IoT technology. Literally standing for the Internet of Things. Objects who can
actively communicate through the internet and also communicate locally. To put such a feat in
place, many other concepts were attached to it such as cloud computing, mobile networking. In
this era then and the coming of the 5G, the IoT technology has totally been mastered and launched
and has become a rush by various telecom giants who want to provide IoT solutions.
In this little piece of art, we shall be discussing briefly but yet deeply on the concept of Internet of
Things. We shall also add to that the notion of cloud computing, and fog computing,
programming microcomputers using several advanced programming languages such as C, python,
java script etc. Our setting shall be done based on 10 extensive practicals on IoT provided by the
leading telecom equipment solution provider in the matter, CISCO. We shall flow from the basic
control of office equipment, to smart homes, smart industries, smart cities and if possible smart
grids with the sole idea in the back of our mind, interconnecting objects locally and also widely in
order to render them smarter. The practicals shall be done on CISCO packet tracer, a powerful
simulator that permits real life simulations of networking problems and in our case IoT
challenges.
PRACTICAL 1: CREATING AN IOT TOPOLOGY
The beginning of every practical is to get acquainted to the equipment being used. That is actually
the goal to this experiment. In the lines below, we shall be coursing through elementary things
that have to be done before being able to effectively work with IoT equipment.
AIM: Creating an IoT topology and understanding how each equipment functions.
DIAGRAM:
Main Idea: The idea behind it is to be able to monitor the IoT equipment in the
network above from the end station (PC). The switch will put them in the same VLAN
and their respective data after configuration will be stored on the server (IoT server).
The end station will access the server and hence be able to navigate through the data of
the IoT equipment and actively monitor their states in the network.
Well, that’s the Idea. But how did we do that?? The answer is in the lines below.
PROCEDURE/SIMULATION:
Step 1: The equipment was mounted as shown in the image above and also with respect to
the practical guide that was given.
Step 2: We configured and activated the following services; DHCP and IoT. This
services makes the server assign Ip addresses to the devices directly or indirectly
connected to it (DHCP) with respect to the configurations made on the server, and it also
permits the storage of the data transmitted by the IoT devices (IoT service).
So, we started by configuring statically configuring the server Ip address. After that, we
activated the DHCP service precising the Ip address interval used and we finally went
forth to activate the IoT service as shown in the images below.
Step 3: We proceeded to configure the end station (PC) to connect to the server. To
achieve that, we did the following;
We clicked on the PC, accessed the desktop then web browser.
Typed the following server Ip address 1.0.0.1 and pressed enter.
Then we filled the following information;
Username: admin
Password : admin
We got the following results;
And as someone would remark it, there are no IoT devices. This is due to the fact that the
IoT devices have not been registered yet.
Step 4: We registered each IoT device on the server.
To do so, we proceeded as follows;
We activated the DHCP service on each IoT device, in other to dynamically
receive Ip addresses from the server.
On each device, we accessed the config window, then settings, and under IoT
server, we chose remote server and filled in the following information; server
address: 1.0.0.1, Username: admin and Password: admin
Then we clicked on connect, as shown in the images below
NB: The steps above were done for all the IoT devices
After doing that, we repeated back step 3 and got the following results;
PRACTICAL 2: SIMULATION OF IOT DEVICES
Topology
Main Idea
In this case, we have a programmable logic controller (SBC), a servo motor and a LED.
The Idea here is to command the LED and the servo motor via the programmable logic
controller.
Procedure
Step 1: On packet tracer, we realized the topology above by intrinsically following the
guide provided.
Step 2: Since the SBC came with a default program, we decided to execute the default
program. We did that as follows;
We double clicked on the SBC and accessed the programming window.
We double clicked on Blink (python) found on the left side panel, in order to
open it.
We double clicked on main.py in order to see the code properly.
We finally clicked on RUN in order to launch the program.
This was done as shown in the image below;
Remark: After launching the default program, one noticed that only the LED was
blinking. The servo motor remained static. Hence for the SBC controller to command both
the rotation of the servo motor and the LED blinking, one modified the default program.
Step 3: We modified the default program. We did the following;
a. customWrite(0,127); just after digitalWrite(1, HIGH);
b. customWrite(0, -127); just after digitalWrite(1, LOW);
c. Then we launched the modified program
Remark: Observing the code, one notices that on custom write, there are the numbers 0
and 127, then 0 and -127. This gives us the maximum rotatory angle swept by our servo
motor. So, one can change the 127 to any number that one wants. Hence, what we
remarked was this;
When the motor was at its maximum rotatory angle (127 degrees) the LED
came on and the reverse was also true.
Step 4: We further modified the program by doing the following;
a. customWrite(0,-127); just after digitalWrite(1, HIGH);
b. customWrite(0, 127); just after digitalWrite(1, LOW);
c. Then we launched the modified program
Remark: After modifying the program once more, this time reversing the angles at HIGH
and at LOW, we noticed that;
This time, when the motor was at its maximum rotatory angle, the LED was off
and the reverse was also true.
PRACTICAL 3: SENSORS AND PT-MICROCONTROLLER
Topology
Main Idea: Here we want to use the switches and potentiometers to give a specific
command or action to some devices through a programmable microcontroller (In our case
a PT-MCU).
Procedure:
Step 1: The topology was realised as shown on the figure above, following intrinsically
the guide provided.
Step 2: We went further to program the MCU controller.
In packet tracer, each of the controllers come with a default code already in build in them.
When we ran that code, nothing happened. So, we had to write a code that will take in to
consideration the task to achieve.
The code that gave a specific command to the outputs with respect to the input twitch was
written in a Java script language. The code was as follows;
function setup() {
pinMode(0, INPUT);
pinMode(1, INPUT);
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
Serial.println("Blinking");
}
function loop() {
if (digitalRead(0)== HIGH)
customWrite(2, 2);
else
customWrite(2, 0);
if (digitalRead(1)== HIGH)
digitalWrite(3, HIGH);
else
digitalWrite(3, LOW);
if (analogRead(A0)>= 125)
customWrite(4, 1);
else
customWrite(4, 0);
if (analogRead(A1) > 0)
analogWrite(5, analogRead(A1))
else
analogWrite(5, 0)
}
Step 3: We then simulated the practical.
With that code, we were able to fully command our outputs with respect to the inputs.
NB: This was fully visualized when practicing, but for a better view we attached some
videos to this report to make it highly interactive and expendable.
PRACTICAL 4: PROGRAMMING A MICROCONTROLLER USING PYTHON
Topology
Main Idea: The Idea here was to use the python programming language to make the
following; when the motion sensor detects any movement, it lights the lamp and
immediately starts the coffee machine.
An application of this experiment is in modern day offices in developed countries. It is
made sure that, as someone enters the office, the lights automatically comes on and if
there is any other secondary task as starting a coffee machine or putting on the TV, it
automatically does it.
Step 1: Topology was realized as shown on the figure above.
Step 2: We wrote the following code;
source code
from gpio import *
from time import *
def main():
pinMode(0, IN)
pinMode(1, OUT)
PinMode(2, OUT)
while True:
if digitalRead(0)==LOW:
customWrite(1, 0)
customWrite(2, 0)
else:
customWrite(1, 2)
customWrite(2, 1)
if __name__ == "__main__":
main()
Step 3: We then simulated. We remarked that as mouse cursor passed on the motion
detector, the lamp came on and the coffee machine started too.
PRACTICAL 5: EXPLORING A SMART HOME
We designed the smart home as shown below;
Step 1: Installing the smart devices
Procedure:
Smart devices used;
Fan
Lamp
Door
Window
Coffee machine
Air conditioner
Fire sensor
Fire extinguisher
MCU
Home gateway
Laptop and tablet
We proceeded by doing the following work;
Act 1: Registering the devices on the home gateway.
We decided to use a wireless connection. That was due to the fact that, using IoT cables
made the work a little bit dirty and looking in a cost aspect, wireless links are more
beneficiary compared to cables.
To use wireless links, we had some configurations to do on the home gateway as follows:
SSID = A
Password = 12345678
Just as shown in the picture below;
As practical example, we shall show how we registered the IoT devices using the fan.
When we try connecting the fan to the home gateway, we noticed that the fan did not have
Wi-Fi card, as shown in the image below;
We therefore had to add a Wi-Fi card. For that, we proceeded as follows;
o We double clicked on the fan and accessed the advanced options as shown in
the image below;
o We accessed the I/O config panel and to the network adapter of the fan, we
chose a wireless card. Upon adding that card, it made our fan have access to Wi-Fi
services. We did as shown in the images below;
After getting the wireless card, we proceeded to get connected on the home gateway as
shown below;
That was how we did for the fan and for every other smart device in the house.
Act 2: Connecting the Tablet and Laptop to the Wi-Fi
In order to monitor our smart devices at home or anywhere we needed devices that could
get connected to the wireless network created by the Home gateway. So, we used a tablet
and laptop for reasons that will be explained as we course through the practical procedure.
So, how did we make them get connect to the home gateway?? Let’s begin with the
tablet.
The tablet already possessed a wireless card. So, all we did was to configure it
to recognize the SSID and the know the password of the of the home gateway. This
was done as shown in the image below;
For the laptop, we had to transform it into a wireless device. Yes, unfortunately
the laptop did not have a Wi-Fi card, just as shown in the image below;
So, we had to add that card. We proceeded as follows;
We double clicked on the laptop and then clicked on the window named
physical.
We then put off the laptop. Doing that, there is a green light that goes off.
The idea was to exchange the ethernet card with a wireless card.
So, we removed the ethernet card. That created and empty slot.
We then selected a wireless card, carried it and placed on the empty slot.
After that, we put on the laptop, with the green light coming on, we verified
again and there was a wireless card.
All that was done as shown in the images below;
In the picture above, we have found our wireless card. But we can’t replace it
if the device is still on.
Device off. We proceeded to change the network adapters. This was done as shown in the
images below;
After doing that, we put on the laptop and it had a Wi-Fi card, as shown in the images
below;
Now that our laptop had a wireless network adapter, all left was to rightly configure it.
This was done as shown in the image below;
Act 3: Accessing IoT services through the home gateway.
This part was to make sure that, any individual could connect to the home gateway, using
either the tablet or the laptop.
We did it with that tablet as follows;
We double clicked on the tablet and clicked on the desktop as shown in the
image below
In the desktop window we clicked on IoT monitor as shown in the image below
Upon doing that, we logged in to the IoT server as shown in the following
images;
One remarked that there were no IoT devices. Meaning, no device was registered.
Act 4: Registering IoT devices
Still as example we decided to use the fan. So, to register that we double clicked on the
fan, went to the config window and scrolled down to the IoT server and selected home
gateway, just as shown in the images below;
That is sufficient to register an IoT device, and registering all of the devices gave us the
following image,
Step 2: We now supposed that, the house belonged to a certain Mr MOMO, who required
the services of a telecom company ‘PLUTO’ and also internet service provider to be able
to monitor his devices when not home. That is from a distant place.
Topology
The topology above shows how we designed the cloud for internet. The internet cloud
content was:
Momo Smartphone
BTS
Central office
DNS server
IoT server
Switch
PLUTO router
Cloud
Act 1: Cloud configuration
We configured the DHCP service on PLUTO-router as follows;
We defined the following DHCP pools;
POOL 1 : SERVER
ip dhcp pool SERVER
network 10.0.0.0 255.0.0.0
default-router 10.0.0.1
dns-server 10.0.0.254
POOL 2 : WAN
ip dhcp pool WAN
network 209.165.200.224 255.255.255.224
default-router 209.165.200.225
dns-server 10.0.0.254
POOL 3 : CELL
ip dhcp pool CELL
network 209.165.201.224 255.255.255.224
default-router 209.165.201.225
dns-server 10.0.0.254
For each of the pools, we reserved the following addresses;
POOL 1 : SERVER
ip dhcp excluded-address 10.0.0.1 10.0.0.5
POOL 2 : WAN
ip dhcp excluded-address 209.165.200.225 209.165.200.229
POOL 3 : CELL
ip dhcp excluded-address 209.165.201.225 209.165.201.229
NB: All these configs were done in the global mode.
We now configured the interfaces:
POOL 1 : SERVER, connected to interface GigabitEthernet 0/0
interface GigabitEthernet0/0
ip address 10.0.0.1 255.0.0.0
no shutdown
POOL 2 : WAN, connected to interface GigabitEthernet 0/1
interface GigabitEthernet0/1
ip address 209.165.200.225 255.255.255.224
no shutdown
POOL 3 : CELL, connected to interface GigabitEthernet 0/2
interface GigabitEthernet0/2
ip address 209.165.201.225 255.255.255.224
no shutdown
We went further to configure the servers
The DNS server was configured statically and the DNS service activated as
shown below,
The IoT server was dynamically addressed and the IoT service was activated as
shown below;
The central office was dynamically addressed, as shown below;
The PLUTO-router connected to the cloud provides internet services and its
connections were as follows
The PLUTO-router was linked by a cross cable to the cloud
All, that is left was to connect the house to the internet.
Act 2: Connecting The Internet to the House
This was done by connecting the Home gateway to the modem by a straight cable. That
modem in turn was connected to a coaxial splitter which was connected to the cloud as
shown in the image below;
Act 3: Registering the smart devices on the IoT server found in the cloud
As example we did that, using the fan again.
We started by creating an account in the IoT server using the laptop as shown in
the images below.
The address entered above, is the server Ip address. It gives us access to the default
account page of the server. Accessing that page, we signed up a new account as
shown below;
We created an account and upon accessing it, it was empty, showing that no
equipment had been registered.
We registered the fan as shown below;
The user name and password were left for us to decide and we could have used
anything. When the fan was registered, we could now monitor it using our
laptop as shown in the image below;
Now that the phone and other devices were registered, we used Mr MOMO’s phone to
connect to the internet and check whether will could also monitor the equipment.
When Mr MOMO signed in, he obtained the following
It was successful. Hence, where Mr. MOMO is found, he can monitor the states of his
smart devices at home.
PRACTICAL 6: EXPLORING A SMART INDUSTRY
Main Idea: The idea is just as that of the smart home. Rendering the industry intelligent,
being able to monitor the devices and the stocks in the industry from a distant office
The procedures are just as for the smart home, so only the results shall be presented
below.
Act 1: Central Office of the RHOLY Corp.
Topology
Act 2: The RHOLY Corp’s warehouse
Topology
Act 3: RHOLY Corp’s Data Centre
Topology
Act 4: Interconnection of the different units
It was done at the level of the Router-PT of each unit. It was from those routers
that we established a leased line (serial link) between each independent units. This
gave the result below.
When all devices are registered on the IoT server, monitoring them from any site becomes
feasible. When monitored from laptop 0, we got the following result;
PRACTICAL 7: BASIC SECURITY MEASURES FOR IoT SYSTEMS
Topology
Main Idea: The idea here was to render the system above more secured. In terms of
security the idea was to add access control lists, render the authentication on network
stronger, insert surveillance cameras etc.
Step 1: Configuring the Network
Configuring Cloud service provider server. They were configured statically.
The DNS server was configured as such;
We first statically inputted the Ip address.
We defined the gateway address
Lastly, we activated the DNS service and entered the server’s name. This gave
the following results below
For the CSP sever we also configured it statically, as shown below
We configured the registry server. Just as the DNS server, the configurations
were pretty the same. This was done as shown below;
We further proceeded to configure the interfaces of each router present in the
topology. This was done as follows;
And for a communication between the routers and the rest of the networking
devices, we specified the static routes, as shown below
We configured the cloud too, just as we did in the previous practical as shown
below;
After the cloud, we were left to configure the PCs, the ISP router, the devices in
the warehouse (entrepot).
The configuration of the external PC was done as shown in the images below.
For any PC (external) to monitor the ware house, there should exist an
internet connection. The following images show the configuration of the ISP
router.
At the level of the ware house, a router was put in to place for the any device
to be able to communicate too with the other units. The router called entrepot
was configured as shown below.
With the ISP router configured, it means the PCs in the ware house can
actively communicate with the other units. Thus they were configured as
follows;
This same configs were used for PC-2. With the PCs configured, we were left
with the gate way through which the IoT devices shall be registered. We
there fore configured the Home gateway. The home gateway was configured
as shown below;
Now that, the home gateway was configured, we had to register the
equipment on the registration server. We first activated the IoT service on the
register and checked if it worked. The result was as shown below
Upon checking the IoT service, it worked. The result shown below, was done using
the laptop to verify if it could access the registration server, and it worked.
We created an account at the level of the server and registered the IoT
devices to the server. We just showed one IoT device as example in this
work. Creation of account first;
Then registering the devices on the registration server;
After that, from the laptop we checked if the device was well registered at the
level of the server. This gave the following result,
All that was done above was just the formalities. Registering the devices and
all the configurations was for the network to be functional, the security part
was not touched. The lines below will access some security aspects.
The minimal security touch was at the level of the home gateway. On the
home gateway we inputted a password at the level of the wireless access
points.
The motion sensor, needed to be more precise. It had to signal us in case there is
an unauthorized access. This was achieved by the following code;
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#banner login %Login with valid password%
Router(config)#banner motd %Authorized Access Only! Tout accs non autoris
est Enter TEXT message. End with the character '%'.
passible de poursuites pnales.%
Router(config)#
We inputted a pass phrase using the following code;
Router(config)#enable secret bonjour
Router(config)#exit
In case we wanted to get connected online as an admin, we configured some
virtual terminals, using the following code.
Router#en
Router#conf t
Router(config)#username ketch secret ktar
Router(config)#line console 0
Router(config-line)#login local
Router(config-line)#exit
Router(config)#line vty 0 4
Router(config-line)#login local
Router(config-line)#end
At the level of the router-entrepot we designed an access control list to render it
selective and more secured. This was done using the following codes;
Router#conf t
Router(config)#access-list 10 permit host 172.18.1.5
Router(config)#access-list 10 permit host 209.165.201.5
Router(config)#access-list 10 permit host 172.18.1.4
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip access
Router(config-if)#ip access-group 10 out
Router(config-if)#end
We did the same at the level of the cloud service provider router at the level of
the company using the following codes.
Router # configure terminal
Router (config)# access-list 110 permit ip host 209.165.200.11 host 209.165.201.5
Router (config)# access-list 110 deny ip any host 209.165.201.5
Router (config)# access-list 110 permit ip any any
Router (config)# interface f0/0
Router (config-if)# ip access-group 110 out
Router (config-if)# end
Router #
To close it, at the CSP server we rendered the web HTTP service secured by
choosing a secured version of HTTP, which is HTTPS, as shown below;
PRACTICAL 8: EXPLORING A SMART CITY
Main Idea: The scenario is going through a connected city. Designing one’s own ideal
city and linking each important compartment of that city through an internet connection.
Rendering monitoring of the units easily and practically at all points or internet points of
the city by certain administrators.
This practical is based on all the notions learned in the previous practicals.
Units of the city;
Telecom network
Adamou electrics
Mr. MOMO’s Flat room
Street lamp
Parking
Topologies:
Telecom Network
Adamou electric
Mr. MOMO’s Flat room
Parking
Street Lamp
General view
Detailing this practical, that is, how we configured or how we created this topology was
not necessary because this practical was based on the notions already fully explored in
the previous works done above.
The solution itself is better viewed on the videos attached to this report.
PRACTICAL 10: STUDY CASE AND PROTOTYPING
Main Idea: The scenario here is that of a garage door which is not smart and the idea is
to know the state of the door either locally or distantly. In order to achieve that we use a
microcontroller with the role of detecting the information with respect to the garage’s
door state (open or closed) and to transmit this information to a distant server to which it
is connected.
Component parts of our study case;
LAN part;
WAN Part;
Internet inside
Wifi access point
General View
That was how the topology was presented for the study case. The configs of the end
devices were done as usual (referring to the previous practicals). What we really retained
and is explained below is how the microcontroller was transformed in to a sensor that will
immediately report the state of the door garage to the server which can then be checked by
a monitoring device.
A java script code was written as follows;
var state = 0;
function setup() {
IoEClient.setup({
type: "GarageDoor",
states: [{
name: "STATUS",
type: "bool",
controllable: true
}]
});
IoEClient.onInputReceive = function(input) {
processData(input, true);
};
attachInterrupt(0, function() {
processData(customRead(0), false);
});
setState(state);
}
function processData(data, bIsRemote) {
if ( data.length <= 0 )
return;
setState(parseInt(data));
}
function setState(newState) {
state = newState;
if ( state === 0 )
digitalWrite(0, 0);
else
digitalWrite(0, 1);
customWrite(0, state);
IoEClient.reportStates(state);
setDeviceProperty(getName(), "state", state);
}
This is the code that transformed the micro controller into an apparent sensor capable of
transmitting the state of the door garage to the server.
This was better visualized in the video attached to this report.
CONCLUSION/COMMENTS
We have arrived to the conclusion of our practical session which coursed through a
plethora of exercises with the main aim of having a little but solid base in the concept of
Internet of Things. Leaving from commanding LEDs to designing smart homes, then
smart industries, smart cities and finally ending with a prototyping study case.
This forced or pulled us to learn to be accustomed with several other programming
language used in programming microcontrollers. We coursed through python, java, java
script, C programming languages in order to succeed some practicals.
Succeeding the practicals brought overwhelming satisfaction but one practical wasn’t cut
for us to carry it on. To be specific Practical 9, on the smart electric grid. Most
components of the practical were lacking in our software and impossible to update and so
we skipped it and left it undone.
We can say with our heads on high, that the main ideas on this practicals were fully
grasped and comprehended. New notions were learned and or acquired and our minds
were literally opened to a vast amount of choices or possibilities in the domain of
networking.
Many things are still not yet well understood, but we can’t help our selves from
pondering, how can we channel this knowledge to make progress in our country?? If not,
how should we apply it to our meagre benefits??