Return to search

Enabling Smartphones to act as IoT Edge Devices via the Browser-based ’WebUSB API’ : The future of the browser and the smartphone in home electronics IoT systems / Användningen av Smartphones som IoT Edge Devices med hjälp av det Browserbaserade WebUSB gränssnittet : Framtiden för webbläsaren och smartphonen i hemelektronik IoT system

This degree project proposes a novel architecture for IoT systems, utilizing smartphones as edge devices and running the value-creating software such as preprocessing, anomaly detection, and deriving data-based insights in the web browser as opposed to natively on the device. Utilizing the smartphone as an edge device reduces cost of adoption for IoT technologies since less hardware has to be included in the system compared to bundling a device for processing with the system. However, in typical implementations, these smartphones are running native applications that are necessarily bound by the policy set up by the owners of the major application marketplaces through which the applications are distributed, that among other things enforce a heavy revenue-sharing program. Furthermore, this sytem is not convenient for the user since they have to download an application they may only use once or sparingly, and it relies on the compatibility between the operating system and the application. Running the application in the browser as opposed to natively would solve these issues. This work also explores the experimental WebUSB API and investigates its applicability in IoT systems. Specifically, this work explores two constructed scenarios that showcase the promise of this novel architecture to extrapolate how it can be utilized for other purposes. These two constructed scenarios are successfully implemented, and various metrics to analyse their performance and real world applicability are discussed. In one experiment, a QR-scanning application is implemented in the browser, and showcases an average frame rate of over 60 frames per second while rendering a live video feed of the contents captured by the camera as well as a loading animation, and an average time to completion for scanning a QR code of 0,204 seconds after initiating the scan. In another experiment, a firmware update is simulated by transferring encrypted data from the browser via the WebUSB API to a microcontroller. Due to the limitations of the experimental setup, the implementation could showcase a transfer of no more than 29 KB of encrypted data in 10 seconds. However, the implementation successfully shows that the browser can remain interactive even while performing these transferring operations, and that there are good APIs in place for developers to easily access the advanced sensors of the phone, and that the WebUSB API has good safety measures in place. Furthermore, the work successfully demonstrates how the WebUSB API can be utilized in IoT systems as a novel way of transferring data that holds great implications for the future of IoT systems in general, and the web in particular. To conclude, the work finds that the modern web browser works well as an environment for IoT applications, and that it has good access to the advanced sensors of the smartphone, and that theWebUSB API can effectively be utilised for data transfer in IoT applications. / Detta examensarbete föreslår en ny arkitektur för IoT-system som använder smarta telefoner som edge-enheter som behandlar den data de tar emot i webbläsaren, snarare än nativt på enheten. Att använda smarta telefoner som en edge-enheter minskar kostnaden för användning av IoT-teknologier eftersom mindre hårdvara behöver ingå i systemet, eftersom viss funktionalitet istället kan substitueras av den smarta telefonen. I typiska implementationer kör dessa smarta telefoner nativa applikationer som nödvändigtvis är bundna av de regelverk som fastställts av ägarna av de stora applikationsmarknaderna genom vilka applikationerna distribueras, vilket bland annat påtvingar applikationsägarna att ge bort stora delar av sina intäkter. Dessutom är detta system inte bekvämt för användaren eftersom de måste ladda ner en applikation de bara kommer använda ett fåtal gånger, och som dessutom är beroende av kompatibiliteten med operativsystemet. Att istället köra en motsvarande applikation i webbläsaren löser dessa problem. Detta arbete utforskar också det experimentella WebUSB API:t och undersöker dess användbarhet i IoT-system. Specifikt utforskar detta arbete två konstruerade scenarier som visar potentialen i denna nya arkitektur för att extrapolera hur den kan användas för andra ändamål. Dessa två konstruerade scenarier implementeras framgångsrikt och olika mått för att analysera deras prestanda och verkliga tillämpbarhet diskuteras. I ett experiment implementeras en QR- skanningsapplikation i webbläsaren och uppnår en genomsnittlig bildfrekvens på över 60 bildrutor per sekund samtidigt som en live videoström av innehållet som fångas av kameran och en laddningsanimation visas på skärmen. Vidare uppnådde applikationen en genomsnittlig tid för tolkning av QR-koder på 0,204 sekunder, från och med det att skanningen inleddes. I ett annat experiment simuleras en programvaruuppdatering genom att överföra krypterad data från webbläsaren via WebUSB API:t till en enkretsdator. På grund av begränsningarna i experimentet kunde implementationen inte visa en överföring högre än 29 KB krypterad data på 10 sekunder. Implementationen visar dock framgångsrikt att webbläsaren kan förbli interaktiv även när de utför dessa överföringsåtgärder, och att det finns bra API: er för utvecklare att enkelt få tillgång till telefonens avancerade sensorer och att WebUSB API:t har goda säkerhetsmekanismer på plats. Dessutom demonstrerar arbetet framgångsrikt hur WebUSB API:t kan användas i IoT-system som ett nytt sätt att överföra data som har stora implikationer för framtiden för IoT-system i allmänhet och på webbläsare och webbapplikationer synnerhet. Avslutningsvis konstaterar arbetet att den moderna webbläsaren fungerar bra som en miljö för IoT-system och att den har god tillgång till den smarta telefonens avancerade sensorer och att WebUSB API:t framgångsrikt kan användas för dataöverföring i IoT-system.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-303238
Date January 2021
CreatorsLindström, Ruben
PublisherKTH, Skolan för elektroteknik och datavetenskap (EECS)
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationTRITA-EECS-EX ; 2021:539

Page generated in 0.0029 seconds