WiFröst: Bridging the Information Gap for Debugging of Networked Embedded Systems Will McGrath , Jeremy Warner , Mitchell Karchemsky, Andrew Head, Daniel Drew, and Bjoern Hartmann
IoT Device Debugging Protocol error? � Wiring issue? � Peripheral not configured? � Program logic bug? � Defective part? � 2 �
IoT Device Debugging 3 �
IoT System Debugging 4 �
IoT System Debugging Server Down or Overloaded? � Poorly Bad Server Formatted API Address? � Request? � Bad Network Wrong or Invalid Configuration or API Key? � Intermittent Credentials? � Radio Interference? � Protocol error? Wiring issue? Peripheral not configured? Program logic bug? Defective part? � Out of Router Off or Range? � Overloaded? � 5 �
IoT System Security Using Deprecated API? � API Key / Password Sent in Plaintext � Insecure Protocol Usage? � Protocol error? Wiring issue? Peripheral not configured? Program logic bug? Defective part? � Abnormal Outdated Network Traffic? � firmware? � 6 �
Existing Approaches JTAG Logic Network debugger � analyzer � analyzer �
Each tool observes only a small slice of device state, and it is generally difficult to trace event causality across tool boundaries due to different representations different representations and a lack of time synchronization a lack of time synchronization � 8
Ubiquitous instrumentation, Ubiquitous instrumentation, visualization, and checking visualization, and checking � can help users more effectively debug and understand IoT systems across hardware, software, and device boundaries 9
Instrumentation Router and server Instrumentation Program and library instrumentation WiFröst 10 �
Our Approach Router Server Device (MITM proxy) Network analyzer � Logic analyzer � Capture PC DB WiFröst IDE 11 �
Introduction Related Projects Related Projects IDE Features Checks Walkthrough Implementation Future Work
Embedded Systems and Electronics Debugging • Visible Breadboard [ Ochiai, 2014] • CurrentViz [Wu et al., 2017] • Scanalog [Strasnick et al., 2017] Embedded System Resource Usage • NesC [ Gay et al., 2014] • Quanto [Fonseca et al., 2008]
Network and Distributed System Debugging • ndb [ Handigol et al., 2012] • Netsight [Handigol et al., 2014] • Whodunit [Chanda et al., 2007] • xtrace [Fonseca et al., 2007] • OFRewind [Wundsam et al., 2011] • Pinpoint [Chen et al. 2002] • Dapper [Sigelman et al. 2010] • Pip [Reynolds et al., 2006]
Integrated Debugging Tools Bifröst, 2017 Toastboard, 2016 WiFröst, 2018 15 �
Coverage WiFröst “Invalid parameter to web API call” � ”Component is backwards” Toastboard BiFröst “Reading from a pin set to output” 16 �
Introduction Related Projects IDE Features IDE Features � Checks Walkthrough Implementation Future Work
Trace WiFröst IDE Network User Code Event Connections Information User Code Check Application Function Results Health Bars Stack Console 18 �
WiFröst IDE Trace User Code Event User Code Information Function Stack Network Connections Console Check Results Application Health Bars 19 �
Trace 20 �
Trace 21 �
Trace 22 �
Trace 23 �
Visual Debugging VS ERROR OK (200) 24 �
Health Bars 25 �
Introduction Related Projects IDE Features Checks Checks � Walkthrough Implementation Future Work
Checks Wi-Fi chip connection broken √ Incorrect Wi-Fi SSID √ Incorrect Wi-Fi password √ √ Bad host name √ Weak connection to router √ Buggy web API usage Can't access Internet Incorrect authentication 27 �
Generic Checks 28 �
Custom Checks 29 �
Introduction Related Projects IDE Features Checks Walkthrough Walkthrough � Implementation Future Work
Walkthrough - Weather Wunderground 31 �
Walkthrough – Connecting to WiFi 32 �
Walkthrough – Connecting to WiFi 33 �
Walkthrough – Incorrect Domain Name 34 �
Walkthrough – Incorrect Domain Name 35 �
Walkthrough – Incorrect Domain Name 36 �
Walkthrough – API Key 37 �
Walkthrough – API Usage 38 �
Walkthrough – Correct Behavior 39 �
Introduction Related Projects IDE Features Checks Walkthrough Implementation Implementation � Future Work
WiFröst - Implementation Router Server Device (Mitmproxy) Logic Analyzer Capture PC DB WiFröst IDE 41 �
Compilation User Code WiFröst IDE 42 �
Network Instrumentation Router Server Device (Mitmproxy) Connection Begin Request Received Request Handled GET / HTTP/1.1 � (if instrumented) Content-Type: application/ json � Accept: */* � x-wftag: 0123 � Response Received HTTP/1.1 200 OK � HTTP/1.1 200 OK � Server: nginx � Server: nginx � Content-Type: application/ Content-Type: application/ Connection End json � json � Connection: close � Connection: close � Expires: Mon, 1 Aug 2011 Expires: Mon, 1 Aug 2011 09:00:00 GMT � 09:00:00 GMT � x-wftag: 0123 � 43 �
Time Domains Router Server Device (Mitmproxy) Ntp Logic Analyzer Capture PC μs resolution ms resolution DB WiFröst IDE 44 �
Time Scaling Actual Logical 45 �
Automatic code and network instrumentation, checking, and trace visualization can help users better understand and debug their networked embedded devices. 46
Introduction Related Projects IDE Features Checks Walkthrough Implementation Future Work Future Work �
Future Work Router and server Instrumentation Program and library instrumentation Microcontroller pin capture Instrumented Breadboard 48 �
Questions? 49 �
extra slides buried/reference �
Trace User Code Timeline Console Checks 51 � 51 �
WiFröst � 52 �
More related work… � • Bjoern said that he would like 2-3 slides of related work based on a desire for tying more projects together in a cohesive manner. � 53 �
Preliminary User Feedback Interfacing with the Phillips Hue API from Arduino using WiFröst Users made effective use of the visualization and automatic checks for guidance ”Auto-formatting logs is nice, it’s work done for me.” ”Helpful for not only debugging, but also learning” ”Takes away the headache of finding [information] manually” 54
Our Integrated Electronic Debugging Tools � Router and server Instrumentation Instrumentation Checking Program and library instrumentation Bifröst + Microcontroller pin capture Toastboard Instrumented Breadboard Wifröst 55 �
WiFröst: Exploration Trace User Code Event User Code Information Function Stack Network Connections Console Check Results Application Health Bars 56 �
Each tool observes only a small slice of a device's state and it's generally difficult to trace the causality of an event across tool boundaries due to different representations and lack of time synchronization � 57
Instrumentation Router and server Instrumentation Program and library instrumentation WiFröst 58 �
Recommend
More recommend