Virtual com communications with no usb2uart bridge? - serial-port

I'd like to connect a beagleboard-like (custom developed) omap board to a Windows PC using a virtual-com setup. That is, i'd like the board to appear to Windows as a com device and get the COM to send data to our application on the board. The main reason for that is to use virtual-com drivers on windows, since the usb drivers we use now to directly sent data over usb between the host and the board seem not to work properly.
I have done this using the FTDI driver on the past but as far as i know it worked because the device had an FTDI chip that translated the usb protocol to serial signals (am i right ?).If there's no USB to UART bridge on the board, how could i do that ?
By the way, how USB Communication Device Classes fits here ? Should develop a CDC driver for the board ? What should I use then on Windows side ?
I'm kind of confused, so any help will be greatly appreciated :)

Well, i answer myself :)
The solution lies in the Linux USB Gadget Subsystem.
Gadget API

Related

Nuvoton NUC120 Communication via Build in USB

I just bough NUC120, and there is nothing less than expected. What sparked my interest is, as stated on page 17-18 on the datasheet, It able to do UART communication. So far, I only use the USB port to uploading the firmware via ISP using NuMicro ISP Programming Tools. I've noticed (correct me if I'm wrong) that its the same concept with Arduino boards, where the USB port can be used to both programming and communication. I have do my research for several days, but still can't find how to do serial communication between Nuvoton and PC, since when I do programming using NuMicro, I use "USB" connection type, and on my PC, there is no COM PORT listed.
My question, Is it possible to do serial communication via Nuvoton USB port? If its possible, can you please point me where to look?
Thanks in advance. Please tell if I should add more details about this question.
You can find the examples in the BSP documentation. Look for samples of USBD_VCOM. To be able to communicate with your PC, you have to install the driver of Virtual COM manually

How to connect Arduino with Internet?

I have gone through several links online but I have not found any appropriate solution to it. I am wondering if there is a way to connect an Arduino with WiFi without using any shield or any other external hardware. My laptop is connected to WiFi and the arduino board is connected to the laptop with an USB cable. I want to access/run the data for the Arduino using WiFi. Is there a way to do it?
Hope my query makes a sense.
Thanks.
Let's restate your question for clarity - you want to share the laptop's Internet connection (e.g. via WiFi) with the Arduino connected to the laptop with a USB cable, with no additional hardware?
Assuming I restated it correctly, the Arduino's USB connection provides a virtual "serial port" for communication. This means you can use an "IP over serial" solution for Internet access. One such common and widely supported solution is PPP.
However, programing the Arduino with IP over PPP stack requires significant amount of memory and is probably an overkill for whatever it is you're trying to do.
You're probably better off designing a custom-tailored protocol for the serial communication between the Arduino and a small gateway program you can program and run on the laptop.
If you're bent on a complex solution that provides full Internet access to the Arduino, the steps to achieve what you're after are:
Program the Arduino with a TCP/IP over PPP protocol stack, running on the serial port. You'll probably need an Arduino MEGA.
Setup the laptop to be a PPP endpoint on the Arduino's serial port. For a Windows machine you can refer to this page for information on how to do that.
Once the PPP link is up, you can setup the laptop's OS to share Internet access to the PPP link.

Ableton Live/M-Audio Fast Track conflict with USB keyboard

I am using Ableton Live 6 Lite with M-Audio Fast Track connected through USB port. I am having the following issue which I do not know how to resolve: I cannot simultaneously use sound recording with the above mentioned setup and a USB connected keyboard (just a regular USB keyboard which I use with my Toshiba Laptop PC). Either keyboard is not working or no sound reaches Ableton Live software. Any help would be really appreciated. Thanks.
It sounds like you are using a USB hub which does not have its own power source. You are drawing too much current so only one device can be powered at a time. Use USB ports directly on your computer or get a USB hub with its own power adapter.

Activesync connection between two USB-host controllers

For a hobby project I wish to develop some stuff for a WinCE 6.0 device. Ideally, I would have an activesync connection to debug from Visual Studio. The OS appears to have all the prerequisites in place, but I'm not sure about the transport. What are my options?
The device has a USB port which can be used to connect e.g. flash drives for mp3 playback, so this seems to be a USB host port. Can I use this to obtain an activesync connection? I guess using a usb-to-serial cable on both pc and WinCE device could work. Or is there a RNDIS way perhaps?
If possible I rather not disassemble the unit, but if my chances of finding a USB client port or wired ethernet are nonzero I could consider that. Any thoughts?
You can not use USB host port for Activesync connection.
But if it is USB OTG (Both host and client) port, you can use activesync using USB OTG or USB Client functionality.
Your BSP should support USB Serial Client functionality (Search SYSGEN_USBFN_SERIAL sysgen variable in catalog items).
Also, your USB driver (lower level driver) should support USB Client functionality.
ActiveSync will work on a serial cable, so the idea of using an USB-to-serial adapter may work. But you need to have drivers for it in the OS image. There are some CDC drivers and FTDI provides drivers for their chips. You may be able to load them on the device, copying them using a USB thumbdrive and modifying the registry using a registry editor for windows CE, but that's not granted. Windows CE also supports RNDIS compatible USB to ethernet adapter but honestly I don't know if any device of this kind is currently available on the market. If your device has wi-fi connectivity you can skip using ActiveSync and debug over the network.

WinUSB driver for Arduino

I'm using an Arduino to read data from the web and display it. I can easily pass the data as serial using the supplied drivers, because they identify the COM port so I can send serial to the COM port.
However, I want to use 'real' USB techniques so the device can be plugged in and out like a normal USB device. I'm looking at using WinUSB as the driver. However, USB is all new to me. Is there an .inf file that uses WinUSB and an Arduino (I have an Uno)?
The lack of information on this is making me think I am going about this incorrectly.
Turns out that an Arduino Uno is not a genuine USB device.
It acts as a Serial to USB adapter. Consequently USB drivers don't talk to it.
I got round this by writing a sketch which reported back what device it was when it got the correct query from the PC.
On the PC I just iterated the Serial ports and sent the query to each port. The one that replied was the Arduino.
After that I record the port number and send serial data to the Arduino.
To learn the USB portion, maybe you could combine V-USB and the UNO?
Check out V-USB.
V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.
While not necessarily Arduino, it may provide you the learning exprience you want, and let you use incorporate your UNO device.

Resources