STM32 connection to an Android device over USB CDC

1,920 views
Skip to first unread message

Michel Catrouillet

unread,
Sep 29, 2017, 2:48:44 AM9/29/17
to stm32
Hi,

In order to demonstrate a remote basic GPIO management, I have built this package:

For the USB CDC management inside Android, I have used usb-serial open source library, and added STM32 missing driver.
usb-serial is available here:

This demonstration integrates:

  • a User Interface embedded in an Android application
  • a basic communication protocol over USB CDC class
  • a basic Cortex M4 GPIO management Firmware running on Nucleo-F302R8, communicating with User Interface through STLINK.
  • a basic Cortex M4 GPIO management Firmware running on Nucleo-F429ZI, communicating with User Interface through built-in USB.

This demonstration provides source files of:

  • Android application,
  • the Nucleo-F302R8 firmware,
  • the Nucleo-F429ZI firmware.
Enjoy.

Chris Miller

unread,
Oct 24, 2018, 9:35:57 PM10/24/18
to stm32
Hey folks,

If anyone is using Xamarin Android and would like to use the STM32 CDC driver that was written for the https://github.com/mik3y/usb-serial-for-android library, it has been ported to C# and added to the Xamarin Android compatible version of the library, available here: https://github.com/anotherlab/UsbSerialForAndroid.

We don't have any STM Nucleo devices to test the code on, but it's a line by line port from Java to C# and it should work identically to the driver when used with mik3y's library.
Reply all
Reply to author
Forward
0 new messages