USB CDC-ACM data channel not responding when connected to virtual machine

Hi,

I am using the sample application from the "an-r11an0171eu0100-synergy-usbx-device-class-cdc-acm-mod-guide", to test a simple USB CDC-ACM communication. My setup is - host Windows 7 64 bit, S5D9-PK development board. I use e2studio 6.2.1, with SSP 1.5.3

On the same PC, I also have a virtual machine (VM) with Windows 7 64 bit, running on VMWare Workstation 14 Pro.

When I start the sample application, the device is connected to the PC and everything works Ok - from a terminal emulator I can send characters and see the board echoes them back. If I close the terminal emulator, and connect the device to the VM, the device enumerates correctly - I can see it as a COM port in the Device Manager. However, when I open a terminal emulator on the VM, I cannot send or receive anything. Disconnecting from the VM and re-connecting back to the host - device is still in that state - enumerates Ok, but no serial communication is possible. If I power cycle the device (or do a hard RESET) then it is back to normal.

I used USB analyzer to capture some more data. Here (usb-1.png) is what the USB traffic looks like when the device powers ON, connected to the host, and I send some data to it using a terminal emulator:

And here is what the traffic looks like when I disconnect the device from the host and connect it to the VM and try to send data from a terminal emulator on the VM (usb-2.png):

You can see that all OUT transactions are NACK.

I also checked ux_cdc_device0_instance_deactivate() - it is not invoked when the device is detached from the host and attached to the VM.

Any ideas how to resolve this?

Thank you,

D.

  • Hi D,

    I created a new support ticket for you. Your ticket number is #193604. Our engineer will get back to you soon.

    Thanks,
    RenesasRulz Forum Moderator
    Jennifer
  • Hi Dimitar,

    Couple things. The USB CDC must use a signed Windows driver for Win7. You can get it from the Gallery at below link.

    www.renesas.com/.../usb-cdc-drivers.html

    The other is to rule out any issues with VM. Do you see the problem if you use a native Win7 PC? This will help isolate the any interaction that may come from VM.

    Fatih
  • In reply to 2bits:

    Hi Fatih,

    I tried with the signed driver as well - no difference.

    With native PC I need to unplug the USB cable (do not have a way to perform bus reset, for the device, otherwise), and in that case it works. With the VM - no cable is unplugged and it does not work.
    I also tried with the Oracle VirtualBox VM software - exactly the same problem. Also tried with a Linux VM (guest OS is Linux) - same problem. This should rule out the issue as a VMWare specific issue.

    It looks like, unless the USB is physically disconnected, something goes wrong when USB reset is performed.
    I do not have such problems with other USB devices - I can freely connect/disconnect between the host and guest OS, without any problems.

    Thank you,

    D.
  • Hi Dimitar,

    I modified the main flow of the main application.  Now you can disconnect the USB cable and re-connect it back and comms still work.  

    The forum has limited attachment size.  I placed the updated project on our FTP site.  The download info is below.  

     

    Please download files from the following URL:
    <https://upload.hdedrive.com/ui/renesas.com/dl/SB1546966705-2b5fe92c-4865-40aa-9ef5-5bd584b3b618>

    Download Password: ACyy5tM/Nn!p

    This URL will expire on January 22 2019 11:58 AM

     

     

    Fatih

  • In reply to 2bits:

    Hi Fatih,

    Thank you for the sample application. I tried it, but the problem is still there - no change.
    As I described in the first message of this thread - first I have the device connected to the host PC, and it works Ok. Then I start a VM, on the same PC, and connect the device to the VM. The device enumerates Ok, but when I open a terminal, in the VM, I cannot send/receive data.

    When I switch to the VM, the device application is waiting to receive data, line 111 in new_thread0_entry.c:

    status = ux_device_class_cdc_acm_read(g_cdc, buffer, UX_BUFFER_SIZE, &actual_length);

    When USB reset occurs, ux_device_class_cdc_acm_read() is still waiting for data. Should not it error out instead? Maybe this is the issue?


    Best regards,

    D.
  • Hi Dimitar,
    I am going to take this out of the form and into our TSC system. Please look for an email from TSC.
    Thanks,
    Fatih
  • In reply to 2bits:

    Answer supplied in support system. If you are interested in the answer reply to this post.

    Warren
  • In reply to WarrenM:

    Hi,

    Is there a resolution for this issue? If there is, Yes, please post it here.

    Thank you,

    D.
  • In reply to dim:

    Hi Dim-
    Looks like the issue is still being worked on. I have set a flag to inform me when the issue is resolved and will post the answer here at that time.

    Warren
  • In reply to WarrenM:

    Hi Warren,

    Thank you for the update.

    Regards,

    D.