https://github.com/Patric/bollard-service-app/
Arduino library supporting this application with doxygen documentation: https://github.com/Patric/bollard-service-app/tree/master/arduino/BollardController
This repository cointains code of BEng graduate project of Ionic application for secure communication with an Internet of Things (IoT) device. As an example a service application for IoT device has been chosen. Communication is established via Bluetooth 4.2 protocol between Arduino Nano 33 IoT and Ionic (Angular + TypeScript) using a PWA/Native facade and adapters that has been written exclusively for this problem. Connection is secured with challenge-response authentication between offline Arduino (only bluetooth), user application (bridge) and Backend which authorizes every operation on the device (mock backend for now). For messages integrity and MITM attacks avoidance HMAC-SHA256 algorithm has been used.
Web development frameworks and languages: Angular 9, Ionic 5, Typescript and a few plugins and packages.
Arduino: C++, sha256, arduino_json, ArduinoBLE
Development perspectives: Node.js + Express.js/Loopback backend with deploy to AWS Cloud.
npm:
-
+-- @angular/cli@10.0.1
-
+-- cordova@9.0.0
-
+-- cordova-res@0.15.2
-
+-- ionic@5.4.16
-
`-- native-run@1.2.2
-
+packages from package.json
cordova
- cordova-plugin-bluetoothle 6.1.0 "Bluetooth LE"
- cordova-plugin-device 2.0.2 "Device"
- cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
- cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
- cordova-plugin-splashscreen 5.0.2 "Splashscreen"
- cordova-plugin-statusbar 2.4.2 "StatusBar"
- cordova-plugin-whitelist 1.3.3 "Whitelist"
After downloading all npm, angular and ionic packages and addons use:
to run application on Android browser (shared wi-fi network for PC and smartphone may be needed) or Windows browser:
ionic cap run android --livereload --external --ssl
to run application on native device use (shared wi-fi network for PC and smartphone may be needed). Android Studio will be required.
ionic cap run android --livereload --external
Test data: username: user_1 password: test
(Application GUI on the right side, Arduino Serial Port on the bottom, Application console on the left. Authentication steps are visible in application console)
Mobile PWA
Logging in:
Connecting to a device:
Sending custom messages
Sending predefined orders
Android native
PC PWA
FULL VIDEO