cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 VCP by USBC cable to Android App

Paul1
Lead

So we have our STM32 making nice serial diagnostics over a USB VCP port with a UCBC connector (only pins D+/D-/Gnd),

and then I looked at my Android phone and its USBC connector... so much easier to carry in the field...

I tried the Playstore Serial/UART/VCP apps but none would connect.

Anyone know an Android App that might connect to an STM32 VCP port by USB? (USB2.X)

Paul

6 REPLIES 6
Peter BENSCH
ST Employee

Yes, just successfully tested Serial USB Terminal from Kai Morich.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Paul1
Lead

Hi Peter,

I'm not so lucky:

- my Android USB preferences is showing as all grey when I connect phone to my STM32 board. The board works fine with a Win10 PC.

  • The Serial USB terminal is saying "No serial device connected" when I click the connect icon

Possibly:

  • I don't have correct signals (I only have D+, D-, Gnd)
  • My board isn't responding properly to Android (Using Default STM32Cube VCP, which can cause some problems in some windows terminal programs as doesn't echo back baudrate or other settings unless modified, Teraterm works fine).
  • other?

Any suggestions?

Paul

Peter BENSCH
ST Employee

My setup for testing:

  • Samsung Galaxy with USB C
  • OTG adapter USB C to USB A
  • Mini USB cable to NUCLEO-F401
  • a simple program with VCP, 115200,8,n,1 and one printf("something\r\n"); in the while loop

App setup:

  • Settings > Serial > Baud rate = 115200
  • USB Devices > Reload (small circle top right), alternatively reconnect the cable --> Custom device - CDC, Vendor ID: 0483 Name STMicroelectronics, Product ID:374B Name: STM32 STLink
  • A tap on this line USB Devices requests the permission to access STM32 STLink
  • OK --> timestamps and printf output immediately visible on the screen

Did you already find the website USB Troubleshooting by the author of this tool?

He also offers a reduced open source version of the Terminal, which has yet to be compiled (currently no APK there).

Good luck!

/Peter

[edit]

I have now tested it again with a second Android phone: when selecting USB Devices for the first time, the app probably asks for the driver. CDC should then be selected for VCP.

[/edit]

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Paul1
Lead

If I understand correctly your printf is outputting on a UART that goes to the obboard STLink and then to the PC over the USB? i.e. the STLink is providing the VCP?

I'll order cables to try that.

Do you have a part number for the OTG Adapter?

The troubleshooting for the Android App looks good but not enough for me to get it working.

I'm actually hoping to have a VCP directly from the STM32's USB pins (D+, D-, Gnd, 56K pulldowns on CC1/CC2). It works on a PC, but not on Android "yet". Maybe it needs to respond with specific Com settings or USB ID info to the Android to be recognized.

I'll try another day.

Paul

Paul1
Lead

Note: Nothing showing up on my Android under devices. I'll get hold of a different Android phone and try again.

FYI: We had the wrong pulldowns on the USB-C connector, need 5K1 (not 56K).

Android connects fine to VCP on STM32 DP/DN pins.