Reception of WinUSB in Raspberry Pi2 is no good. RRS feed

  • 質問

  • I'm testing USB communication using WinUSB on Raspberry Pi2(RP2).
    This project is working on 'Windows 10 IoT Core' and with 'Visual Studio 2015 - UWP(C#)'.

    There is not the problem about the transmission toward the USB device from RP2 (OK), but there is malfunction to receive data toward RP2 from a USB device.
    In the case of quantity of data is less than 6 bytes, there is no problem for reception.
    However, an error occurs by the reception when the data exceed 7 bytes.

    In this application, I use chra equal to or less than 60 bytes as data of the transmission and reception.
    The codes of the reception department are as follows.

        public static String gRcv;
        public static Boolean rcvOk = false;
        public async static Task BulkRead()
            UInt32 bytesToRead = System.Convert.ToUInt32(64);
            UInt32 bytesRead = 0;
            if (OpenFlag == true)
                UsbBulkInPipe readPipe = usbDevice.DefaultInterface.BulkInPipes[0];
                readPipe.ReadOptions |= UsbReadOptions.None;
                var stream = readPipe.InputStream;
                DataReader reader = new DataReader(stream);

                    bytesRead = await reader.LoadAsync(bytesToRead);     //Number of the receive letters
                catch (Exception exception)
                    gRcv = reader.ReadString(bytesRead);
                    if (gRcv == "") { rcvOk = false; } else { rcvOk = true; }

    The line that an error produces is a line with rem(//Number of the receive letters).
    An exception occurs in 'reader.LoadAsync(bytesToRead)' and stops.
    It do not return to the original state of PC when this occurs once, and should reboot RP2.
    This cord refers to the following link.

    With the sample, I change 'readPipe.ReadOptions | = UsbReadOptions.IgnoreShortPacket; ' to  'readPipe.ReadOptions | = UsbReadOptions.None;'.
    Because, this application use ShortPacket (less than 60 bytes).
    It do not make any problem at all when USB device send the data equal to or less than 6 bytes. (With this code, I tried transmission and reception consecutively for 30 hours, and It's OK.)

    But, there is not the need limiting such data at all and can use it commonly when I run this UWP application as LOCAL computer. (on LOCAL computer, I do not have any such problem at all)

    I thought that even a REMOTE computer should have worked because it moved with a LOCAL computer.
    I do not understand the solution of this problem.
    Please please teach a solution.

    In conjunction with this, there is a thing slightly anxious.
    There is similar application (transmission and reception is ShortPacket) that I made as FORM application using WinUSB.
    Though this FORM application moves without a problem with the PC which I upgraded to Windows 10 Pro Anniversary(32,64bit) from Windows 7 Pro(32,64bit), but I  get a report from some customer.
    This FORM application does not work with the PC which they introduced newly. (but It moved with the old PC)
    And the report says that ShortPacket from a USB device cannot receive.
    For reference, I show the part of the INF file of this below.


    We used it without a problem with this INF file for a long time.
    This problem must be fixed immediately, but thinks whether this is related to an upper problem.
    I thank for your having read to here.
    If there is a method of the solution, please please teach me it.

    2016年12月2日 12:40