USBX CDC ACM Write fails with less than 8 bytes

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

Hello.

I noticed this strange behaviour for USBX CDC ACM:

it sometimes fails when "Write" less than 8 bytes.

You can test this from "snip/usbx_usb_device/usb_device_cdc_acm_read_write".

 

Go to "usb_device_app_cdc_acm_console_rw"

and in the infinite loop substitue the code with this...

 

actual_length=3;

cdc_acm_buffer[0]='a';

cdc_acm_buffer[1]='b';

cdc_acm_buffer[2]='c';

requested_length = actual_length;
wiced_rtos_delay_milliseconds(1);

status = ux_device_class_cdc_acm_write( cdc_acm, cdc_acm_buffer, requested_length, &actual_length );

 

Open terminal program (I use Tera Term) and receive this 3 bytes flux data.

 

I use USBPCap Wireshark to sniff USB communication.

 

You notice that sometimes USBX don't send the 3 bytes packet but send ZLP (zero length packet).

 

Cattura.PNG

 

0 Likes
4 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

which is the device that you are using and what is version of wiced under question?

0 Likes
MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

device = CYW943907AEVAL1F

WICED Version: Wiced_006.006.000.0009
54140c5acfaf45c86e7b06bba21685769d3e9cda

0 Likes
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

@Murali_R 

Any follow up after your got the reply of device and wiced version?

0 Likes
MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

No...I'm still send not less than 8 bytes

0 Likes