Hello. I’m trying to read data via usb_uart on an M5Stack CoreS3 from a CDC-ACM device, without success.
Here some config entries.
I moved the logger to a different interface. I have no idea whether this is necessary, but this way it definitely doesn’t occupy the USB interface.
Outputs
output: - platform: axp2101 type: range channel: DLDO1 id: lcd_backlight_output min_voltage: 2600 max_voltage: 3300 - platform: axp2101 channel: ALDO1 voltage: 1800 - platform: axp2101 channel: ALDO2 voltage: 3300 - platform: axp2101 channel: BLDO1 voltage: 2800 - platform: axp2101 channel: BLDO2 voltage: 1500Then I set these switches:
switch: - platform: gpio name: "bus_out_en_sw" internal: true pin: aw9523b: aw9523b_hub number: 1 restore_mode: ALWAYS_ON - platform: gpio name: "usb_otg_en_sw" internal: true pin: aw9523b: aw9523b_hub number: 5 restore_mode: ALWAYS_ON - platform: gpio name: "boost_en_sw" internal: true pin: aw9523b: aw9523b_hub number: 15 restore_mode: ALWAYS_ON - platform: gpio name: "AW RST P0_2" internal: true pin: aw9523b: aw9523b_hub number: 2 restore_mode: ALWAYS_ONAnd configure the usb_uart
usb_uart: - type: cdc_acm id: scanner_bus vid: 0x152A pid: 0x880F channels: - id: uch_1 debug: trueThe device is a barcode scanner Digitus DA-8002
DC 3.3 - 5V, 120 mA, idle 1uA
The scanner is set as "USB serial interface output".
Adapter USB-C to USB-A Greencell 2.4A 480 Mbps
Power supply CoreS3: Yingjiao YS35V-1203000, 12V, 3A, 36W
Baudrate scanner: 9600
The scanner is powered. When I plug it in, it beeps, and it also beeps when I scan.
It has a USB-A interface, and I’m using a USB-C to USB-A OTG adapter.
The scanner works without any problem with this exact adapter on a Windows PC and on an Android smartphone.
This is the log when I plug in the scanner.
As it looks, the transfer is submitted with usb_host_transfer_submit. There are absolutely no error messages and everything looks correct. The callback is just never called—no matter what, how much, or how fast I scan.
What did I forget? Is this even possible at all?