aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-04-19 08:49:17 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-04-19 08:49:17 +0200
commiteb0cfce8013d4bfcd45cc1162cce865e655ac459 (patch)
treee3670a57713dd4d47da408d6e460ebbbbfe95b92
parent7496179380cc1012c44257336d9871a5864bfcc0 (diff)
downloadiot-workshop-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.gz
iot-workshop-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.bz2
iot-workshop-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.xz
iot-workshop-eb0cfce8013d4bfcd45cc1162cce865e655ac459.zip
wip
-rw-r--r--Makefile40
-rw-r--r--images/IP-Header_eng.pdfbin12311 -> 11359 bytes
-rw-r--r--images/IP-Header_eng.tex45
-rw-r--r--images/esp+arduino-sdks.pgf36
-rw-r--r--images/esp32-block-diagram.pdfbin0 -> 183301 bytes
-rw-r--r--images/esp32_datasheet_en.pdfbin0 -> 892800 bytes
-rw-r--r--images/esp8266ex-block-diagram.pdfbin0 -> 19611 bytes
-rw-r--r--images/esp8266ex_datasheet_en.pdfbin0 -> 642062 bytes
-rwxr-xr-ximages/pp-template12
-rw-r--r--images/qtikz-template.pgs31
-rw-r--r--toc.md28
-rw-r--r--what-is-iot-reveal.html167
-rw-r--r--what-is-iot-slides.pdfbin60996 -> 57390 bytes
-rw-r--r--what-is-iot-slides.tex177
-rw-r--r--what-is-iot-text.pdfbin66466 -> 71346 bytes
-rw-r--r--what-is-iot.md137
16 files changed, 623 insertions, 50 deletions
diff --git a/Makefile b/Makefile
index 0dab227..2f8da55 100644
--- a/Makefile
+++ b/Makefile
@@ -4,21 +4,34 @@ SLIDE_THEME=boxes
PDFS=$(P)-text.pdf $(P)-slides.pdf
HTMLS=$(P)-reveal.html
-RUN_PP_BEAMER=pp -DBEAMER
-RUN_PANDOC_BEAMER=pandoc -f markdown -t beamer --highlight-style=pygments -V theme:$(SLIDE_THEME) \
- --pdf-engine=xelatex
+ifeq (1,$(QUICK))
+PP_DEFS+=QUICK
+PDF_ENGINE = pdflatex
+PANDOC_ARGS += --no-highlight
+else
+PDF_ENGINE = xelatex
+PANDOC_ARGS += --highlight-style=pygments
+endif
+
+RUN_PP_BEAMER=pp -DBEAMER $(patsubst %,-D%,$(PP_DEFS))
+RUN_PP_REVEALJS=pp -DREVEALJS $(patsubst %,-D%,$(PP_DEFS))
+RUN_PANDOC_BEAMER=pandoc -f markdown -t beamer $(PANDOC_ARGS) -V theme:$(SLIDE_THEME) \
+ --pdf-engine=$(PDF_ENGINE)
RUN_PANDOC_REVEALJS=pandoc -f markdown -t revealjs -s -V revealjs-url=./bower_components/reveal.js
-RUN_PANDOC_TEXT=pandoc -f markdown --pdf-engine=xelatex
+RUN_PANDOC_TEXT=pandoc -f markdown --pdf-engine=$(PDF_ENGINE)
-all: $(PDFS) $(HTMLS)
+all: toc.md $(PDFS) $(HTMLS)
-slides: $(P)-slides.pdf $(P)-slides.tex
+slides: $(P)-slides.tex $(P)-slides.pdf
html: $(P)-reveal.html
.PHONY: html slides
clean:
rm -f $(PDFS) $(HTMLS)
+toc.md: $(P).md
+ grep '^#' $< | sed -e 's,^# ,* ,' -e 's,^## , * ,' > $@
+
spell: .$(P).md.spell
.$(P).md.spell: $(P).md
@@ -42,15 +55,18 @@ $(P).md: Makefile
%-slides.tex: %.beamer.md
$(RUN_PANDOC_BEAMER) -o $@ $<
-%-reveal.html: %.md
+%.revealjs.md: %.md
+ $(RUN_PP_REVEALJS) < $< > $@
+
+%-reveal.html: %.revealjs.md
$(RUN_PANDOC_REVEALJS) -o $@ $<
-images/%.pdf: images/%.tex | Makefile
- xelatex -output-directory=images $<
-# pdfcrop $@
-# mv $(patsubst %.pdf,%-crop.pdf,$@) $@
+images/%.pdf: images/%.tex | images/pp-template Makefile
+ images/pp-template < $< > $(patsubst %.tex,%-full.tex,$<)
+ xelatex -output-directory=images $(patsubst %.tex,%-full.tex,$<)
+ mv $(patsubst %.pdf,%-full.pdf,$@) $@
# Dependencies
-$(P).md: images/IP-Header_eng.pdf
+$(P).md: images/IP-Header_eng.tex
$(P).md: images/ip-header.pdf
$(P).md: images/ip-header.svg
diff --git a/images/IP-Header_eng.pdf b/images/IP-Header_eng.pdf
index 9086add..251c3a5 100644
--- a/images/IP-Header_eng.pdf
+++ b/images/IP-Header_eng.pdf
Binary files differ
diff --git a/images/IP-Header_eng.tex b/images/IP-Header_eng.tex
index fad20c1..8de7312 100644
--- a/images/IP-Header_eng.tex
+++ b/images/IP-Header_eng.tex
@@ -1,35 +1,39 @@
-\documentclass[preview]{standalone}
-\usepackage{blindtext}
-\usepackage[utf8]{inputenc}
-\usepackage{tikz}
-\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains,shapes.geometric,shapes.arrows,calc}
+\iffalse
+Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
+\fi
-\usepackage{fontspec}
-\setsansfont{Verdana}
-
-\begin{document}
- \begin{tikzpicture}[scale=0.47]
- \sffamily
- \foreach \x in {0,...,31}
+\begin{tikzpicture}[scale=0.30]
+ \sffamily
+ \foreach \x in {0,7,8,15,16,31} % {0,...,32}
\node at (\x+0.5,20.5) {\scriptsize \x};
% \foreach \x in {0,...,31}
% \node at (\x+0.5,13.5) {\scriptsize \x};
- \foreach \x in {0,...,32}
+ \foreach \x in {0,8,16,32} % {0,...,32}
\draw[thick] (\x,20) -- (\x,21);
+ \foreach \x in {0,...,32}
+ \draw[thick] (\x,14) -- (\x,20);
% \foreach \x in {0,...,32}
% \draw[thick] (\x,13) -- (\x,14);
- \node[thick] (bit1) at (-0.5,20.5) {\scriptsize bit};
-% \node[thick] (bit2) at (-0.5,13.5) {\scriptsize bit};
- \draw [<->, thick] (-0.5, 19.9) -- (-0.5,15.1);
+ \node[thick] (bit1) at (-0.6,20.5) {\scriptsize bit};
+% \node[thick] (bit2) at (-0.6,13.5) {\scriptsize bit};
+
+\iffalse
+ \draw [<->, thick] (-0.6, 19.9) -- (-0.6,15.1);
\draw [thick] (-1, 20) -- (-0.1,20);
\draw [thick] (-1, 15) -- (-0.1,15);
\node[fill=white] at (-1.1,17.5) {\tiny 20 bytes};
+\fi
+ \foreach \y/\v in {0,4,8,12,16,20}
+ \node at (-0.6,{19.5-(\v / 4)}) {\scriptsize \v};
+
\filldraw[thick,draw=black, fill=white] (0,20) rectangle (4,19); \node (mode) at (2,19.5) {\scriptsize version};
- \filldraw[thick,draw=black, fill=white] (4,20) rectangle (8,19); \node (mode) at (6,19.68) {\tiny header length};\node (mode) at (6,19.25) {\tiny with options};
- \draw[thick, draw=black, fill=white] (8,20) rectangle (16,19); \node (stratum) at (11.5,19.5) {\scriptsize type of service (TOS)};
+ \filldraw[thick,draw=black, fill=white] (4,20) rectangle (8,19); \node (mode) at (6,19.5) {\scriptsize len};
+% \draw[thick, draw=black, fill=white] (8,20) rectangle (16,19); \node (stratum) at (11.5,19.5) {\scriptsize type of service (TOS)};
+ \draw[thick, draw=black, fill=white] (8,20) rectangle (16,19); \node (stratum) at (11.5,19.5) {\scriptsize TOS};
\draw[thick, draw=black, fill=white] (16,20) rectangle (32,19); \node (li) at (24,19.5) {\scriptsize full length of packet};
\filldraw[thick,draw=black, fill=white] (0,19) rectangle (16,18); \node (mode) at (8,18.5) {\scriptsize identification};
- \draw[thick, draw=black] (16,19) rectangle (19,18); \filldraw[white] (16.5,18.43) rectangle (19,18.88); \node [](li) at (17.5,18.67) {\tiny IP flags}; \node at (16.5,18.25) {\tiny x};\node at (17.5,18.25) {\tiny D};\node at (18.5,18.25) {\tiny M};
+% \draw[thick, draw=black] (16,19) rectangle (19,18); \filldraw[white] (16.5,18.43) rectangle (19,18.88); \node [](li) at (17.5,18.67) {\tiny IP flags}; \node at (16.5,18.25) {\tiny x};\node at (17.5,18.25) {\tiny D};\node at (18.5,18.25) {\tiny M};
+ \draw[thick, draw=black] (16,19) rectangle (19,18); \filldraw[white] (16.5,18.43) rectangle (19,18.88); \node at (16.5,18.5) {\scriptsize X};\node at (17.5,18.5) {\scriptsize D};\node at (18.5,18.5) {\scriptsize M};
\draw[thick, draw=black, fill=white] (19,19) rectangle (32,18); \node (li) at (24,18.5) {\scriptsize fragment Offset};
\filldraw[thick,draw=black, fill=white] (0,18) rectangle (8,17); \node (mode) at (4,17.5) {\scriptsize time to live (TTL)};
\draw[thick, draw=black, fill=white] (8,18) rectangle (16,17); \node (stratum) at (11.5,17.5) {\scriptsize protocol};
@@ -40,5 +44,4 @@
\draw[fill=white, draw=white] (31.4,14.96) rectangle (31.6,14.05);
\draw[thick] (31.5,14.97) decorate [decoration=saw] { -- (31.5,14.02)};
\node (mode) at (16,14.5) {\scriptsize IP options (variable length)};
- \end{tikzpicture}
-\end{document}
+\end{tikzpicture}
diff --git a/images/esp+arduino-sdks.pgf b/images/esp+arduino-sdks.pgf
new file mode 100644
index 0000000..c351492
--- /dev/null
+++ b/images/esp+arduino-sdks.pgf
@@ -0,0 +1,36 @@
+\begin{tikzpicture}
+
+\node (rect_hw) [rectangle, draw, anchor=south west,
+ minimum width=6 cm, minimum height=1 cm,
+ label={[anchor=south]center:ESP8266 Hardware}] at (0, 0) {};
+
+\draw[thick] (-0.5, 1.25) -- (6.5, 1.25) ;
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=4 cm, minimum height=1 cm,
+ label={[anchor=south]center:ESP SDK}] at (0, 1.5) {};
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=2 cm, minimum height=1 cm,
+ label={[align=center, text width=1cm]center:GCC libc}] at (4, 1.5) {};
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=6 cm, minimum height=1 cm,
+ label={[anchor=south]center:ESP interface}] at (0, 2.5) {};
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=2 cm, minimum height=1 cm,
+ label={[align=center, text width= 2cm]center:Generic Arduino}] at (0, 3.5) {};
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=2 cm, minimum height=1 cm,
+ label={[align=center, text width= 2cm]center:Ethernet}] at (2, 3.5) {};
+
+\node [rectangle, draw, anchor=south west,
+ minimum width=2 cm, minimum height=1 cm,
+ label={[align=center, text width= 2cm]center:ESP APIs}] at (4, 3.5) {};
+
+\draw [decorate, decoration={brace,amplitude=5pt, raise=-4pt}] (-0.5,2.5) -- (-0.5,4.5) node [black,midway,rotate=90, above] {Arduino};
+
+
+\end{tikzpicture}
diff --git a/images/esp32-block-diagram.pdf b/images/esp32-block-diagram.pdf
new file mode 100644
index 0000000..27cc1f9
--- /dev/null
+++ b/images/esp32-block-diagram.pdf
Binary files differ
diff --git a/images/esp32_datasheet_en.pdf b/images/esp32_datasheet_en.pdf
new file mode 100644
index 0000000..4b18b52
--- /dev/null
+++ b/images/esp32_datasheet_en.pdf
Binary files differ
diff --git a/images/esp8266ex-block-diagram.pdf b/images/esp8266ex-block-diagram.pdf
new file mode 100644
index 0000000..19726c7
--- /dev/null
+++ b/images/esp8266ex-block-diagram.pdf
Binary files differ
diff --git a/images/esp8266ex_datasheet_en.pdf b/images/esp8266ex_datasheet_en.pdf
new file mode 100644
index 0000000..ff463f1
--- /dev/null
+++ b/images/esp8266ex_datasheet_en.pdf
Binary files differ
diff --git a/images/pp-template b/images/pp-template
new file mode 100755
index 0000000..33fa981
--- /dev/null
+++ b/images/pp-template
@@ -0,0 +1,12 @@
+#!/bin/bash
+echo '\documentclass[preview]{standalone}
+\usepackage{blindtext}
+\usepackage[utf8]{inputenc}
+\usepackage{tikz}
+\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains,shapes.geometric,shapes.arrows,calc}
+
+\usepackage{fontspec}
+\setsansfont{Verdana}
+\begin{document}'
+cat -
+echo '\end{document}'
diff --git a/images/qtikz-template.pgs b/images/qtikz-template.pgs
new file mode 100644
index 0000000..34582f2
--- /dev/null
+++ b/images/qtikz-template.pgs
@@ -0,0 +1,31 @@
+\documentclass[preview]{standalone}
+\usepackage{blindtext}
+\usepackage[utf8]{inputenc}
+
+\usepackage{fontspec}
+\setsansfont{Verdana}
+
+\usepackage{tikz}
+
+\usetikzlibrary{arrows,
+decorations,
+decorations.pathmorphing,
+decorations.pathreplacing,
+decorations.text,
+backgrounds,
+fit,
+positioning,
+shapes.symbols,
+chains,
+shapes.geometric,
+shapes.arrows,
+angles,
+quotes,
+calc}
+
+\begin{document}
+
+<>
+
+\end{document}
+
diff --git a/toc.md b/toc.md
new file mode 100644
index 0000000..785be3f
--- /dev/null
+++ b/toc.md
@@ -0,0 +1,28 @@
+* What is IoT
+ * What is IoT
+ * IoT is just a concept
+ * What is an IoT Device?
+ * What is an IoT Device?
+ * Typical IoT chips - Bluetooth 4/5
+ * Typical IoT chips - Wi-Fi
+ * ESP8266 details - Power usage
+ * ESP8266 details - Arduino
+* Going back to basics
+ * What is the internet again?
+ * OSI model
+ * Layer 1: Physical Layer
+ * Layer 2: Data Link Layer
+ * Layer 3: Network Layer
+ * Layer 4: Transport Layer
+ * Layer 5: Session Layer
+ * Layer 6: Presentation Layer
+ * Layer 7: Application Layer
+ * Details: IP
+ * Details: IP
+* Lecture: ESP8266 aka NodeMCU aka ESP-12
+* Lecture: MQTT
+ * MQTT
+ * MQTT Implementations
+ * MQTT Cloud Connectors
+* Notes
+ * Assignments
diff --git a/what-is-iot-reveal.html b/what-is-iot-reveal.html
index 15c69e5..cf0d641 100644
--- a/what-is-iot-reveal.html
+++ b/what-is-iot-reveal.html
@@ -29,6 +29,7 @@
<![endif]-->
+
</head>
<body>
<div class="reveal">
@@ -62,6 +63,12 @@
</ul>
</section><section id="what-is-an-iot-device" class="slide level2">
<h2>What is an IoT Device?</h2>
+<aside class="notes">
+<p>As for their definition.</p>
+<p>What differentiates a computer from an IoT device?</p>
+</aside>
+</section><section id="what-is-an-iot-device-1" class="slide level2">
+<h2>What is an IoT Device?</h2>
<ul>
<li>Constrained in (one or more of):
<ul>
@@ -71,9 +78,116 @@
<li>Storage</li>
</ul></li>
</ul>
+</section><section id="typical-iot-chips---bluetooth-45" class="slide level2">
+<h2>Typical IoT chips - Bluetooth 4/5</h2>
+<table>
+<thead>
+<tr class="header">
+<th style="text-align: left;">Chip</th>
+<th style="text-align: left;">CPU</th>
+<th>Freq</th>
+<th style="text-align: left;">RAM</th>
+<th style="text-align: left;">Flash</th>
+<th style="text-align: left;">Price</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td style="text-align: left;">nRF52810</td>
+<td style="text-align: left;">Cortex-M4</td>
+<td>64 M</td>
+<td style="text-align: left;">Hz 24k</td>
+<td style="text-align: left;">192k</td>
+<td style="text-align: left;">$1.88</td>
+</tr>
+<tr class="even">
+<td style="text-align: left;">High perf</td>
+<td style="text-align: left;">ormance,</td>
+<td>entry</td>
+<td style="text-align: left;">-level Bl</td>
+<td style="text-align: left;">uetooth</td>
+<td style="text-align: left;">4/ANT/2.4GHz SoC</td>
+</tr>
+</tbody>
+</table>
+<p>nRF52832 Cortex-M4F 32k 256k $2.54 64k 512k $2.59 High performance Bluetooth 4/ANT/2.4GHz SoC</p>
+<p>nRF52840 Cortex-M4F 256k 1024k $3.85 Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary</p>
<aside class="notes">
-<p>What differentiates a computer from an IoT device?</p>
+<p>All quantities are 1000 pieces</p>
+<p>nRF51: https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?k=nrf51822</p>
+<p>nRF52832: these have different packagings, not only difference price</p>
+<p>https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001%2Cffe0036f&amp;quantity=3000&amp;ColumnSort=1000011&amp;page=1&amp;k=nrf52832&amp;pageSize=500&amp;pkeyword=nrf52810</p>
+</aside>
+</section><section id="typical-iot-chips---wi-fi" class="slide level2">
+<h2>Typical IoT chips - Wi-Fi</h2>
+<table>
+<thead>
+<tr class="header">
+<th style="text-align: left;">Chip</th>
+<th style="text-align: left;">CPU</th>
+<th style="text-align: left;">Freq</th>
+<th style="text-align: left;">ROM</th>
+<th style="text-align: left;">RAM</th>
+<th style="text-align: left;">Price</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td style="text-align: left;">ESP8266</td>
+<td style="text-align: left;">Tensilica L106</td>
+<td style="text-align: left;">160 MHz</td>
+<td style="text-align: left;">N/A</td>
+<td style="text-align: left;">~50 kB</td>
+<td style="text-align: left;">&lt; $1</td>
+</tr>
+</tbody>
+</table>
+<p>ESP32 - dual cpu, Wi-Fi, Bluetooth 4 ESP32-D0WDQ6 2x Xtensa @ 160MHz $ 4.53 @ 10</p>
+<aside class="notes">
+<p>The ESP8266’s RAM depends on which firmware stack is used. Physical is probably 128k or most likely 64k.</p>
</aside>
+</section><section id="esp8266-details---power-usage" class="slide level2">
+<h2>ESP8266 details - Power usage</h2>
+<table style="width:61%;">
+<colgroup>
+<col style="width: 37%" />
+<col style="width: 23%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>State</th>
+<th style="text-align: right;">Current usage</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>Off</td>
+<td style="text-align: right;">0.5 µA</td>
+</tr>
+<tr class="even">
+<td>Deep sleep with RTC</td>
+<td style="text-align: right;">20 µA</td>
+</tr>
+<tr class="odd">
+<td>Light sleep (with Wi-Fi)</td>
+<td style="text-align: right;">1 mA</td>
+</tr>
+<tr class="even">
+<td>Sleep with peripherials</td>
+<td style="text-align: right;">15 mA</td>
+</tr>
+<tr class="odd">
+<td>TX</td>
+<td style="text-align: right;">170 mA</td>
+</tr>
+</tbody>
+</table>
+<aside class="notes">
+<p>Datasheet page 18</p>
+</aside>
+</section><section id="esp8266-details---arduino" class="slide level2">
+<h2>ESP8266 details - Arduino</h2>
+<p>https://github.com/esp8266/Arduino</p>
</section></section>
<section><section id="going-back-to-basics" class="title-slide slide level1"><h1>Going back to basics</h1></section><section id="what-is-the-internet-again" class="slide level2">
<h2>What is the internet again?</h2>
@@ -147,30 +261,71 @@
<h2>Layer 7: Application Layer</h2>
<ul>
<li>HTTP</li>
-<li>MQTT</li>
<li>DNS</li>
+<li>MQTT</li>
+<li>CoAP</li>
<li>(everything else..)</li>
</ul>
</section><section id="details-ip" class="slide level2">
<h2>Details: IP</h2>
-<p>!ifdef(REVEAL) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<sub> <img data-src="images/ip-header.svg" /> </sub>~~~~~~~~~~~~~~~~~~~~~~~~~~~~<sub> !ifdef(BEAMER) </sub>~~~~~~~~~~~~~~~~~~~~~~~~~~~~<sub> <embed data-src="images/ip-header.pdf" /> </sub>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
<aside class="notes">
<p>Note that the “total length” field is 16 bits, 2 bytes, it’s maximum value is 64k, 65536.</p>
</aside>
</section><section id="details-ip-1" class="slide level2">
<h2>Details: IP</h2>
-<p><embed data-src="images/IP-Header_eng.pdf" /> !comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<sub> </sub>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
+
+<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
+
+</section></section>
+<section><section id="lecture-esp8266-aka-nodemcu-aka-esp-12" class="title-slide slide level1"><h1>Lecture: ESP8266 aka NodeMCU aka ESP-12</h1></section></section>
+<section><section id="lecture-mqtt" class="title-slide slide level1"><h1>Lecture: MQTT</h1></section><section id="mqtt" class="slide level2">
+<h2>MQTT</h2>
+<ul>
+<li><em>Message Queuing Telemetry Transport</em></li>
+<li><a href="https://en.wikipedia.org/wiki/MQTT">Wikipedia: MQTT</a></li>
+</ul>
+</section><section id="mqtt-implementations" class="slide level2">
+<h2>MQTT Implementations</h2>
+<ul>
+<li>Mosquitto</li>
+<li>Eclipse Paho</li>
+<li>Redis with MQTT connector</li>
+</ul>
+</section><section id="mqtt-cloud-connectors" class="slide level2">
+<h2>MQTT Cloud Connectors</h2>
+<ul>
+<li>Cloud
+<ul>
+<li>Amazon IoT</li>
+<li>Google Cloud IoT</li>
+<li>Microsoft Azure IoT</li>
+<li>CloudMQTT</li>
+</ul></li>
+<li>DIY
+<ul>
+<li>ThingMQ</li>
+<li>HiveMQ</li>
+</ul></li>
+</ul>
+<aside class="notes">
+<p>In between are:</p>
+<ul>
+<li>self hosted</li>
+<li>Generic bridges</li>
+</ul>
+</aside>
</section></section>
<section><section id="notes" class="title-slide slide level1"><h1>Notes</h1></section><section id="assignments" class="slide level2">
<h2>Assignments</h2>
<ul>
-<li>Measure round trip time/latency. Measure UDP, TCP. Measure when the packet size is greater than the MTU</li>
+<li><p>Measure round trip time/latency. Measure UDP, TCP. Measure when the packet size is greater than the MTU</p></li>
+<li><p>Measure ISR timing</p></li>
</ul>
</section></section>
<section class="footnotes">
<hr />
<ol>
-<li id="fn1"><p>Wikipedia “Internet of Things”<a href="#/fnref1" class="footnote-back">↩</a></p></li>
+<li id="fn1"><p> Wikipedia “Internet of Things”<a href="#/fnref1" class="footnote-back">↩</a></p></li>
</ol>
</section>
</div>
diff --git a/what-is-iot-slides.pdf b/what-is-iot-slides.pdf
index 1d916d8..7f99fd3 100644
--- a/what-is-iot-slides.pdf
+++ b/what-is-iot-slides.pdf
Binary files differ
diff --git a/what-is-iot-slides.tex b/what-is-iot-slides.tex
index cfe6a53..ea08852 100644
--- a/what-is-iot-slides.tex
+++ b/what-is-iot-slides.tex
@@ -52,6 +52,15 @@
\begin{frame}{What is an IoT Device?}
\protect\hypertarget{what-is-an-iot-device}{}
+\note{As for their definition.
+
+What differentiates a computer from an IoT device?}
+
+\end{frame}
+
+\begin{frame}{What is an IoT Device?}
+\protect\hypertarget{what-is-an-iot-device-1}{}
+
\begin{itemize}
\tightlist
\item
@@ -70,7 +79,102 @@
\end{itemize}
\end{itemize}
-\note{What differentiates a computer from an IoT device?}
+\end{frame}
+
+\begin{frame}{Typical IoT chips - Bluetooth 4/5}
+\protect\hypertarget{typical-iot-chips---bluetooth-45}{}
+
+\begin{longtable}[]{@{}llllll@{}}
+\toprule
+Chip & CPU & Freq & RAM & Flash & Price\tabularnewline
+\midrule
+\endhead
+nRF52810 & Cortex-M4 & 64 M & Hz 24k & 192k & \$1.88\tabularnewline
+High perf & ormance, & entry & -level Bl & uetooth & 4/ANT/2.4GHz
+SoC\tabularnewline
+\bottomrule
+\end{longtable}
+
+nRF52832 Cortex-M4F 32k 256k \$2.54 64k 512k \$2.59 High performance
+Bluetooth 4/ANT/2.4GHz SoC
+
+nRF52840 Cortex-M4F 256k 1024k \$3.85 Advanced multi-protocol
+System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz
+proprietary
+
+\note{All quantities are 1000 pieces
+
+nRF51:
+https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?k=nrf51822
+
+nRF52832: these have different packagings, not only difference price
+
+https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001\%2Cffe0036f\&quantity=3000\&ColumnSort=1000011\&page=1\&k=nrf52832\&pageSize=500\&pkeyword=nrf52810}
+
+\end{frame}
+
+\begin{frame}{Typical IoT chips - Wi-Fi}
+\protect\hypertarget{typical-iot-chips---wi-fi}{}
+
+\begin{longtable}[]{@{}llllll@{}}
+\toprule
+Chip & CPU & Freq & ROM & RAM & Price\tabularnewline
+\midrule
+\endhead
+ESP8266 & Tensilica L106 & 160 MHz & N/A & \textasciitilde{}50 kB &
+\textless{} \$1\tabularnewline
+\bottomrule
+\end{longtable}
+
+ESP32 - dual cpu, Wi-Fi, Bluetooth 4 ESP32-D0WDQ6 2x Xtensa @ 160MHz \$
+4.53 @ 10
+
+\note{The ESP8266’s RAM depends on which firmware stack is used.
+Physical is probably 128k or most likely 64k.}
+
+\end{frame}
+
+\begin{frame}{ESP8266 details - Power usage}
+\protect\hypertarget{esp8266-details---power-usage}{}
+
+\begin{longtable}[]{@{}lr@{}}
+\toprule
+\begin{minipage}[b]{0.35\columnwidth}\raggedright
+State\strut
+\end{minipage} & \begin{minipage}[b]{0.22\columnwidth}\raggedleft
+Current usage\strut
+\end{minipage}\tabularnewline
+\midrule
+\endhead
+\begin{minipage}[t]{0.35\columnwidth}\raggedright
+Off\strut
+\end{minipage} & \begin{minipage}[t]{0.22\columnwidth}\raggedleft
+0.5 µA\strut
+\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.35\columnwidth}\raggedright
+Deep sleep with RTC\strut
+\end{minipage} & \begin{minipage}[t]{0.22\columnwidth}\raggedleft
+20 µA\strut
+\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.35\columnwidth}\raggedright
+Light sleep (with Wi-Fi)\strut
+\end{minipage} & \begin{minipage}[t]{0.22\columnwidth}\raggedleft
+1 mA\strut
+\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.35\columnwidth}\raggedright
+Sleep with peripherials\strut
+\end{minipage} & \begin{minipage}[t]{0.22\columnwidth}\raggedleft
+15 mA\strut
+\end{minipage}\tabularnewline
+\begin{minipage}[t]{0.35\columnwidth}\raggedright
+TX\strut
+\end{minipage} & \begin{minipage}[t]{0.22\columnwidth}\raggedleft
+170 mA\strut
+\end{minipage}\tabularnewline
+\bottomrule
+\end{longtable}
+
+\note{Datasheet page 18}
\end{frame}
@@ -226,9 +330,11 @@ The signaling does not specify any max data rate, very high rates
\item
HTTP
\item
+ DNS
+\item
MQTT
\item
- DNS
+ CoAP
\item
(everything else..)
\end{itemize}
@@ -238,8 +344,6 @@ The signaling does not specify any max data rate, very high rates
\begin{frame}{Details: IP}
\protect\hypertarget{details-ip}{}
-\includegraphics{images/ip-header.pdf}
-
\note{Note that the “total length” field is 16 bits, 2 bytes, it’s
maximum value is 64k, 65536.}
@@ -248,7 +352,67 @@ maximum value is 64k, 65536.}
\begin{frame}{Details: IP}
\protect\hypertarget{details-ip-1}{}
-\includegraphics{images/IP-Header_eng.pdf}
+\end{frame}
+
+\hypertarget{lecture-mqtt}{%
+\section{Lecture: MQTT}\label{lecture-mqtt}}
+
+\begin{frame}{MQTT}
+\protect\hypertarget{mqtt}{}
+
+\begin{itemize}
+\tightlist
+\item
+ \emph{Message Queuing Telemetry Transport}
+\item
+ \href{https://en.wikipedia.org/wiki/MQTT}{Wikipedia: MQTT}
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{MQTT Implementations}
+\protect\hypertarget{mqtt-implementations}{}
+
+\begin{itemize}
+\tightlist
+\item
+ Mosquitto
+\item
+ Eclipse Paho
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{MQTT Cloud Connectors}
+\protect\hypertarget{mqtt-cloud-connectors}{}
+
+\begin{itemize}
+\tightlist
+\item
+ Cloud
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Amazon IoT
+ \item
+ Google Cloud IoT
+ \item
+ Microsoft Azure IoT
+ \item
+ CloudMQTT
+ \end{itemize}
+\item
+ DIY
+
+ \begin{itemize}
+ \tightlist
+ \item
+ ThingMQ
+ \item
+ HiveMQ
+ \end{itemize}
+\end{itemize}
\end{frame}
@@ -259,10 +423,11 @@ maximum value is 64k, 65536.}
\protect\hypertarget{assignments}{}
\begin{itemize}
-\tightlist
\item
Measure round trip time/latency. Measure UDP, TCP. Measure when the
packet size is greater than the MTU
+\item
+ Measure ISR timing
\end{itemize}
\end{frame}
diff --git a/what-is-iot-text.pdf b/what-is-iot-text.pdf
index 7b96348..b3f6aa4 100644
--- a/what-is-iot-text.pdf
+++ b/what-is-iot-text.pdf
Binary files differ
diff --git a/what-is-iot.md b/what-is-iot.md
index 9c97909..c4a1a63 100644
--- a/what-is-iot.md
+++ b/what-is-iot.md
@@ -5,8 +5,14 @@ header-includes:
- \hypersetup{colorlinks=true,
allbordercolors={0 0 0},
pdfborderstyle={/S/U/W 1}}
+ - \usepackage{tikz}
+ \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains,shapes.geometric,shapes.arrows,calc}
+!ifndef(QUICK)
+~~~~~~
- \usepackage{fontspec}
\setsansfont{Verdana}
+~~~~~~
+
---
# What is IoT
@@ -24,7 +30,21 @@ header-includes:
## IoT is just a concept
-* *The Internet of Things (IoT) is the network of physical devices, vehicles, home appliances and other items embedded with electronics, software, sensors, actuators, and connectivity which enables these objects to connect and exchange data.*^[Wikipedia "Internet of Things"]
+* *The Internet of Things (IoT) is the network of physical devices,
+ vehicles, home appliances and other items embedded with
+ electronics, software, sensors, actuators, and connectivity which
+ enables these objects to connect and exchange data.*^[
+ Wikipedia "Internet of Things"]
+
+## What is an IoT Device?
+
+::: notes
+
+As for their definition.
+
+What differentiates a computer from an IoT device?
+
+:::
## What is an IoT Device?
@@ -34,10 +54,76 @@ header-includes:
* Network bandwidth and/or latency
* Storage
+## Typical IoT chips - Bluetooth 4/5
+
+!comment
+~~~
+~~~
+Chip CPU Freq RAM Flash Price
+-------- -------- ---- -------- ------ ------
+nRF52810 Cortex-M4 64 MHz 24k 192k $1.88
+High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
+
+nRF52832 Cortex-M4F 32k 256k $2.54
+ 64k 512k $2.59
+High performance Bluetooth 4/ANT/2.4GHz SoC
+
+nRF52840 Cortex-M4F 256k 1024k $3.85
+Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary
+
::: notes
-What differentiates a computer from an IoT device?
+
+All quantities are 1000 pieces
+
+nRF51: https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?k=nrf51822
+
+nRF52832: these have different packagings, not only difference price
+
+https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001%2Cffe0036f&quantity=3000&ColumnSort=1000011&page=1&k=nrf52832&pageSize=500&pkeyword=nrf52810
+
+:::
+
+## Typical IoT chips - Wi-Fi
+
+Chip CPU Freq ROM RAM Price
+----- ------- ------- ----- ------ ------
+ESP8266 Tensilica L106 160 MHz N/A ~50 kB < $1
+
+ESP32 - dual cpu, Wi-Fi, Bluetooth 4
+ESP32-D0WDQ6 2x Xtensa @ 160MHz $ 4.53 @ 10
+
+::: notes
+
+The ESP8266's RAM depends on which firmware stack is used. Physical is probably 128k or most likely 64k.
+
:::
+## ESP8266 details - Power usage
+
++--------------------------+----------------+
+| State | Current usage |
++==========================+===============:+
+| Off | 0.5 µA |
++--------------------------+----------------+
+| Deep sleep with RTC | 20 µA |
++--------------------------+----------------+
+| Light sleep (with Wi-Fi) | 1 mA |
++--------------------------+----------------+
+| Sleep with peripherials | 15 mA |
++--------------------------+----------------+
+| TX | 170 mA |
++--------------------------+----------------+
+
+::: notes
+
+Datasheet page 18
+
+:::
+
+## ESP8266 details - Arduino
+
+https://github.com/esp8266/Arduino
+
# Going back to basics
## What is the internet again?
@@ -122,8 +208,9 @@ This layer is not really much used in the IP stack
## Layer 7: Application Layer
* HTTP
-* MQTT
* DNS
+* MQTT
+* CoAP
* (everything else..)
## Details: IP
@@ -134,7 +221,7 @@ This layer is not really much used in the IP stack
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!ifdef(BEAMER)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-![](images/ip-header.pdf)
+!ifndef(QUICK)(![](images/ip-header.pdf))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::: notes
@@ -145,14 +232,54 @@ Note that the "total length" field is 16 bits, 2 bytes, it's maximum value is 64
## Details: IP
-![](images/IP-Header_eng.pdf)
+!ifndef(QUICK)(!include(images/IP-Header_eng.t