FEATURE THE INTERNET OF THINGS
5 tips for fast debugging of deployed IoT Devices
Johan-Kraft, CEO of Percepio outlines five best practices to reduce development risk, find out about bugs before your customers do and get the detailed information your developers need for efficient, continuous software improvement across deployed IoT devices
Feedback on real-world IoT device performance enables improvement of key performance metrics and the overall user experience. Most developers want to know about
runtime errors and warnings, which could arise because of software bugs or even hardware glitches that result in unexpected return values from the driver code. Maybe you also want a proactive warning when the stack usage of a task is close to the limit. But there are much broader
T
he real test of IoT devices comes after shipping, when thousands of
end users start using your product, sometimes in unexpected and untested ways. No software is entirely bug free, so some users will run into those remaining bugs. The question is how many and what you do about it.
1. PREPARE TO DEAL WITH BUGS Even if your product has been tested thoroughly and no more issues are found, chances are many more bugs remain. According to academic research, between 50-100 bugs are introduced per thousand lines of shipped code and about 5% remain in deployment. While some bugs are harmless, about 20% are major defects. Assuming your project has 50,000 lines of code, then 25-50 major defects likely remain in the product shipped to customers. These bugs are often elusive issues
that only show up under certain circumstances. Otherwise, the bugs would not have been missed by the testing. Customer support might receive complaints and returns, but it is not always clear whether the cause is a software issue, a hardware issue or user error. Make sure your embedded software
provides appropriate diagnostic information in case of any runtime errors or warnings. This can be achieved
20 APRIL 2021 | ELECTRONICS
by logging diagnostic messages about the software behaviour to a circular buffer in RAM. When an issue is encountered in the code, the most recent diagnostic data can be copied to non- volatile memory, including specific information about the issue and the events that led to the problem.
2. PROVIDE AUTOMATIC ALERTS By receiving automatic alerts and diagnostics from the devices themselves with the Percepio DevAlert device monitoring solution, developers can begin analysing the problem within seconds of the very first occurrence. During system testing, developers can
be notified immediately about issues and get detailed diagnostics, without relying on the tester to provide the exact circumstances. This approach also works for system
testing of general embedded software without cloud connectivity. The alerts and diagnostic data can be uploaded to a local computer that forwards the data to a central monitoring service. Secure IoT connectivity enables
diagnostic alerts from the field. This provides real-world feedback from IoT devices and enables rapid, continuous improvement of the device software.
3. MONITOR KEY PERFORMANCE METRICS
Johan-Kraft, CEO of Percepio
applications for automatic alerts. A developer can define custom alert types that capture any condition your software can detect. Percepio DevAlert compares every alert
with earlier alerts from your entire device fleet and groups them into specific issues, shown on a dashboard. This provides a clear overview and avoids repeated notifications about the same issue. Any repetitions of previously detected issues are counted and shown in the dashboard, which allows for issue prioritisation.
4. USE VISUAL TRACE DIAGNOSTICS The diagnostic data may contain a detailed software trace, showing the exact sequence of software threads, API calls, state changes and interrupts. Analysis of such information is greatly facilitated by visual trace diagnostics. This provides both a visual timeline of the events and multiple visual overviews from different perspectives, so any anomalies stand out.
5. DEPLOY OVER-THE-AIR (OTA) UPDATES QUICKLY Software issues in deployment typically don’t affect all users at once, otherwise testing would have found them. With IoT device monitoring, you become aware of any remaining issue on the very first occurrence, before most of customers notice.
Percepio
https://percepio.com/
/ ELECTRONICS
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44 |
Page 45 |
Page 46