AnsweredAssumed Answered

STM32L152 Usb transfer length > 64

Question asked by odmark.kristoffer on May 11, 2015
Latest reply on May 12, 2015 by odmark.kristoffer
I am as the title is trying to suggest attempting to transfer a large packet over an usb endpoint. I am using bulk-transfer and have modified code from the Virtual comport example to neatly package my buffer into 64 bytes packages and then transfer them. However on the host-system (linux) my packages are received as independent 64 bytes frames, which then generates errors.

So my question is, can i change my settings somewhere so that if i have for example 134 bytes package that needs to be transmitted, then i would send them 64 bytes then 64 bytes then 6 bytes. And have them reaseembled into the 134 bytes usb frame that i want?

for clarification i am trying to send a 134 bytes ethernet frame to the cdc_eem driver found at http://lxr.free-electrons.com/source/drivers/net/usb/cdc_eem.c?v=3.16
but i keep erroring out at line 287. because the skb->len is 64 and my package is 134 bytes. (I recompiled the linux kernel and added print messages)

kindly help or suggest where to turn, i have been trying for long now. 

- Kristoffer


Outcomes