0% found this document useful (0 votes)
17 views20 pages

Unit 4 - 2

Iot notes Cs3691
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
17 views20 pages

Unit 4 - 2

Iot notes Cs3691
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 20
UNIT Iv IoT COMMUNICATION AND OPEN PLATFORMS 4.1, loT COMMUNICATION MODELS AND API | 41.1. loT COMMUNICATION MODELS . {iy Request-Response s Request-Response communication is a model in which the client sends the request to the server and the server responds to the request + The server after receiving the request, decides about how to respond, fetches data, retrieves resource, prepares the response and then responds to the request. % This model is a stateless model and each request-response pair is independent. Client ‘Server Request Receives request Sends process request request looks for info, [>> Resource to Response prepares response sever | [* sends response to client Fig. 4.1. Request- Response Model (ii) Publish-subscribe This communication model has Publisher, Broker, Consumer, % Publisher — Source of data, It sends the data to the topies which are managed by broker. % Consumer — Subscribe to the topics which are managed by the broker. ins doce valle to of cha on 9 studocu Dowrioaded fy psca ule pricijuet0e53@gmal. com) Pmbedkded Sytem ard uy a stisher and sends the data to y 2 Broker — 1 nblist he ] 1 1] Subserber - _ totes 1 | | Eons i a[ Consumer -2 Consumer = 3 . Publish Subscribe Model (iti) Push-pull > Push pull is a communication model in which the data producers push the data to queue and the consumers pull the data from the queue. The consumers and producers need not be aware of each other. The queues here also acts asa bufler, when there is a mismatch between the rate of pushing the data by producers and the rate of pulling the data by consumers. Publisher Siete [-——~[consumer=1 ] Sends message Message pushed Messago pulled queue to queues from queuos Consumer=2 | Fig. 4.3, Push-Pull Modet iv) Exclusive pair Mt is a bidirectional, fully duplex communication model that uses a persistent connection between the client and server. ‘The connection can be closed by client only afier the request y Dowrioaded ty pisca ule prictisjuet0ss3 gmat. com) ceommynicat {43 jon and Open Pletforms ion and Op Yorn a3] tis a stateful communi ion model and the server is aware of all the open connection. Request to setup connection Response accepting the request Message from client to server -—______rrrre| Message from server to client el 4zm-ro zam setup reques rmication begins with a connection The wehsocket ¢ ehds with connection close request Afier the connection establishment, the data is sent in full duplex mode 4.2. loT COMMUNICATION PROTOCOLS The major focus of IoT is the communication between the objects, 7), communication protocol allows the objects to send and receive data over jh, jable for fof, The commonly use cribed in detail below. network. There are various protocols communication protocols offered by loT are de 4.2.1. BLUETOOTH + Bluctooth is a wireless technology standard IEEE 802.15 used fo, exchanging data over short range communication. *%+ It follows the star configuration, with a single primary device that contro}; several secondary devices. Bluetooth protocol stack APPLICATIONS OBEX Tsc spp | |RF COMM tr DATA VOICE L2caP Hel LMP BASE BAND RADIO Fig. 4.8. Bluetooth protocol stack DDowrioaded by piscta ule prisieuernees@2gmal. com) mmunication and Open Platform aaa pr oo" 47) 1 sct of protocols and standards vec prism set of f and standard: 1 for communication between Bluetooth jeos. Whns 7 Inyers as follos (0 Radio layer: This layer is responsible for radio fr quency communication hetween devices (i) Baseband layer: Performs data transfer and link management bets devices (i) Link manager protocol: Manages the link between devices (iv) Logical link control and Adaption protocol (LZCAP): Provic multiplexing-protocols for data protocols. packets and supports higher (x) Service Discovery protocol (SDP): It enables devices to discover service provided by other devices. (1) Telephony control protocol (TCS): It handles telephony related control signals for cordless telephones. (vif) Object Exchange (OBEX): a set of protocols for exchanging object such as veards, vealender etc. Blutooth Low Energy (BLE) + Bluetooth Low Energy (BLE) is designed for low power consumption which is also popularly known as Bluetooth 4.0. ++. BLE uses wireless personal area network technology and optimized for the devices that require long battery life. teed Transfer Connection Fig. 4.9. BLE BLE operates in 2.4 GHz ISM band and data rate are high at | Mb/s. BLE 1OT applications @ Wearable devices (i) Smart home devices Ts doce able ee of ha on 6 studocu Dowrioaded by priscta ule priscieuetoense@gmal. com) 7D 42.2. TIGBEE ZigBee is a wireless technology IBEE 802.15 4 standard that prov ommunication. ZigBe for short rani of communication protocol < networking d Jium range wirel used in low data rate short ton & Thuses AES 128 encryption for protecting information on air transfer. Router (ZR), onsists of ZigBee coordinator (ZC). & ZigBee system device (ZED) (ZC acts a central unit and is responsible for transfer of data. (if) ZR allows the data to pass through them to and fro to other devices, (if) ZED interfaces with end device like sensor and actuator. 2C, ZR, ZED may be connected in form of star, cluster tree, mesh. ZigBee Architecture ee Application Layer ee Application Inerface Layer eo ZigBee Security Layer Network Layer Medium Access Control Layer IEEE 802.15.4 Standard Physical Layer Fig. 4.10, ZigBee Architecture “> Physical layer: It translates the data packets in the over the air bits for transmission and vice versa during the reception, fe by psa jut iprisciiquleo989@gmal com) ication ond Open Patton aii Select No = If Raepherry Pi \ a} pavet th contrl atte devices 2 Aco da step 6 ng the serinl pret f enabled step 7: On the main taspi-config screen, select finish and rehey a. The UART serial port is enabled now programming for Serial Write #/UST / bin / eny Python import serial ger = Serial » Serial (port = ‘/dew /-H1y so’, baudrate = 9600, parity Stopbi P-NONE; serial - STOPBITS — ONE bytesize ~ serial - E timeout = 1) counter = 0 while 1: § Ser - write (‘write counter: % d\n’ % (counter) time - sleep (1) counter +=.1 ‘The function write the text “write counter : n” to any device at receiving end. Programming for Serial Read After setting baudrate, parity, stopbit etc. similar to above, write following code to perform serial read. while 1: X= ser readline ( ) print X This function read a line until it hits a line that ends be omitted. Once it reads the value is stores it into X variable. *isosimerssaiorteestimceon Ey studocu Dowrioaded by piscta ule prisdieuetOease@gal. com) thing after that will Pmvberktod Syston 42a 46.2. SM COMMUNICATION PROTOCOL SP ie | by many different srocol used Common communication ; fer modules, anid 24 GHZ wing example, SD contd madules, REID card. ren ate with microcon an he transferred with, trollers, tninsmitter/recei vers all use SPI to communic One unique benefit of SPI is the fact that data ¢ ad in a continuous stream, y interruption. Any number of hits can be sent ar received in 4 “ue * Wit, ecific number of bits. St, 12C nnd VAR, data is vent in packets, limited to a specific ny : * Sang acket, so the da sop conditions define the beginning and end of each Pi dota interrupted during transmission. Devices communicating via SPI are in at lave (usually a the controlling device (usually a microcontroller), while the slave (usually a senso, from the master. The simple, naster-slave relationship. The master, display, or memory. chip) takes instruction single slave system, but one master oa, configuration of SPI is a single master, control more than one slave (more on this below). Fig. 4.22, SPI configuration MOSI (Master Output/Slave Input) — Line for the master to send data to the slave. MISO (Master Input/Slave Output) - Line for the slave to send data to the master SCLK (Clock) ~ Line for the clock signal. SS/CS (Slave Select/Chip Select) — Line for the master to select which slave 0 send data to. Wires Used | 4 Maximum Speed Up to 10 Mbps Synchronous or Asynchronous? | Synchronous DDowrioaded by piscta ule prisieuletoeas gal. com) ication md Open Planfrine 428) erin! ot Parallel Serial Max of Masters i Maxt of Slaves f Theoretically unlimited* cc, the number of slaves ie li ajn practice, the ret of slaves i¢ limited hy the load capacitance of the ich reduces the ability of the master to accurately switch be tween voltage working of sPt > qe crock The clock signal synchronizes the output of data bits from the master to the 21025 GPIC 11 (SCLK) 6 |I——— cpio (ceo) © GPIOT (CEI) eID (0.80) Ground Koyo} ‘SPIO 12 (Pwo) GPIO 13 (PWM) «— OO| © Ground (GPI0 19 (PCA FS) 0 }2o| P1016 P1025 -—-—_}@@| rio 20 (REALOIN) Dal otis © GPIOz1 (PeN_DOUT) visdoomPiged OO Pinout oy studocu Dowrioaded ty piscta ule prisieuetoehsegmal. com) © Vithernen § h can provide a current yp , aa a computer & USH Pert & make it mA. Keys fase operating syste nan OS Line n & Operating eystem: Racphian OS T operating system nded for Raspberry Wi. Onher third-p fi Diet Pi, Kali, RISC OS Pi can also be run on Pi 4.4.1. VERSIONS OF RASPBERRY Pi a — I 1 | Ethernet | WiFi soc _|_RAM_| USB port) 1_WiFi_| Versions Raspberry Pi -1 RCM 512 MB ' - | |__2n35__| Macc Raspberry Pi - 2 BCM | 1GB 2836} Raspberry Pi-3 | ~BCM | 1GB 4 10/100 | 802.11n_ { 2837 Mbits/s _| Raspberry Pi ~ 4 BCM 2/418 4 10/100 | 802.11n 271 GB Mbits/s | | Raspherry Pi - zero | pcm | 512MB | 1 (Micro s | - L 2835 USB) | 4.4.2, RASPBERRY Pi- 4 Raspberry Pi - 4 is a single board computer with a dual display. The CPU of this device comes with powerful and efficient 1.5 GHz quad core processor. specifications / Oo (i) Comes with Broadcom BCM 277, Quad-core Cortex A-72 — 64-bit SOC processor. (ii) RAM comes with 2 GB/4 GB/8 GB SDRAM. (iii) 2-lane MIPI ports for display and camera port. (iv) 40 pin GPIO headers (v) One 3.0 USB port, one 2.0 USB port, one USB-C port. Dowrioaded by piscta ule prissieuleroeese@gal. om) ae nw eed power CORTON aiaerem * % GPIO pins: Total of 40 GPIO pins are available. Some pi ion and Open Platforms 47 nee Pi eC® the RISC architecture ane led by Ny Bee chip (SOC). It provides effi OM set fine rome mt f aster proceniny snd hae of Raspberry Pi pom |ae[ Power spy] 235 — (soc) |. + GPIO ports] Camera Module Fig. 4.18. Block diagram Processor — Raspberry Pi system on chip (SOC) is Broadcom BCM 2835. This contains ARM11 processor which Supports floating point operation, The software needs to be compiled for ARMV6 to be used with Raspberry Pi, BCM 2835 has timers, interrupt controller, GPIO ports, USB, DMA controller, SPI master and slave, PVM, UART ports, + Power supply: It has SV power supply provided through micro-USB % Camera Module: There is a port for connecting the camera module. There are two versions of camera module. (i) Standard version designed to take pictures in normal light. (ii) NOIR version designed to use it together with an infrared light source to take pictures in the dark, % SD card: MicroSD card of 8 or 16 GB is generally used with operating system installed in it. + Display: Any DV/HDMI Monitor can work as a display for the Pi ‘HDMI: High-Definition Multimedia Interface supports high quality digi video and audio through a single cable. These ports are employe transmitting audio and video signal between devices, supports 5.0 VDC or 3.3 VG. Jnputs.and. unit ars ORR SeE RABEL CTO Pons Dowrioaded by piscta ule prisiequetoease@gal. com) Embeukded Sstems ang yyy (4.14) se of long. on bee GSM is commonly used for 1OT cellular communicats consumption, GSM models are id low complexity, with low energy long vel distance applications that need to transmit real time data ove GSM Technology Architecture 9$7 interface Radio nit Abie interface interface a } fru] [ver] [ave (al 4 —S i ; MSC ' ISDN | | iN aia j i i [Network [ws] + i, (OMe Mobile ! Base ! + Operational support * Public Network station station subsystem Network swtiching Fig. 4.17. GSM Architecture The main elements of GSM architecture.is (i) Mobile station (MS) (ii) Base station subsystem (BSS) (iff) Operational support subsystem (OSS) (iv) Network and switching subsystem (NSS) Mobile station , It is made up of two entities. (a) Mobile equipment: It can be portable and uniquely identified by IMEI number. (4) Subscriber Identity Module (SIM); It is a smart card that contains IMSI number, It allows user to send voice or data transmission to or from other subscribers Dowrioaded by priscta ule prisciuletoease@gmal. com) ai jee station subsystern su handice tra Tic sn siping ty piconet itis net tehin seater BSS Nave 10 componen (a) Base Transceiver Station (RTS): BTS encodes multiplexes, modulates and the RF signal. 1 has transceiver unit Rase station controller (BSC): BSC has multiple BTS arid manages resources for BTS. It can handle transcoding and adaptation functionality handover for cach MS power control © operational support subsystem (Oss) F ' Ji supports the maintenance and operation of GSM. OMC operation maintenance centres used to monitor the performance of cach components. It has three functions: (a) Maintain all telecommunication hardware and network operations. (b) Manage all billing process (c) Manage all mobile equipment Network Switching subsystem (NSS) lt is core network of GSM. It manages the switching functions of the system and allows MSC to communicate with other networks. k i F (a) MSC — Mobile switching center. It is associated with communication switching functions. (6) VLR — Visitor Location Register contains the exact location of all subscribers present in the service area of MSC. (c) HLR ~ Home Location Register contains pertinent data regarding subscribers authorized to use GSM network. (d) AUC — Authentication Center authenticates the mobile subscribers who ‘want to connect in network. (¢) EIR - Equipment Identity Register keeps record of all allowed or banned in the network. (f) PSTN - Public Switched Telephone Network connects with MSC. esoemiessaionteestincesn Ey studocu pisdijuletO683@gmal. com) \Dowrioaded by priscta ul es MoDrM It requires SIM A GSM Modern itn de ohrich wide «The GSM Modern hits a wide rang ri ication, transaction termip curity appl lication: in supply ehnin © mode rem 1c dain logging 4.3. OPEN PLATFORM 4.3.1, RASPBERRY Pi The Raspberry Pi is a low cost, small sized computer that can be pl into computer or TV Monitor. Raspberry Pi runs over a Debian Linux platform called Raspbian which, can perform like a normal desktop. It offers a powerful environment to install variety of packages including LAMP stack, python, Java and many more. It allows interfacing sensors and actuators through general purpose 1/9 pins, 4.3.2. RASPBERRY Pi FORMATS It comes in three different formats. % Model B — It is the ‘full size’ board which contains Ethernet and USB ports, “ Model A - Lighter version of Raspberry Pi with lower specification with no Ethernet port. % Zero — The smallest Raspberry Pi kit with less computation, no USB and no Ethernet. 4.4, RASPBERRY Pi - ARCHITECTURE Raspberry Pi is single Board computer feature a Broadcom system on a chip (SOC) with an integrated ARM — compatible central processing unit (CPU) and on- chip graphical processing unit (GPU). Most of the Raspberry Pi CPU is based on ARMI] or ARM Cortex processor. Dowrioaded by piscia ule prisdieuleroeas egal. com)

You might also like