UDS Client for Android Cluster-Remote diagnostics & FOTA Update

CASE STUDY SNAPSHOT

Customer : OEM Manufacturer of high performance electric two wheelers
Size : 200-1000
Project vertical : Automotive, Cybersecurity
Challenge : To collect diagnostic information remotely from ECUs and enable firmware over the air update in a reliable way on an Android Cluster
Solution : Leverage RAPIDSEA UDS protocol stack library over JNI and support Android App based update
Services Availed :  Embedded Software Development, RAPIDSEA UDS Stack, Application Development
Tools and Technologies :
  • MPU/MCU: Qualcomm SC200 with Renesas RL78
  • Framework: Android AOSP, RAPIDSEA
  • Programming Language:  C, Java, JNI
  • Compiler: GCC, NDK
  • Tools: Android Studio, Renesas CS+

INTRODUCTION

Embien is a leading provider of embedded design and consulting services to numerous Tier 1s and OEMs. We have been helping them realize complete ECU solutions and cluster designs as well as implement specialized features in existing designs. One of our OEM customers wanted to add remote diagnostics feature and perform firmware update of on-vehicle ECUs on an Android Cluster that we helped earlier to develop. We helped realize the requisite features with our proven RAPIDSEA UDS client stack and expertise in performing remote updates.

CHALLENGE

The system design involves a dual processor architecture where the cluster and cloud interface are handled by an Android powered Qualcomm SC200 SoC and the vehicle communication is taken care of by Renesas RL78 MCU. Since the interface is over SPI and the vehicle data processing intelligence is handled by the Android, the entire UDS client stack is to be run on the Android which is challenging considering the internal architecture.

SOLUTION

Let us see how we enabled UDS Client for Android Cluster along with Remote diagnostics and ECU FOTA Update.

Embien's has rich experience in working with numerous Android based systems on various application domains like industrial, automotive where complete customization is done from the HAL level to the high-level applications. Our architects planned the entire flow for the Qualcomm SC200 powered Android cluster and came across the solution as depicted below.




UDS Client for Android Cluster - Architecture

To perform diagnostic operations on the on-vehicle ECUs and do firmware updates as supported by them, Unified Diagnostic Services (UDS) protocol has to be supported. Embien already has its RAPIDSEA UDS stack in its kitty that was well proven and adopted by many customers. It was decided to leverage the UDS client functionality of the same in this design.

Since the UDS stack is written in ANSI C with Misra-C compliance, integrating it directly with the Android based Cluster App written in Java is not possible. To integrate the same, our team created a JNI library on top of the UDS stack exposing only the functionality needed to implement the diagnostic features. APIs were provided to query the Diagnostics Trouble Codes (DTC’s) and clear them. Functions to read and write Data IDs (DIDs) are provided along with other necessary services like Diagnostic Session, ECU reset, Security Access etc. Since some custom sequences have to be executed remotely, Routine Control service feature was also provided. These calls were initiated from the Android app layer from Java and collected information was stored and transferred to the central server.

Apart from the remote diagnostic feature, the ECUs on the vehicle had to be updated. The Android app requests the server for the latest firmware. If available, it is downloaded over a secure channel and its authenticity validated using asymmetric cryptographic algorithms. Once the validated firmware is available, it is transferred to the C library over JNI, and update initiated on the target ECU. By leveraging UDS services like Request Upload, Request Download, Transfer Data and Request Transfer Exit the firmware is uploaded to the ECU and restart initiated. Up on successful update, acknowledgment is sent to the Android App which is in turn shared to the server.

The entire stack was packaged inside the Cluster App APK so that any updates of the stack can be rolled out via simple Android application update itself.

BENEFITS

With our proven RAPIDSEA UDS stack and Android expertise, Embien quickly developed the UDS Client for Android Cluster along with Remote diagnostics and ECU FOTA Update. Some of the points that stand out are.

  • Seamless integration with Android App based Cluster
  • Shorter development time with our proven RAPIDSEA Unified Diagnostic Services stack
  • End-to-end secure FOTA protected by state-of-the-art TLS 1.3 communication and asymmetric cryptography
  • Safe and effective remote diagnostic interface leveraging the strong Android Security capabilities
  • Update multiple ECUs over the same channel with unified FOTA approach
  • Race-condition protected design providing simultaneous access to UDS services for multiple Java threads

And these changes were rolled out smoothly in the field over the Android FOTA mechanism already developed by Embien earlier for the customer.

CONCLUSION

With Embien's expert team's support for UDS client for Android, our customer could incorporate the modern needs of the EV market seamlessly over their Qualcomm SC200 based cluster with Renesas RL78. Our UDS stack and Android platform capabilities helped them understand the internals of the vehicle and roll-out feature updates on the ECUs as and when they are available remotely in a safe and secure manner. Check out our other case studies to understand the positive impact of our services and solutions for our customer and end user community.

Interesting to read about our work on UDS client for Android?
Get in touch with us to enable ECU FOTA Update and remote diagnostics