USB HOST CDC Communication

Moderator: ESP_Bob

Joel Deng
Posts: 1
Joined: Fri Dec 03, 2021 2:51 am

USB HOST CDC Communication

Postby Joel Deng » Fri Dec 03, 2021 3:08 am

Hello,
我的board是esp32S2,我正在尝试运行 ESP IoT Solution /example/usb host basic.我阅读了readme.md文件,这个demo是基于"AT"指令能正常工作,但是,我目前使用的是一个简单的USB device UART从机设备,它连接PC是可以通过UART正常工作,但它并没有集成"AT"指令集,

接下来我将"usb host basic" build -flash到esps2,再将设备接入esp32s2 host后不能正常通讯,那我要如何才能使它正常的send / write信息?

我只能从调试信息如下:
1.未连接
W (970528) USB_HCDC: The out buffer is too small, the data has been lost 4 I (970528) cdc_basic_demo: Send len=-1: AT
2.建立连接,但esp32s2无法接收device data

............................................................................................. I (2808) USB_HCDC: line 263 HCD_PORT_EVENT_CONNECTION I (2808) USB_HCDC: Resetting Port I (2868) USB_HCDC: Port reset succeed I (2868) USB_HCDC: Getting Port Speed I (2868) USB_HCDC: Port speed = 1 I (2868) USB_HCDC: USB Speed: full-speed I (2868) USB_HCDC: Set Device Addr = 1 I (2878) USB_HCDC: Set Device Addr Done I (2878) USB_HCDC: Set Device Configuration = 1 I (2888) USB_HCDC: Set Device Configuration Done I (2888) USB_HCDC: Set Device Line State: dtr 1, rts 0 I (2898) USB_HCDC: Set Device Line State Done I (2898) cdc_basic_demo: Device Connected! I (2908) USB_HCDC: Creating bulk in pipe I (2908) USB_HCDC: Creating bulk out pipe I (2918) USB_HCDC: Device Connected I (2918) cdc_basic_demo: Send len=4: AT I (3918) cdc_basic_demo: Send len=4: AT


我要如何修改demo让它能正确接收到device的数据? 我没有找到相关函数去解析"AT"指令
谢谢

Who is online

Users browsing this forum: No registered users and 35 guests