The Internet of Things (COM3505 )

Professor Hamish Cunningham
Department of Computer Science
University of Sheffield




1 Summary

There are many definitions of the Internet of Things (IoT); one of the most exciting is given by Bruce Schneier in his provocative piece Click Here to Kill Everyone:

…the Internet of Things has three parts. There are the sensors that collect data about us and our environment… Then there are the “smarts” that figure out what the data means and what to do about it… And finally, there are the actuators that affect our environment. … You can think of the sensors as the eyes and ears of the internet. You can think of the actuators as the hands and feet of the internet. And you can think of the stuff in the middle as the brain. We are building an internet that senses, thinks, and acts. This is the classic definition of a robot. We’re building a world-size robot, and we don’t even realize it.

(Schneier 2017)

At the other extreme the IoT is about what becomes possible when networked microcontrollers become cheap enough to embed in very many everyday contexts, from central heating thermostats to garage doors. These devices face tight constraints of power usage and cost, and concomitant challenges to their security and functionality. They also quickly become extremely numerous, driving work on big data analytics and cloud computing.

The technology of networked devices goes back perhaps 50 years or more. The coining of the term itself is often credited to Kevin Ashton in 1999, while working at the Auto ID Center at MIT (Ashton 2011).

NOTE: the rest of this document is a little out-of-date… YMMV!

2 COM3505

2.1 Overview

Low cost networked computers are adding eyes and ears (or sensors) and arms, legs and voices (or actuators) to the Internet. These new devices are being connected to on-line brains (big data and deep learning in the cloud). This new field is called The Internet of Things (or IoT). Will the result be a ‘world robot’?! This module will cover the context and history of the IoT, the hardware that makes it possible, the communications protocols and security systems it relies on, and the cloud-side analytics that make sense of the data it produces. It will give practical hands-on experience of common IoT devices (sensors, actuators, microcontrollers, single-board computers and communications chips), and look at a range of commercial platforms and applications. Each student will be given an ESP8266 and we will program live IoT applications using that device.

2.2 Themes

The themes the module covers include:

    • Context, History, Definitions
      • physical computing
      • cyber-physical systems
      • distributed computing, utility computing, the cloud
      • ambient computing, ubiquitous computing
      • embedded systems
    • Hardware
    • ESP8266 / ESP32
    • RPi
    • Edison
    • etc.
  • Sensing and Actuating (or Responding)
    • sensor families
    • communications with I2C, OneWire, etc.
    • digital vs. analog; using an ADC
    • actuators: relays, motors, solenoids, …
    • notifications: Twitter, SMS, …
  • Cloudside: Interpreting, Visualising, Interacting
    • big data, data science, data analytics
    • map-reduce; batch vs. stream
    • frameworks: Hadoop, Storm, Samza/Kafka, Spark, …
  • Platforms
    • AWS IoT
    • Android Things
    • Ubuntu Snappy
    • Embedded Windows (CE…IoT)
    • Azure IoT
    • the Web of Things
    • Siemens Mindsphere
  • Connecting, Securing
    • low power comms
    • bluetooth
    • radio, LoRaWAN, The Things Network
    • wifi
    • IPv6
    • protocols: MQTT vs. REST over HTTP; …
    • security (1)
      • closed vs. open protocols
      • proprietary vs. open source
    • security (2)
      • MQTT over SSL; X.509, TLS, HTTPS; AWS/SigV4; Hypercat; …
      • the problem of updates
      • the October 2015 Dyn DDoS; Schneier
  • Applications
    • home automation
    • smart cities
    • factory of the future, Industry 4.0
    • robotics
  • Coding
    • Arduino C, for firmware on the ESP

2.3 Practicals

A series of lab classes will take students through several stages to arrive at an engaging IoT application. For example:

  • Physical computing 101: GPIO manipulation on the ESP8266; LEDs and motors; data push to the cloud.
  • Going off grid: low energy wifi on the ESP32; temperature sensing; Twitter notifications. (Programming in C.)
  • Humans in the loop: cloud-based data visualisation; a control UI. (Platform based, or Python, or HTML+Javascript.)
  • Project: mini robot, air quality sensor or a home automation application with connected Things, hub controller and cloud-based analysis. [TBC]

2.4 Reading

Some reading materials:

3 Applications of the IoT

Applications of IoT technology are many and varied. Existing products include:

  • RFID warehousing and logistics trackers
  • Fitbit
  • Polar heart rate monitor…
  • Good night lamp…
  • NEST thermostat…

DIY projects are numerous and diverse. For example:

4 Revolutionary Code: from MIT Printers to the Arduino

Do you own a phone?

You are probably carrying a phone, but do you own it?!

Call me an old stickler, but I think if I own something then

  • I can take it apart and see what it contains
  • I can modify it
  • I can repair it

Do those things apply to your phone? How about your laptop? Your tablet?

We buy stuff, the people who sell them claim we own them, but we have few rights over them….

4.1 Return with me to Boston the 1970s…

The PDP 10 was a cool computer:


The first machine to make time sharing (multitasking) common; max memory… a whole megabyte!

The operating system code (assembler) was routinely shared and improved by a community of programmers (“hackers”FOOTNOTE: Footnote) at MIT, including one Richard Stallman.

4.2 Whaddya mean, I can’t fix it?!

The 1980s: no more source, and sign an NDA even to get access to a binary

Stallman’s went on to suffer the consequences of an aversion to NDAs when he was refused access to the source for a printer control program, even though his intention was to improve that program.

Stallman: ‘This meant that the first step in using a computer was to promise not to help your neighbor. A cooperating community was forbidden. The rule made by the owners of proprietary software was, “If you share with your neighbor, you are a pirate. If you want any changes, beg us to make them.”” (Stallman 2002)

4.3 What to do?

‘So I looked for a way that a programmer could do something for the good. I asked myself, was there a program or programs that I could write, so as to make a community possible once again?

The answer was clear: what was needed first was an operating system. That is the crucial software for starting to use a computer. With an operating system, you can do many things; without one, you cannot run the computer at all. With a free operating system, we could again have a community of cooperating hackers—and invite anyone to join. And anyone would be able to use a computer without starting out by conspiring to deprive his or her friends.’ (Ibid.)

And this is what lead to the kernel code that runs your Android phone, the GNU/Linux operating system that runs most servers in the cloud, and the compiler code you’ll use to create firmware to run on the ESP32 in this course….

4.4 Why does this matter?

  • if you want to build quickly you need to stand on the shoulders of giants
  • if you want to build well, you want the building blocks to have been tested, tested, and tested again
  • if you want to make money from software, you need to be popular! sharing code is often a prerequisite
  • there’s no security without code audit; if there’s no code, there’s no audit…

5 The early history of the IoTFOOTNOTE: Footnote

The term Internet of Things was coined by Kevin Ashton in 1999 for a presentation at Procter and Gamble. Evolving from his promotion of RFID tags to manage corporate supply chains, Ashton’s vision of the Internet of Things is refreshingly simple: “If we had computers that knew everything there was to know about things — using data they gathered without any help from us — we would be able to track and count everything, and greatly reduce waste, loss and cost. We would know when things needed replacing, repairing or recalling, and whether they were fresh or past their best.” [1]

Of course, devices had been ‘on the internet’ for several years before this, from at least 1982 in the case of a drink vending machine at Carnegie Mellon University in Pittsburg [2]. Using a serial port converter, the status lights of the front panel of the machine were connected to the Computer Science departmental computer, a DEC PDP-10 (for which today’s equivalent cost would be around $2 million!). The Unix finger utility was modified to allow it to report the level of coke bottles and whether they were properly chilled. Internet users anywhere could type “finger coke@cmua” and read the status of the machine. (It is notable that the world’s first IoT device was enabled by openly available Unix source code.)

A camera pointed at a coffee-pot in Cambridge’s computer science department was video-streamed on the internet from 1991, and when control from the web to the camera was established in 1993 the first webcam was born [3]. Presaging very contemporary anxieties, a toaster had been connected to the internet in 1990 at the INTEROP exhibition [4], and nearly caused a strike as preparing food was an activity allocated to unionised labour. However it wasn’t until 2001 that a toaster became an IoT device in a modern sense, able to dynamically query a webservice for the current weather forecast, and then burn the appropriate pictogram onto a piece of toast [5].

So we can see that from the earliest days of IoT (when it was often called pervasive or ubiquitous computing) our current concerns around open source, security [6] and human obsolescence were already recognised.

TODO add to Paperpile: refs:

1 Ashton, K. (2009) That ‘Internet of Things’ Thing RFID Journal 2009 Retrieved 13/8/17

2 Machine, C. The “Only” Coke machine on the Internet Retrieved 13/8/17

3 Stafford- Fraser, Q. (1995) The Trojan Room Coffee Pot Retrieved 13/8/17

4 Romkey, J. (2016) Toast of the IoT: The 1990 Interop Internet Toaster IEEE Consumer Electronics Magazine. Volume 6, Issue 1 Retrieved 13/8/17 (PAYWALL) (OPEN ACCESS)

5 Ward, M. (2001) A small slice of design Retrieved 13/8/17

6 Denning, D.E & Denning, P.J (1977) Certification of Programs for Secure Information Flow Communications of the ACM. Volume 20, Issue 7 504-513 Retrieved 13/8/17 (PAYWALL) (OPEN ACCESS)

6 Current state of IOT hardwareFOOTNOTE: Footnote

“It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity…”[1]

We do indeed live in an epoch of belief and incredulity, with feverish hype of IOT widespread across the electronics and computing industries. Want a £400 wifi connected juicer that locks you into proprietary ingredient pouches anyone? Meanwhile ‘policy bloggers’ burble excitedly about techno-utopias such as smart cities that eliminate traffic — “Imagine a city with no traffic at all”[2]. Security researchers are desperately trying to warn us of the dangers of letting our personal data leak out from our devices [3]. After FitBit users’ personal exercise data was exposed publicly [4] the company solemnly announced “We have also updated our default settings for new users for activity sharing to ‘private’.”

Current hardware is very diverse, with major companies such as Intel, Texas Instruments, Broadcom etc. competing to have their chips chosen by manufacturers. However the arrival of Espressif’s ESP8266 (and now the ESP32 (Community 2017; Kolban 2017)) has shaken up the rest of industry by charging $2 per chip instead of $20. This has attracted a lot of attention and stimulated the creation of community-driven knowledge, documentation, libraries and tools; so much so that it is significantly quicker and easier to develop for this platform than most others.

IoT hardware can be classified according to its connectivity technology; currently the useful ones are ethernet, wifi, bluetooth, zigbee, z-wave and cellular. Whilst wired connections are still relevant for some applications, it seems that most recent developments have concentrated on wireless devices. If we are to buy hundreds of IoT devices each in the next few years, we certainly won’t be plugging them all into ethernet cables. Cellular technology remains stubbornly expensive both to buy and to run; fine for the now life-critical mobile phone, but not for those hundreds of devices.

Of the remaining mainstream wireless technologies, bluetooth’s USPs are it’s ultra low-power short-range attributes and that every phone has it. For devices with small batteries such as fitness trackers, this allows them to last a few days between charges. Wifi has major issues with power use and connection negotiation speed but it has emerged as a major IoT connectivity choice because of it’s ubiquity. Then there are the Z’s – Z-wave is proprietary but popular with blue chips like Honeywell and GE, Zigbee is an open standard also popular with big corporations – the Phillips Hue light bulbs use it as does the Nest thermostat.

Several ‘hubs’ have been launched by manufacturers such as Google, Amazon and Samsung that aim to bring all these devices together under one control, rather than having to manage dozens apps of physical remotes. For example, Samsung’s SmartThings hub has 4 wireless radios covering z-wave, zigbee, bluetooth and wifi plus an ethernet port.

TODO add to Paperpile


1 Dickens, C. (1867) A Tale of two cities, and Great expectations (Diamond ed.). Ticknor and Fields.

2 O’Muircheartaigh, F. (2013) The Smart City: Using Technology to Reduce Congestion in London Sustainable Business Toolkit Retrieved 13/8/17

3 Grover, S. & Feamster, N. (2016) The Internet of Unpatched Things PrivacyCon 2016 Retrieved 13/8/17

4 Loftus, J. Dear Fitbit Users, Kudos On the 30 Minutes of “Vigorous Sexual Activity” Last Night Gizmodo. Gawker Media. Retreived 13/8/17

6 Denning, D.E & Denning, P.J (1977) Certification of Programs for Secure Information Flow Communications of the ACM. Volume 20, Issue 7 504-513 Retrieved 13/8/17 (PAYWALL) (OPEN ACCESS)

7 Bibliography

Adelantado, F., X. Vilajosana, P. Tuset-Peiro, B. Martinez, J. Melia-Segui, and T. Watteyne. 2017. “Understanding the Limits of LoRaWAN.” IEEE Communications Magazine 55 (9): 34–40.

Arduino. 2017. “Arduino IDE Guide.” 2017.

Ashton, Kevin. 2011. “That ‘internet of Things’ Thing.” RFiD Journal 22 (7).

Banzi, Massimo, and Michael Shiloh. 2014. Getting Started with Arduino: The Open Source Electronics Prototyping Platform. Maker Media, Inc.

Bassi, Alessandro, Martin Bauer, Martin Fiedler, Thorsten Kramp, Rob Van Kranenburg, Sebastian Lange, and Stefan Meissner. 2013. “Enabling Things to Talk.” Designing IoT Solutions with the IoT Architectural Reference Model, 163–211.

Blenn, Norbert, and Fernando Kuipers. 2017. “LoRaWAN in the Wild: Measurements from The Things Network.” arXiv [cs.NI]. arXiv.

Community, Esp32. 2017. “ESP32 Forum.” 2017.

Dhanjani, Nitesh. 2015. Abusing the Internet of Things: Blackouts, Freakouts, and Stakeouts. “O’Reilly Media, Inc.”

Doukas, Charalampos. 2012. Building Internet of Things with the Arduino. USA: CreateSpace Independent Publishing Platform.

Greenfield, Adam. 2017. “Rise of the Machines: Who Is the ‘Internet of Things’ Good For?” The Guardian, June 6, 2017.

Kolban, Neil. 2017. Kolban’s Book on ESP32.

Kurniawan, Agus. 2016. Smart Internet of Things Projects. Packt.

MacDermott, A., T. Baker, and Q. Shi. 2018. “Iot Forensics: Challenges for the Ioa Era.” In 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), 1–5.

Margolis, Michael. 2011. Arduino Cookbook: Recipes to Begin, Expand, and Enhance Your Projects. “O’Reilly Media, Inc.”

McEwen, Adrian, and Hakim Cassimally. 2013. Designing the Internet of Things. John Wiley & Sons.

Monk, Simon. 2013. Programming Arduino Next Steps: Going Further with Sketches. McGraw Hill Professional.

NERC. 2016. “NERC Guidance on the Safe Use of Lithium Batteries.” 2016.

Nold, Christian, and Rob van Kranenburg. 2011. The Internet of People for a Post-Oil World.

Pfister, Cuno. 2011. Getting Started with the Internet of Things: Connecting Sensors and Microcontrollers to the Cloud. “O’Reilly Media, Inc.”

Schneier, Bruce. 2017. “Click Here to Kill Everyone.” NY Mag, January.

Schwartz, Marco. 2016a. Home Automation with the ESP8266: Build Home Automation Systems Using the Powerful and Cheap ESP8266 Wifi Chip. CreateSpace Independent Publishing Platform.

———. 2016b. Internet of Things with ESP8266. Packt Publishing Ltd.

Sivaraman, V., H. H. Gharakheili, A. Vishwanath, R. Boreli, and O. Mehani. 2015. “Network-Level Security and Privacy Control for Smart-Home IoT Devices.” In 2015 IEEE 11th International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), 163–67.

Slama, Dirk, Frank Puhlmann, Jim Morrish, and Rishi M. Bhatnagar. 2015. Enterprise IoT: Strategies and Best Practices for Connected Products and Services. “O’Reilly Media, Inc.”

Stallman, Richard. 2002. Free Software, Free Society: Selected Essays of Richard M. Stallman.

Thakur, Manoj. 2016. Zero to Hero ESP8266.

The Things Network. 2018. “The Things Network Manifesto.” 2018.

Upton, Eben, and Gareth Halfacree. 2014. Raspberry Pi User Guide. John Wiley & Sons.