Question: How do you test a Cypress® USB -Serial Bridge Controller configured as USB-UART with the Android™ OS?
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:
- Open the Config menu of your kernel source.
- 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
- Rebuild the kernel and reboot the Android device.
- 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:
- Download BusyBox from http://www.busybox.net/downloads/binaries/latest/. For an ARM®-based platform, select busybox- ARMv6l.
- Copy the binary to “/system/bin” of “rootfs”.
- Boot Android and get root access for the command shell.
- Run the following command in the terminal:
cd /system/bin and run ./busybox-armv6l microcom -s 115200 /dev/ttyACM0
- 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.