Skip to content

A strange issue happens on FT232B  #509

@ziv2013

Description

@ziv2013

Hi All,

I'm working on a project which need to get data from a USB device(MAVO-MONITOR USB). This device works well under windows. There is an FT232B chip in it to convert Uart to USB. And I use USB Host Shield with Arduino Uno to read the data from it. It works well with FT232R, I have tried FT232R board with loopback mode and communicate with another USB2Uart board. All the data can be send an received normally. But after I connect it with MAVO-MONITOR USB device. It can just send(I have confirmed this by sending Reset Command for this device and it will reset after received it). Arduino can't get data from this device.

From the above experiment I'm sure this is not a HW related issue. As FT232R works well and I can send command to the device.

And I have used a USB analyer for debugging (Teledyne LeCroy USB Protocol Analyser, T3). My code is like below:

    elsp=millis();
    while (millis()-elsp<2000) {
      uint16_t rcvd = 64;
      uint8_t buf[64];
    rcode = Ftdi.RcvData(&rcvd, buf);
    if (rcode && rcode != hrNAK)
    {
        Serial.println(F("RcvData Error"));
    }

    if (rcvd>2)
    {
          buf[rcvd]=0;
          Serial.println((char*)(buf+2));
    } 
    delay(16);
    } 

There is no output from this code. I have tried, the value of rcvd is always 0. This should be at least 2 event there is valid data on the serial port.

From protocol analyser I can see the package comes from device send to EP1 and the HOST Shield has ACK to it. But I don't know why I can't get any data in my code. And I have checked the return value 'rcode', it's always 4 when means hrNAK. So this really puzzled me: the HOST have ACK to the device, but I can see nothing.

I have tried to compare the USB packages with Windows communication. But there are too many packages.

Does anyone know what's the different between FT232R and FT232B(this version is too old to buy, I can just find FT232BM in the market, and I'm not sure if I can see same issue with BM version)? And is there any directions for me to debug?

Thanks a lot.

Ziv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions