2015-05-11 08:18 AM
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 athttp://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. - Kristoffer2015-05-12 05:40 AM
134byte packages are violating usb standard. Sometimes it works, sometimes not.
http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk2015-05-12 06:35 AM
I solved it, i wasnt sending my 64 bytes that i thought i was, my processor did so much between usb polls so that it did not have time to fill 64 bytes into usb buffer with my implementation.
When i changed it so that the frimware sends 64 bytes + 64 bytes + 6 bytes in succession, the program works. At least the sending part.