USB CDC Virtual COM Port Device

mwpau

New Member


Messages: 2

#1
Greetings all,

First up, i'm super new to FreeBSD, so please go easy on me.
(i'm rather familiar with Linux though)

I have a STM32 microcontroller based USB device that presents itself as a CDC VCP device.
I'm using ST's USB CDC device library.

On attaching the device i see in the kernel log:
Code:
ugen0.2: <STMicroelectronics STM32 Virtual ComPort> at usbus0
umodem0 on uhub1
umodem0: <STMicroelectronics STM32 Virtual ComPort, class 2/2, rev2.00/2.00, addr2> on usbus0
umodem0: data interface 1, has no CM over data, has no break
On trying to use the VCP at /dev/cuaU0, data flows as it should for a random amount of time, and then fails.
The device works perfectly with both Windows and Linux, so this does appear to be a FreeBSD driver issue.

Does anyone has any advice on how I should go about solving this issue?

Thanks in advance!
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,520
Messages: 27,956

#2
On trying to use the VCP at /dev/cuaU0, data flows as it should for a random amount of time, and then fails.
Fails how? Does it time-out? Or stop responding? Did you check things like flowcontrol (RTS/CTS, Xon/Xoff)?
 
OP
OP
M

mwpau

New Member


Messages: 2

#4
I've been testing in a VirtualBox VM... which now i think about it isn't the best idea.
I'll setup a PC and try again.
I'm pretty confident it'll still have issues, but at least i'll be able to rule out the VM.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,520
Messages: 27,956

#5
I've been testing in a VirtualBox VM... which now i think about it isn't the best idea.
I'll setup a PC and try again.
I'm pretty confident it'll still have issues, but at least i'll be able to rule out the VM.
Yeah, I'm not that confident about USB pass-through. Definitely try this on "real" hardware.
 

nerozero

Member

Thanks: 1
Messages: 71

#6
Hello ... so ... this error does take place on live systems.

how to reproduce:
You need STM32F103, STM32F407, or any STM32 with USB support.
Code : easiest way to use auto generated by Cube MX - USB CDC Device.
then - all you need is plug your newly flashed board to FreeBSD machine in DMesg message will appear:
umodem0: data interface 1, has no CM over data, has no break

here is usbconfig output:
Code:
usbconfig -d ugen0.4 dump_device_desc
ugen0.4: <DevEL DevEL-HWCodec-DEV> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0002  <Communication device>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x03eb
  idProduct = 0x6133
  bcdDevice = 0x0200
  iManufacturer = 0x0001  <DevEL>
  iProduct = 0x0002  <DevEL-HWCodec-DEV>
  iSerialNumber = 0x0003  <00000000001A>
  bNumConfigurations = 0x0001
This USB CDC Device working on linux flawlessly. you get /dev/ttyACMx on linux.
 
Top