Author Topic: Data Transfer from a common OS to Embedded System  (Read 9274 times)

paulr

  • Member
  • ***
  • Posts: 3
Data Transfer from a common OS to Embedded System
« on: August 24, 2013, 07:30:44 pm »
Dear USB Forum:

The general question is what is the most prevalent method
for transferring small amounts of unstructured data to common
OS platforms, such as Windows, Linux, Android, or IOS, from an
embedded system ? (i.e. I am aware Apple IOS systems have
special authentication requirements.)

In my particular case the embedded system is RTOS based and the
MCU has an integral USB port. (i.e. The MCU is a ST MICRO ARM Cortex
variant  such as STM32L15X or STM32F1FX.) In addition to learning the general
framework for this functionality, I would also like to know what software components
other than a basic driver must be installed on the embedded system MCU.

The actual functionality I need is to transfer small ASCII log files
from the embedded system to another system when the user
of the other system requests it.

In general the embedded system is a USB slave peripheral and the other--PEER,
system is a USB master and has the standard USB connector, software, and
functionality supplied by the manufacturer and OS.

I think the "USB Virtual Serial Port" framework will work although I a not
sure if it is the best approach or how well it is accepted or supported
by the relevant OS(es). Under this framework the embedded system MCU
needs the CDC/ACM class framework plus an API the permits serial data
transfer to work if I am correct. In addition it needs to function as a
USB slave peripheral.


Best Regards,

Paul Romero



Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Data Transfer from a common OS to Embedded System
« Reply #1 on: August 24, 2013, 08:39:07 pm »
This article is old but still covers the popular options for transferring generic data:

http://www.lvr.com/usb_on_a_budget.htm

How much firmware you will need to provide depends on what USB support the OS has built in. If you don't want to do any USB programming, a USB UART chip is the way to go. 


paulr

  • Member
  • ***
  • Posts: 3
Re: Data Transfer from a common OS to Embedded System
« Reply #2 on: August 24, 2013, 09:18:55 pm »
Hi Jan:

As I mentioned the target device to which my questions apply is RTOS based. has an integral USB port,
and has a low level USB driver supplied by the manufacturer. It is not a problem to write code
that executes on the MCU but I am certain the majority of the modules can be obtained
from the manufacturer or RTOS suppliers.  Using a UART module in this case does not
make sense for both technical and cost reasons. I forgot to mention one simplifying
factor. Full USB functionality is not necessary as the transfers will always be performed
via a direct point to point cable connection.

The main problems are as follows and don't apply to any particular hardware:

* What is the most prevalent--industry standard, method for performing the kind of data
   transfers I described ? (i.e. The most accepted architectural configuration.)

* What USB software components and classes are required on the target device ?
   (e.g. CDC module.)

* Compatibility with the maximum number of off the shelf OS(es.)
   (i.e. Don't need custom drivers for Windows, Linux, etc.)  For example,
   in the Windows case, compatibility with the use of Virtual COM port
   is desirable.

It can be assumed the integral USB port has CDC and OTG capability. In addition,
I think bulk data transfer is the easiest and best transfer method.

The important data transfer attributes are as follows:

* Unstructured ASCII data.

* Low volume and speed.

* Short distance--direct cable connectionl, where corruption
   is a minor issue.



Best Regards,

Paul R.



 
 

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Data Transfer from a common OS to Embedded System
« Reply #3 on: August 24, 2013, 10:27:47 pm »
CDC/Virtual serial port could do the job. For Windows, you will need to provide an INF file (digitally signed for 64-bit versions).

On the device, you will need USB support for enumeration, power/Suspend, and endpoint communications, and support for CDC descriptors and protocols.

The USB Embedded Host and OTG spec spells out the requirements for embedded USB hosts.

HID can do control and interrupt transfers only. WinUSB is Windows only. Libusb requires installing a host driver.