I want to control a CDC device (a data acquisition board from Texas Instrument) which currently works with a PC application on Windows. I am using a MKR1000 board and I know that it is capable of working as a USB host. But I am a novice in this and don't know exact hardware configuration and the example code to start with.
Can someone please give me some pointers on where to start?
The CDC device functionality is implemented by built-in USB module in MSP430F5529 microcontrller, and its API is available. I have also seen the samd21 github page with USBHost library, but not sure which of the examples is able to work with a CDC device. How should I initialize USB, and send and receive bulk information to/from a specific endpoint? Moreover, atmel and microchip have a USBHost stack. Should I use their functions and documents or the ones in the ArduinoCore-samd?
Any help or resource is deeply appreciated! Thanks!
If you need USB host and WiFi, a Raspberry Pi Zero W or Pi 3+ are better suited to the task.
The MKR1000 has USBHost capability but the software support is limited to keyboard, mouse, and ADK. It is possible to write a CDC ACM driver but I have never tried this.
If you do want to try the USB host capability, see the following link. A MKRZERO has the same SADM21 microcontroller as the MKR1000 but without the WiFi hardware.
Thanks a lot gdsports for this info. Unfortunately I haven't done any project with raspberry pi. I saw they have added CDC to USBHost shield. Is it likely that their example work with MKR?
In core folders on the ArduinoSamd github page here:
I see a "CDC Enabled" commit and CDC.cpp file. But the library didn't have any obvious example. Does it mean there is no driver or no example?
Do you think I have any other option? Like, using the examples from Atmel USB stack (in C language) or switching to another Arduino board + USBHost shield?
Thanks in advance!
Also found this thread:
where it is mentioned that CDC is implemented in USB Host shield. So maybe I should switch to an alternative Arduino board..