I've been looking for information on how should I proceed to use the Edison as a USB device for communication with a host computer.
I don't know much about USB, but here's what I wish to achieve:
1. Integrate the USB interface on the device-side, boost.asio-based application.
2. Do not expose the Edison as a UMS device to the host-side OS, i.e., not mounting a X: on Windows neither identifying it as Class=Mass Storage on Linux.
3. Set a custom identification for the USB device on host-side so that the host application can connect with the device application.
When connecting the Edison with a Linux USB host, I've managed to test the communication as indicated https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt here. Sending data from the Edison to a Linux host seems to work properly, however, it looks like there could be some data loss when sending data from USB host to USB device, in a way that only spamming I can properly receive data.
What would be the best approach in this case? Should I remove g_multi and use configfs? Is there any way I can configure g_multi to use only USB CDC/Data?
Thanks in advance.
Thanks for your interest in the Intel® Edison™ Platform.
Personally, I don't have too much experience using the Edison as a USB device to communicate with a host computer. Nevertheless, I did some research and found this link http://dlsloan.ca/Docs/Edison/USBFileTransfer.html http://dlsloan.ca/Docs/Edison/USBFileTransfer.html , where it explains how to transfer files to/from your Edison through USB.
Please let me know if this is what you are looking for, if it isn't, could you be so kind to provide me more details on what you are trying to achieve.
Have a nice day!
Hi Jose P.,
That's not exactly what I'm looking for.
After looking more into it, I understand that I need to remove the g_multi module and that the best approach for integrating USB with my device-side application is to have a user space USB endpoint for streaming data.
The easiest way to do it would be to use GadgetFS, FunctionFS or ConfigFS with support to FunctionFS. However, GadgetFS and FunctionFS are not available on Edison and FunctionFS is not supported on ConfigFS for the 3.10 kernel.
: This thread's OP lists gadgetfs.ko in /lib/modules/3.10.17-poky-edison\+/kernel/drivers/usb/gadget/, but I don't know how to rebuild the kernel with support for it.
The only workaround I can think of seems to be creating a kernel module with the composite framework.
Unfortunately, rebuilding the kernel is out of the scope of our support. However, please let us investigate a little more to see if there is any workaround that we might suggest.
In the meantime, I found this thread where there is a discussion on how to disable the g_multi.
We appreciate your patience, have a nice day!
Hi Jose P.,
Thank you for your support.
To illustrate a bit more, I suggest you take a look at https://www2.informatik.hu-berlin.de/~iks/Studienarbeit/node12.html this. That's the interface I want for my application.
http://events.linuxfoundation.org/sites/events/files/slides/USB%20Gadget%20Configfs%20API_0.pdf Here you can see why 3.10 ConfigFS does not support FunctionFS.
I'll appreciate any suggestions you may have.
We appreciate your patience.
Regrettably, we couldn't find any workarounds. Like you mention, you should go through the kernel configuration and see if there are any modifications that could be done, so that it can fit your project requirements. Another thing that you could attempt, is to upgrade the kernel, but it may not work as expected.
Thanks for your understanding.