DingNet - KU Leuven...2018/03/13 · • DingNet offers an experimental environment for IoT...
Transcript of DingNet - KU Leuven...2018/03/13 · • DingNet offers an experimental environment for IoT...
DingNet
An experimental environment for Internet of Things applications
13 March 2018
SciEngTech Lunchbox meeting
What is DingNet?
• DingNet offers an experimental environment for IoT applications and research in
Leuven and Heverlee by providing a free wireless LoRaWAN communication
infrastructure to researchers, personnel and students
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
IoT – Concept
• Internet of Things (IoT) = very broad concept
o “Connecting intelligent systems embedded in everyday objects and giving them the ability to
autonomously transmit and receive data via Internet”
o The Internet of Things (IoT) is a system of interrelated computing devices, mechanical and
digital machines, objects, animals or people that are provided with unique identifiers and the
ability to transfer data over a network without requiring human-to-human or human-to-computer
interaction.
• Not a specific technology
o Can be any object
o Can be any communication technology
IoT – Communication characteristics
• Distance
o Devices in immediate vicinity
o Room, House
o Property, Neighborhood
o City, Nation
• Bandwidth
o Alerting messages
o Sensor measurements at several minute intervals
o Voice data
o Video data
Personal area
Wide area
Very low bandwidth
High bandwidth
IoT – Communication characteristics
• Energy consumption
o Years of lifetime on a single small battery
o Several weeks on a single battery
o Several days on a single battery
o Battery operation not feasible
→ Due to physics, only two characteristics can be optimized at once
o Otherwise we would have a nationwide ultra low power video capable network already
Ultra low power
High power
IoT – Communication trade-offs
High Bandwidth
Low PowerLarge Range
WIFI
Bluetooth
3G/4GZigBee
LPWAN
Z-Wave
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
LPWAN – Low Power Wide Area Network
• Typical LPWAN characteristics
o Large wireless range
• Up to 30km and more if no obstacles
o Low power
• A device can work multiple years on one battery charge
o Very low bandwidth
• Maximum of a few 100’s of messages a day
• Mainly one direction: device → application
o Low Price
• Big driving factor for market acceptance
LPWAN – Typical use-cases
Office/Factory/Warehouse
• Remote monitoring and control of equipment
• Operation optimization
• Employee administration
Home/School/Hospital
• Senior and child monitoring
• Smart meters (electricity, gas, water)
• Garbage collection optimization
Mountains/Rivers/Oceans
• Natural disaster prevention (land slide, flooding, earthquake…)
Public Infrastructure
• Management
• Infrastructure/street lighting
• Predictive maintenance
Transportation
• Freight/palette management
• Logistics tracking & optimization
• Smart parking
Agriculture
• Water quality/temperature & humidity
• Live stock tracking
• Soil management
LPWAN – Typical use-cases
• In general
o Measurement sensors
• Temp, humidity, light, presence, air quality…
o Tracking
• Objects, animals, people…
o Object control
• Infrastructure, machines…
Where
o Large geographical coverage needed
• Remote locations, cities…
o Low bandwidth required
• No audio, video, streaming…
LPWAN – Technologies
• Different existing technologies with different business models
o LoRaWAN
• Provides technology that lets other companies build a global IoT solution
• LoRa is a patented radio protocol (Semtech)
• LoRaWAN is an open alliance defining the higher layer protocols
o SigFox
• Wants to become a global IoT operator
• Anyone can make hardware, but the entire infrastructure is operated by SigFox
o LTE-M (recent)
• Evolve a complex existing technology (LTE) to make more money for network operators
o NB-IoT (recent)
• “Clean slate” approach to make more money for network operators
LPWAN – Frequency spectrum
• LoRaWAN, SigFox
o Unlicensed spectrum
• 868/915Mhz ISM band (Industrial, Scientific, Medical)
• Free to use for everyone
• Regulatory rules
• 1% duty cycle
• Limited transmit power (14dBm, 25mW)
• LTE-M, NB-IoT
o Licensed spectrum
• Proprietary mobile operator bands
• Cannot be used without license
LPWAN – LoRaWAN
• KU Leuven chose LoRaWAN:
o Most open standard
o Cheap
o Big active community (open-source soft- and hardware)
→ Advantages for users
• Free for students, personnel and researchers
• ‘Self-service’ for management of own devices
• Possibility to design/modify yourself devices and applications
• Online much information, support and examples
→ This ICTS service is called DingNet
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
DingNet – Infrastructure
• User devices
• Antennas & gateways
• Backend Network server
o Self-service web interface
• MQTT broker
• User applications
DingNet Infrastructure
Ante
nne
Ante
nne
Ante
nneUser Device
User Application
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Antenna
• Converts radio waves to electrical signal
o Radio waves generated by devices
• Omnidirectional 21 cm tall ‘pipe’ (½λ, 2 dBi gain)
• Ideal placement
o High above ground
o Line-of-sight
• Connected to
o Gateway (via coaxial cable)
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Gateway
• Converts electrical antenna signal to data packet and
forwards it to Network server
• Placed close to antenna
• No local ‘intelligence’
• Cheap
• Connected to
o Antenna (via coaxial cable)
o TCP/IP Network (via network cable)
o Power (via network cable or power wall adapter)
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Backend Network server
• Processes data packets from all the gateways and forwards to correct application
• Complex processing
o Message processing
• Deduplication, integrity checks, encryption/decryption, data conversion…
o Authentication & authorisation
• Check if device is known, find correct application, find associated user…
• Provides
o Self-Service management web interface
• Registering devices and applications
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Backend Network server
• Self-service management web interface
o Manage devices and applications
• No ICTS intervention required
o Provisions backend infrastructure
• Changes are immediately active
Device
Application
User u0022948
Application1
DeviceA DeviceB
Application2
DeviceC
Device Antenna Gateway Network server ApplicationMQTT
DingNet – MQTT broker
• MQTT protocol used for exchanging data with user application
• Publish/subscribe event model
• Message consist of two parts:
o Topic
• <application name>/devices/<device name>/up
o Payload
• Device data
• Meta information (e.g. link monitoring)
• If nobody is listening, the data disappears
• A user can only see data for his/her own applications
Device
Application
User u0022948
Application1
DeviceA DeviceB
Application2
DeviceC
Device Antenna Gateway Network server ApplicationMQTT
DingNet – MQTT broker
DingNet Infrastructure
Application 1
Application 2
Device A
Device B
Device C
Subscribe “App1/#”
Topic: “App1/DevA/up”
Payload: “{‘Value’: 3.1415}”MQTT
Broker
For clarity, topics and payload have been simplified
Subscribe “App2/#”
3.1415
42
Topic: “App1/DevB/up”
Payload: “{‘Value’: 42}”
2.718Topic: “App2/DevC/up”
Payload: “{‘Value’: 2.718}”
Listening
Listening
LoRaWAN
processing
Device Antenna Gateway Network server ApplicationMQTT
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
DingNet – Other interesting facts
• Bidirectional communication
• Security
• Disclaimer
• Wireless range
o Extending the range
• User workflow
DingNet – Bidirectional communication
• Previous slides only mention ‘upload’ traffic
• Download traffic is also possible
o Send configuration parameters to device in the field
o Ask the Network server for confirmation of an upload packet
• However…
o Download traffic is very limited
• Because gateways also have duty cycle limitations
• Maximum few tens of messages/day
o Constant listening consumes too much power for battery operation
• Semi-solutions: Polling by device or only listening on certain time intervals
DingNet – Security
• Device ↔ Network server
o AES 128-bit encryption
o Each device has unique set of keys
• Only Network server knows those too
• Used to derive session encryption keys
• Network server ↔ User Application
o Transport Layer Security (TLS)
o User/password authentication
→ Devices cannot communicate with each other directly
→ Intermediate network can be ‘untrusted’
DingNet Infrastructure
Ante
nne
Ante
nne
Ante
nneUser Device
User Application
TLS
User&Pwd
AES-128
DingNet – Disclaimer
• Best effort service
o No service-level agreement (yet)
o Use at your own risk
• Don’t depend on it for e.g. fire alarm, emergency button…
• All usage must be compliant with local law and procedures
o E.g. monitoring persons without consent
• Code of Conduct for staff, students or others applies
DingNet – Wireless range
• Current antenna locations
o ICTS
o Tower IMEC(2x)
o Tower CBIB (2x)
o Computer sciences
o Student residences
• Studax, Waterview, Lerkenveld, De La Salle
o Campus Brugge
• Ideal outdoor coverage
• On many places indoor will work
DingNet – Extending the range
• If you have a project ‘out there’ or deep inside a modern building or basement…
• Requirementso Gateway/Antenna
• Costs a few 100 euro’s
• Typical radius
• Outdoor: 1 to 5km (depends on landscape, obstructions and antenna placement)
• Indoor: depends on building structure
o Power• Wall outlet
• Small generator
• Solar power (expensive)
o Network access• Can be 4G cellular network
→ Contact ICTS to see what’s possible
DingNet – User workflow
User
DingNet InfrastructureAntenneAntenneAntenneAnt & GWDevice
Application
Self-service
web interface
MQTT
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
Device Antenna Gateway Network server ApplicationMQTT
DingNet – The big picture
Device
Measurements
CommunicationData
Processing
Action
Device Antenna Gateway Network server ApplicationMQTTDevice Antenna Gateway Network server ApplicationMQTT
DingNet – Devices
• Typically devices consist of
o Sensor hardware
o (Small) microcontroller with software/firmware
• Performs measurement
• Prepare radio message
o LoRaWAN radio module + antenna
• Communication is only a (small) part of an entire device
• Devices sometimes only add communication to an existing ‘dumb’ device
o Power meters, water meters…
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Do-It-Yourself devices
• Arduino style
o Small embedded system
• No operating system
• Program runs directly on hardware
o Not much hardware design knowledge needed
• Mainly modules that need to be properly connected
o Requires (a bit) of programming
• C(++), Python, Lua…
o Ultra low power design possible
• Years on battery power
• If sensor is also low power enabled
o Many examples and tutorials available online
Arduino style Raspberry style Commercial Sensors
DingNet – Do-It-Yourself devices
• Raspberry Pi style
o Complete micro size computer
• Runs a fully fledged operating system
o No hardware knowledge needed
• Just modules that need to be properly connected
o Requires programming/configuration
• Almost any language possible
o Computer module consumes moderate power
• Couple of days on battery power
o Many examples and tutorials available online
Arduino style Raspberry style Commercial Sensors
DingNet – Commercial and industrial devices
• Ready-to-use style
o Emerging market
• Growing choice of vendors
• Price decreases due to mass production
o No hardware knowledge needed
o No programming knowledge needed
o Ultra low power design possible
o More expensive than DIY
o Easy device configuration
• Serial interface
• Bluetooth (with mobile phone app)
Arduino style Raspberry style Commercial Sensors
DingNet – Device sensor types
• If you can think of it, it probably exists…
• Not all sensors are suited for battery powered devices
o Requires too much power to perform measurements
o Physical limitation of the measurement method
• Small air particles
• CO2 gas sensor• …
• Not all sensors are cheap
o Also depends on required accuracy
Arduino style Raspberry style Commercial Sensors
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
DingNet – The big picture
Device
Measurements
CommunicationData
Processing
Action
Device Antenna Gateway Network server ApplicationMQTTDevice Antenna Gateway Network server ApplicationMQTT
DingNet – Application components
• Typical application flow consists of
o Getting the raw data via DingNet
• MQTT
o Conditioning of raw measurements
• Validating measurements
• Conversion to appropriate units
o Storage of processed measurements
o Visualization
o Actions and alerting
o Exporting data in usable format
Device Antenna Gateway Network server ApplicationMQTT
DingNet – Application approaches
• Too much possibilities to simply list in a few slides
• Some examples
o Build from scratch
o Use existing building blocks and write glue logic
o Flow based applications
o Existing frameworks for IoT applications
o Complete solution outsourcing
• Best approach depends on
o Detailed requirements and objectives
o Available knowledge and time
DingNet – Application from scratch
• Pros
o Full control over every aspect
• Anything can be done
o (Almost) every programming language has easy-to-use MQTT libraries
• Cons
o Time consuming
• Reinventing the wheel
o Requires programming skills
o Sometimes not easy to apply changes
• Requires development environment, recompilation, restarting program…
→ Usable for small/simple applications
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet – Application using existing building blocks
• Take off-the-shelf components and glue them together by programming
• Pros
o Good control over many aspects
• Almost anything can be done
o Many existing building blocks exist
• Charts, actions, data export…
o Less time consuming
• Cons
o Requires programming skills
o Sometimes not easy to apply changes
• Requires development environment, recompilation, restarting program…
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet – Flow-based applications
• An application is a network of small and simple ‘black-box’ nodes
• Data exchange by passing messages over predefined ‘connections’
• Example: Node-RED
o Open-source web-based flow programming
o Also available as cloud based service (FRED)
o Includes simple dashboard and visualization
• Nodes
o One simple task
o One or more input connectors
o One or more output connectors
o Do not know about each other
• Connections
o Connect outputs with inputs
o Passes messages unchanged
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet –Node-RED example
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet –Node-RED example
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet – Flow-based applications
• Pros
o Good control over many aspects
o Focus on data flow instead
• Programming (if any) is data oriented
o Drag & drop
o Easy to apply changes
• 1 click to deploy
• Cons
o Not the most compact or best performance solution
→ Very good for rapid prototyping and small scale setups
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet – Existing IoT platforms
• Lots and lots of choices
o Data collection, processing, visualization, device management…
• Commercial
o Amazon, Microsoft, IBM, Google, SAP…
o Often free or cheap for education or hobby usage
• Open source
o Freeboard, Thingsboard, Kaa…
o Allows for local on premise installation
Scratch Blocks & glue Flow-based Existing framework Outsourcing
DingNet – Complete solution outsourcing
• Outsource devices and application
• Pros
o No worries (hopefully)
o Saves labor and time
o Professional support
• Cons
o Relative expensive
o Be aware of vendor lock-in
→ Easy large scale and industrial rollouts
Scratch Blocks & glue Flow-based Existing framework Outsourcing
Overview
• IoT concept & Communication characteristics
• Low Power Wide Area Networks
• DingNet
o Infrastructure
o Other interesting facts
• User devices
• User applications
• Summary
DingNet – Summary
• Experimental environment for IoT applications and research
o Free-to-use wireless LoRaWAN communication infrastructure
• Researchers, personnel and students
o Focus on Leuven and Heverlee
• Expandable coverage if needed (Brugge, Kortrijk…)
o Users provide the devices and applications
• Ideal for wide area, low bandwidth communication
o Typically few hundreds of short messages/day
• Lots of documentation, examples and tutorials online
• Something for everyone
o Devices
o Applications
DingNet – Workshops
• What is DingNet
• How can I use DingNet
• More technical information
o Security keys and identifiers, MQTT and JSON message formats
• Hands-on
o Register a device and application
o Configure a device
o Build a simple NodeRED application
More information
https://www.kuleuven.be/dingnet/en
DingNet – support @ ICTS
• Check if DingNet is the right technology for a specific project
• Advice regarding proper choice of devices and applications
• If you want to use DingNet on locations not covered at this moment
• …
More information
https://www.kuleuven.be/dingnet/en
All questions and remarks are welcome
Demo – Overview hardware
• Arduino style
o TTNode
o LoPy
o Sodaq One
• Commercial solution
o VersaSense
• Infrastructure hardware
o LoRank8 gateway
Demo – TTNode
• Arduino based
o Commercial production but DIY firmware
o Waterproof
o 3 AAA batteries
• Sensors & indicators
o Push button
o Light sensor
o Movement sensor
o Temperature sensor
o RGB LED
• Price range around 65 euro (incl.)
Demo – Pycom LoPy
• Arduino based (ESP32)
o C(++), Micro python
o LoRaWAN, Wifi, Bluetooth
• Expansion boards
o Solar & Battery power
o Sensor devices
o GPS device & motion sensor
• Price range
o Basic unit approx. 36 euros (incl.)
o Expansion boards 18 euros to 50 euros (incl.)
Demo – SODAQ One
• Arduino M0 based (SAMD21)
o C(++)
• Sensors & indicators
o GPS, Accelerometer, RGB Led
• Expansion boards
o Bluetooth LE
o Base board (Grove style sensors)
• Easy to use sensors
• Price range
o Basic unit approx. 80 euros (incl.)
o Expansion boards 10 euros to 20 euros (incl.)
Demo – VersaSense
• Commercial solution
o Device
o Application
• Exports to major IoT platforms
• Grafana graph & alerting
• Sensors & actuators
o Plug & play all the way
o >35 different modules (In/Out)
• Price range
o Base unit approx. 250 euros (excl.)
o Sensors starting from 50 euros (excl.)
Demo – LoRank8 Gateway
• Commercial gateway
o Indoor use
• Outdoor with appropriate case and antenna
• Requires
o 5V Power
• Wall adapter or PoE (Power over ethernet)
o Cabled network connection (TCP/IP)
• 4G or Wifi connectivity is an option
• Price range indoor model around 375 euro (incl.)