USB CDC Device

Discussion and questions about programming with Ultibo.
User avatar
Rassamaha78
Posts: 52
Joined: Wed Dec 20, 2017 1:09 am
Location: Russia

USB CDC Device

Postby Rassamaha78 » Sun Mar 10, 2019 6:41 am

Where can I see any example of working with USB CDC Device ? The device is defined in Windows as a CDC USB device, and allows to work with it through an ordinary terminal (RS232).

USB\VID_1234&PID_1016&REV_0101

VID and PID i can change to any values if necessary.
User avatar
Ultibo
Site Admin
Posts: 2261
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: USB CDC Device

Postby Ultibo » Mon Mar 11, 2019 10:49 pm

Rassamaha78 wrote:Where can I see any example of working with USB CDC Device ? The device is defined in Windows as a CDC USB device, and allows to work with it through an ordinary terminal (RS232).

USB\VID_1234&PID_1016&REV_0101

VID and PID i can change to any values if necessary.

The USB CDC specification covers a whole range of devices including serial, network and others, I'm assuming if your device implements RS232 then it is a USB Communications Device Class (CDC) Abstract Control Model (ACM) which is supported in Ultibo using the USBCDCACM unit found in the drivers folder.

Detection of CDC devices is based on the interface class, subclass and protocol except for a small number of devices that are detected individually, I checked your VID/PID and they don't appear on the list of specially handled devices so it should be ok to use as is.

The simplest way to test this is to include the USBCDCACM unit in your project and then plug in the device and see if it is detected, it should create a new serial device to represent it. You can modify the examples included in this thread to work with a USBCDCACM device by changing the device description that is search for.

By default the description of a USBCDCACM device will be USB CDC ACM Serial instead.

If you have any issues getting it working let us know.
Ultibo.org | Make something amazing
https://ultibo.org

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest