Touch Interface and Remote Monitoring with Digi
Image Source:
Artem Merzlenko/Stock.adobe.com
In our expanding connected world, access to hardware information for systems such as those in industrial or
automotive application, can be especially useful. Interfacing with equipment locally or remotely, wirelessly
update software and systems anytime and anywhere, monitoring status to avoid down-time, each has the potential
to provide notable cost benefits.
In this article we will walk you through utilizing DIGI’s ConnectCore 8X SBC (Single Board Computer) Pro
Development Kit and LCD Application Kit to develop a simple control interface as well as connect and monitor
your device with DIGI’s Remote Manager. From here you will have access to several additional Android
examples as well as a starting off point to develop your own application using the Androids API (Application
Programming Interface) to access the ConnectCore development Kits different buses and built-in sensors.
Project Materials and Resources
The hardware kits outlined in this project will contain most of the additional items you might need.
Project Bill of Materials (BOM)
You can access items needed by clicking on this BOM link which will
take you to an easy to access list of parts that can easily be added to your cart for a quick checkout.
The individual hardware items needed are:
Software
The operating system we will be using for the PC interfacing with the ConnectCore 8X Pro Development Kit will be
Ubuntu 20.04 LTS (Long-Term Support). Several of the required software listed can be found in Ubuntu’s
software application page.
The required software is as follows:
- Android Studio
- Terminal Emulation (minicom – Ubuntu)
- NXP UUU software (Universal Update Utility)
Additional and Optional Items
It is possible to use Windows as the interfacing operating system though this will require an additional item as
well as the use of a different terminal emulation software and downloading other software, such as Android
Studio, directly.
The following option item will be required if using Windows:
- microSD card (8GB minimum)
Project Hardware Overview
This project should be considered an intermediate to advanced geared towards engineers and DIYers who have
programming skills and a level of comfort developing apps for Android based devices utilizing Android Studios.
DIGI ConnectCore 8X SBC Pro Development Kit - 888-CC-WMX8-KIT
The cornerstone of this project is DIGI’s ConnectCore 8X SBC Pro Development Kit (Figure
1). This Single Board Computer (SBC) is powered by an i.MX 8X Dual/Quad Arm Cortex-A34 and single
Cortex M4F cores, 2GB of LPDDR4 memory, as well as 8GB of eMMC memory. Combined with support for both Android
and Linux, on-board wireless and cellular options for connectivity, and an array of expansion options, this
development kit can help significantly reduce time-to-market.
Figure 1: DIGI ConnectCore 8X SBC Pro Development Kit (Source: Mouser
Electronics)
DIGI ConnectCore 8M Mini Development Kit - 888-CC-WMX8MM-KIT
As an alternative to the ConnectCore 8X SBC Pro Development kit, DIGI’s
ConnectCore 8M Mini could be substituted. Based on the NXP® i.MX 8M Mini applications processor, the
mini dev kit provides power management, wireless connectivity and DIGI’s TrustFence® device security.
The ConnectCore 8M Mini offers display interfaces, camera, audio, and other hardware options for a flexible user
experience.
DIGI ConnectCore® 6 LCD Application Kit - 888-CC-ACC-LCDW-10
This application kit includes a 10” Wide Extended Graphics Array (WXGA) Liquid Crystal Display (LCD) with
Projected Capacitive (PCAP) touch interface (Figure 2). The Display resolution is 1280 x 800
and will connect directly with the DIGI’s ConnectCore 8X SBC Pro Development Kit.
Figure 2: DIGI ConnectCore® 6 LCD Application Kit (Source: Mouser
Electronics)
Hardware Setup
The hardware setup for this is straightforward with most of what you need included in the development kit.
Depending on which OS (Operating Systems) you end up using you may require additional pieces.
- Connect the LVDS LCD Display CC-ACC-LCDW-10 into the LVDS0 Parallel connector
- Connect the USB-C Cable to the USB (Universal Serial Bus) 3.0 board connector and the development PC (Not
included)
- Plug the included USB Serial cable to the Console connector (CONS) on the board and the development PC.
- Ensure the two boot switches are placed in the off position (Towards the ConnectCore device)
Project Software Overview
Required Software and Setup
The required software for this demonstration can easily be downloaded and installed by utilizing Ubuntu’s
software application installer and updater instead of having to navigate to several websites to locate and
download software.
Figure 3: Ubuntu Software Application Page (Source: Mouser Electronics)
- Install the Universal Update Utility (UUU) from Ubuntu Software application page by searching for the
utility(Figure 3)
- Install Android Studio from Ubuntu Software Application page
- Install terminal emulation software, in this case we will be utilizing minicom, by typing the following
command into a terminal window(Figure 4)
$ sudo apt-get install minicom
Figure 4: Ubuntu Terminal Window for Inputting Commands (Source: Mouser
Electronics)
- Open a terminal window and run the following commands to allow the UUU software to access the USB Port
$ sudo sh -c "uuu -udev >> /etc/udev/rules.d/99-uuu.rules"
$ sudo udevadm control --reload-rules
Firmware Installation
With the option for Embedded Yocto and Android available, we will be demonstrating how to install a modified
version of Embedded Android version 11.
Figure 5: DIGI Embedded Android Installation Page (Source: Mouser
Electronics)
- Extract the file into any directory
- Ensure your USB-C cable is connected between your target board and the development PC
- Set the boot mode micro-switches into the “On” position by making sure both are set away from
the ConnectCore device
- Open a Terminal Window and start a minicom session using the correct serial port for your development
environment (/dev/ttyUSBx in Linux, COMx in Windows) 115200/8/N/1
- Open a second terminal window(Figure 6)
Figure 6: Minicom session and Terminal Window (Source: Mouser
Electronics)
- Plug in the power to the development kit
- Type in the following command to begin programming
$ ./install_android_fw_uuu.sh first-deploy -u u-boot-ccimx8xsbcpro2GB-<variant>.imx
- Make sure to change the “variant” in the code line above to match the board version, in our case
we are using the C0 version.
- Once the firmware has successfully been installed (Figure 7), change the boot mode
micro-switches back to the “Off” position by ensuring they are both set in the direction of the
ConnectCore device.
Figure 7: Android Firmware Installation (Source: Mouser Electronics)
- Press the reset button to begin booting to the new Android Image
- If everything has been completed successfully, you should see something like what is shown on the screen
output on your LCD (Figure 8).
Figure 8: LCD Display Output After Firmware Installation (Source: Mouser
Electronics)
Digi Remote Manager
DIGI’s Remote Manager provides a host of features allowing you to configure, deploy, and remotely manage
assets. This section will walk you through registration as well as how to monitor your device.
Registration
- Locate the MAC Address of your ConnectCore 8x on the front white label of the device.
- Login to your Digi Remote Manager account at https://remotemanager.digi.com/
- Select Device on the left-hand side of the screen and click Add to bring up the Add Device dialog
box(Figure 9)
Figure 9: Adding a Device to Digi Remote Manager (Source: Mouser
Electronics)
- Write the MAC Address of your ConnectCore 8X, this will cause a new entry for your device to appear in the
device inventory.
- Under your Username in the Digi Remote Manager, select Open Classic Remote Manager(Figure
10)
Figure 10: Accessing the Classic Remote Manager (Source: Mouser
Electronics)
- Select the Admin tab from the top navigation menu
- If you already have a Vendor ID copy this down to use later, otherwise you will need to select Register for
new vendor ID.
- Ensure your Wi-Fi or cellular network is connected within the Android settings.
- On the ConnectCore 8X open the Android Settings and go to Settings
- Open the System menu and select the Remote Manager(Figure 11)
Figure 11: Android Settings on ConnectCore Device (Source: Mouser
Electronics)
- Click the Vendor ID and enter the ID you identified from the Classic Remote Manger
- Enable the Remote Manager connection and check the Digi Remote Manager (you may need to refresh the screen)
to see that the device is now connected. (Figure 12)
Figure 12: ConnectCore Device Connecting to Digi Remote Manager (Source:
Mouser
Electronics)
Monitoring
- From the remote manager settings screen in Android on the ConnectCore enable the Auto Connect and System
Monitor
- Open your Digi Remote Manager and select Data Streams from the left side of the screen
- Select any of the data streams you wish to analyze such as CPU Temp, Load, or Free Memory(Figure
13)
Figure 13: Monitored Sensor Data in Digi Remote Manager from the ConnectCore
Device (Source: Mouser Electronics)
The connection to Digi Remote Manager will not only allow you to monitor devices, but also push firmware updates,
install, update applications, and provide access to the file system to upload, download, or remove files. Along
with these features, you can also configure alerts to notify you of preset conditions as well as automate
operations across one or more connected devices.
Android Studio
To interface with your device, you will of course need an application that will allow you access to the features
and buses for the devices and sensors you wish to control and monitor. Android Studio helps you quickly build
and test your application across different Android versions and devices.
- Open the Android Studio Application and select Plugins from the left hand side of the IDE
- Select Marketplace at the top of the IDE and type DIGI in the search box to locate the DIGI Extensions.
- Install the Digi Extensions if not already installed.(Figure 14)
Figure 14: Digi Extension for Android Studio (Source: Mouser
Electronics)
- Click Customize on the left of the IDE and select All Settings at the bottom.
- Under Appearance & Behavior > Systems Settings > Android SDK (Software Development Kit) select SDK
Update Sites
- Click the “+” on the upper left of the window and add the following URL(Figure
15)
- http://ftp1.digi.com/support/android/sdk_addon/11.0/addon.xml
- Click Ok and go back to the SDK Platforms to Apply.
Figure 15: Digi Extension Update Site (Source: Mouser Electronics)
- Click the “Show Package Details” in the bottom right of the screen and locate the Android 11.0
(R)
- Ensure the following are selected(Figure 16)
- Digi SDK Add-On for Embedded
- Android SDK Platform 30
- Sources for Android 30
Figure 16: Android SDK Platform Selection (Source: Mouser Electronics)
- Click Ok and accept the License Agreement and click install(Figure 17)
- Once complete, click Finish and close the SDK Manger and restart Android Studio.
Figure 17: Android SDK License Agreement (Source: Mouser Electronics)
Running Demos
DIGI provides a wide array of sample Android applications that can be executed to test distinctive features
available to the development board. Applications that provide access to the CAN (Controlled Area Network) bus,
GPIO’s, I2C, and more. For this demo we will be showing the Getting Started Sample Application
- Open the Android Studio application
- Under “More Actions” select the “Import a Digi Android code sample”
- Scroll through the list of applications and locate the “Getting Started Sample
Application”(Figure 18)
Figure 18: Digi Android Application Examples (Source: Mouser
Electronics)
- Click “Next” then “Finish” - NOTE! You may receive a warning
indicating that the Gradle Plugin can be upgraded, it is not recommended as it might affect the sample
applications.
- Once loaded, select “Run” from the toolbar menu and click “Run
‘app’”(Figure 19)
Figure 19: Running the Getting Started Example Application (Source: Mouser
Electronics)
Once the app builds and programs the development board, you should see the app load on the LCD screen. From here
you can blink the LED (light emitting diodes) indicated as well as control the interval (Figure
20). Following these instructions, you can go back and try any of the other samples, or simply use
Android studio to create your own. Paired with the Digi Remote Manager, monitoring and managing multiple
interfaces can be simplified and efficient.
Figure 20: Getting Started Application Running on DIGI ConnectCore Device
(Source: Mouser Electronics)
With all the available pre-built applications provided, this is only one small fraction of what is possible
utilizing the DIGI ConnectCore 8X Pro Development Kit. With complete support for both Linux and Android this kit
delivers a powerful, secure, and cost-effective platform to jump start your design. Hopefully, this project will
provide you with a glimpse of what is possible with DIGI.