Testing a USB-Serial Bridge Controller Configured as USB-UART with Android™ – KBA92550

Version: **

 

Question: How do you test a Cypress® USB -Serial Bridge Controller configured as USB-UART with the Android™ OS?

 

Answer:

The Android kernel source is based on Linux®. To use the USB-Serial Bridge configured as USB-UART with Android, you must enable the Communication Device Class Abstract Control Model (CDC ACM) driver in the kernel (sometimes it might not be enabled by default).

Use the following procedure to enable the CDC ACM driver in the kernel:

  1.   Open the Config menu of your kernel source.
  2.   Go to Device Driver > USB Support > USB modem (CDC ACM) support. Select the module as shown in Figure 1.  

       Figure 1. Android Kernel Configuration Window Showing USB Support

     

       USB support

  3.   Rebuild the kernel and reboot the Android device.
  4.   Connect the Cypress USB-Serial Bridge Controller to the Android device. Verify that the ttyACM* node is created in the “/dev” directory of the Android device.  

       Note: * is a wildcard to represent the number of the device node. If a node exists, the CDC ACM driver is successfully bound to the USB Serial Bridge device.

By default, Android does not provide any application to emulate USB-Serial devices. For Hosts running the Microcom terminal emulation program on Android, you can use the following procedure to communicate with the USB-Serial Bridge Controller and stream data:

  1.   Download BusyBox from http://www.busybox.net/downloads/binaries/latest/. For an ARM®-based platform, select busybox- ARMv6l.
  2.   Copy the binary to “/system/bin” of “rootfs”.
  3.   Boot Android and get root access for the command shell.
  4.   Run the following command in the terminal:  

       cd /system/bin and run ./busybox-armv6l microcom -s 115200 /dev/ttyACM0

  5.   For simple loopback tests, short the RXD and TXD pins of the USB-Serial device on the board. Send a few characters using your keyboard. The entered characters will be displayed on the terminal.