Closed lukebayes closed 4 years ago
Hi! Can you first check if this is not the same issue as #15?
That's exactly what it was. Thanks for the pointer!
For anyone else who's coming along later, the fix was to open usb_config.h
and set these three variables:
/** @brief Set to 1 if notifications are sent by a CDC-ACM interface.
* In this case notification EP will be allocated and opened if its address is valid. */
#define USBD_CDC_NOTEP_USED 1
/** @brief Set to 1 if SET_CONTROL_LINE_STATE request is used by a CDC-ACM interface. */
#define USBD_CDC_CONTROL_LINE_USED 1
/** @brief Set to 1 if SEND_BREAK request is used by a CDC-ACM interface. */
#define USBD_CDC_BREAK_SUPPORT 1
And to make sure my console interface configuration in usb_device.c
had valid address(es) as in:
console_if->Config.InEpNum = 0x81;
console_if->Config.OutEpNum = 0x01;
console_if->Config.NotEpNum = 0x82;
Once this is done, the device appears at /dev/ttyACM0
and can be mounted with:
sudo screen /dev/ttyACM0 115000
Thank you!
First, thank you for such a beautifully factored and clean library. I can't express how grateful I am for these resources!
I have an STM32L412Cx as a USB device that uses a VCP/CDC interface to receive commands from a connected tty (or more commonly, a custom .NET application we're also authoring).
Some of these commands cause the device to take some action (e.g., transmit an IR code), while others will cause the device to present itself to a host computer as a keyboard, mouse or joystick.
I've been fighting with the HAL libraries for some weeks before discovering your gorgeous library.
One difference I've noticed, is that with the STMCUBE-generated USB CDC library, Linux recognizes the CDC device and mounts it at /dev/ttyACM0 (or /dev/ttyUSB0, I can't remember which at the moment). But when I use the USBDevice library, this does not happen, even if I use STMicro's Vendor and Product IDs.
The current configuration does get picked up by Windows and it is reachable using a PowerShell (or C#) with no issues.
FWIW, here is my usb_device.c file:
Here is my main.c file:
Here is what
/var/log/syslog
report when unplugging/plugging in the USB connector:I strongly suspect my problem is in the "101 was not an MTP device," but I'm not sure what to do about it, as I'm not trying to use "Media Transfer Protocol."
The device does show up when I run
lsusb
Any tips, pointers or feedback would be enormously appreciated.