Use the USB-A port to control a device with USB-to-Uart converter

Hi. I'm a beginner for Arduino and may not able to describe all the details of my questions. But I will try to include more details.

I have the device, it has an USB port and can be controlled by PC via serial communication. I used methods from serial library and setup the port, baudrate, bytesize and other parameter in a python code, and then it worked.

And now I want to use Arduino giga R1 to control this device. I searched a little bit and learned that there is a library called "USBHostSerial.h" that may contain the functions or class that could help.

This library was included in Arduino_USBHostMbed5.h and I put the following in my arduino code:

USBHostSerial USB_A_serial; 

bool initialize_connection() {
    //enable the USB-A port
    pinMode(PA_15, OUTPUT); 
    digitalWrite(PA_15, HIGH);  

    if (USB_A_serial.connect()) {
        USB_A_serial.baud(115600); 
        USB_A_serial.format(8, USBHostSerialPort::None, 1);  
        return true;
    } else {
        Serial.println("Failed to connect device.");
        return false;
    }
}

I linked this function to a button and connect the device to the USB-A port ,and I always receive "failed to connect to device" in the serial monitor after I clicked the button.

    pinMode(PA_15, OUTPUT); 
    digitalWrite(PA_15, HIGH);  

These two lines were copied from the examples, which allow me read files from a usb drive connected to USB-A port.

In the tutorials they mentioned that "To enable the USB-A port, you will need to define it as an output. You can also disable it inside of a sketch by writing a LOW state to it." Not sure if they are needed here, but I include them in my code.
(https://docs.arduino.cc/tutorials/giga-r1-wifi/giga-usb/)

Did I missed some something to enable the USB-A port for serial communication or setup the connection with the device? Or did I used wrong library for this?

My description could be confusion since I'm not sure about some terms in embeded systems development, please feel free to ask for more information .

Thank You in Advance

This forum thread should be helpful: Can Not Find Examples for USBHostSerial!

Thank you! Learned a lot from this thread and I think I understand my question better now.

I tried the library provided by KurtE and seems my device is not in the list.

The device's vid and pid are: VID 1FC9 and PID 0083

I searched around and seems this means the device has a NXP LPC series MCU that implemented the function of the Virtual COM Port.

I guess it didn't support CDC since USBHostSerial didn't work. And I didn't find a driver for it and don't have the background to make an initial funcition in the library to enable new device for arduino. So, I guess it's a dead end for me here.

I guess I will try somthing else and seek help from the vendor. But it seems I should try some other platfrom to work with the device.

Thanks for your help.

Hi @tolin_kamalu. We might be able to suggest some other solution if you tell us more about the device. It would be useful if you give is a link to the technical data provided by the manufacturer.

Perhaps the device provides another communication interface (e.g., direct access to the UART lines) that is easier to use with a GIGA R1 WiFi board than the USB?

Hi! Thank you, but unfortunately I cannot share too much about this device. The manufacturer didn't mention anything about the details of the USB communication but just send us a driver and their software.

However you are right, I just realized that there is a Host SPI on the device for communication. The manufacturer didn't share any information or commands relates to this SPI port since they assume we will use their software on PC only. I guess this would be the best chance for me to work it out with Arduino.