Shop OBEX P1 Docs P2 Docs Learn Events
FTDI USB-to-serial driver issue — Parallax Forums

FTDI USB-to-serial driver issue

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2013-10-24 15:22 in General Discussion
Here's a weird one. I have the latest FTDI driver installed on both my shop computer (WinXP SP3) and an ancient laptop (WinXP SP1). The shop computer works with all FTDI USB-to-serial devices. The laptop works with all devices except the FTDI chip installed on the Propeller BOE. When I connect a Prop BOE to the laptop, it recognizes that a connection was made but says an error occurred when installing the new device. Any ideas what's going on or how to remedy the situation -- short of upgrading to SP2 or SP3?

Thanks,
-Phil

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-23 09:46
    You might be able to get more error details by checking the event viewer (Start/Run/eventvwr.exe) but by looking at the DLL dependencies you can see there are many, many dlls associated with the just the ftbusui.dll and there are two other ftdi dlls included in the driver.

    Your safest bet might be to upgrade to SP3.

    ftbusui.jpg
    956 x 707 - 176K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-23 10:15
    I'm resisting SP3, since it's such a drag on my other computer. I was thinking it might be a hardware issue, since I'm sure the laptop USB port is no greater than USB 1.1. I was hoping the solution might be to go into the chip with MPROG on the shop computer and change some settings that would render it usable on a slow USB -- if that's even the issue.

    -Phil
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-23 11:11
    Phil,

    I don't think it would be related to speed of the port, not for that class of device. I'm leaning more toward you needing the service packs. In the past I have seen issues with hardware not functioning properly (even with updated drivers) if Windows wasn't up to date, especially at that level. Windows XP is really getting on in years and I would be willing to bet there is some support for updated hardware in those service packs. Just my thoughts. I spent many years building, repairing and upgrading PCs...but I'm happy to not be doing it any more.

    It's too bad you don't have a spare drive you could clone to and swap out. I've done that before to test things. Then if it didn't work you could always put the original drive back in.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-23 11:34
    I'm resisting SP3, since it's such a drag on my other computer. I was thinking it might be a hardware issue, since I'm sure the laptop USB port is no greater than USB 1.1. I was hoping the solution might be to go into the chip with MPROG on the shop computer and change some settings that would render it usable on a slow USB -- if that's even the issue.

    -Phil

    I have an old 2002 Dell 2.53GHz desktop with 1GB of RAM running XP Pro. Last week it developed a problem where the CPU jumped to 100% (SVCHOST) when trying to run the Microsoft update. There are alll kinds of "fixes" on the Internet but I could not resolve the issue.

    I started to just scrap the PC but instead I reformatted the drive, booted up from XP install CD and proceeded to install XP (with SP1).
    Then I applied SP2 and SP3 but quess what - the problem was still there!

    One Internet fix said to install IE8. It independently downloads updates and installs IE8. When I ran the Windows Update, the new version of the Update ActiveX was installed.
    Had to dig around to find some needed drivers for the video card, etc but wasn't too bad.

    I was able to apply about 150 updates and the system is now stable and it boots up and shuts down fast!

    I have installed very few programs in order to keep it rather bare bones.
    Good thing it has a USB 2.0/Firewire card in it because the motherboard only supports USB 1.1.
    Since XP support is going away in less than 6 months, I may use this PC strictly for microcontroller/hobby programs.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-23 15:56
    'Found the problem. The FTDI chip on the Prop BOE is an FT232RQ (an FT232R in a quad flat-pack), so it should behave like any other FT232R. The difference is that the one on the PropBOE was programmed to request 500 mA of current. That, apparently, is more than my laptop can provide, so it croaks. It I reprogram the chip to request 90 mA, it enumerates and operates on the laptop just fine, and the laptop can power the board without a problem.

    -Phil
  • jmgjmg Posts: 15,172
    edited 2013-10-23 16:05
    '... The difference is that the one on the PropBOE was programmed to request 500 mA of current. That, apparently, is more than my laptop can provide, so it croaks. It I reprogram the chip to request 90 mA, it enumerates and operates on the laptop just fine, and the laptop can power the board without a problem.

    Interesting, I had often wondered about the downside of lifting that number a little.

    Did you find what value there is the 'drop dead' setting for your laptop ? (any middle ground ?)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-23 16:11
    jmg wrote:
    Did you find what value there is the 'drop dead' setting for your laptop ? (any middle ground ?)
    No, I just plugged in a known working value without poking at the envelope.

    -Phil
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-24 08:30
    So, if you plugged a powered hub into the laptop and the Propeller BoE into that it should work as programmed then. That would be an interesting experiment.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-24 10:21
    So, if you plugged a powered hub into the laptop and the Propeller BoE into that it should work as programmed then.
    That would be a reasonable thing to expect, wouldn't it? So I tried it with a powered hub on my laptop (the same one that works on the shop computer). No dice. The 90 mA reprogrammed BOE worked okay. The 500 mA BOE did not. So the hub must pass current requests back to the host unchanged.

    -Phil
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-24 10:37
    That would be a reasonable thing to expect, wouldn't it? So I tried it with a powered hub on my laptop (the same one that works on the shop computer). No dice. The 90 mA reprogrammed BOE worked okay. The 500 mA BOE did not. So the hub must pass current requests back to the host unchanged.

    -Phil

    Run usbview.exe and you can see the power attributes. When I connect the BOE it shows "Max Power" at 500mA but the powered hub shows 100mA.
    you powered hub may be requesting more than the laptop can provide http://www.ftdichip.com/Support/Utilities/usbview.zip

    HUB
    External Hub: USB#Vid_050d&Pid_0237#6&3f1cee4&0&1#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
    Hub Power: Self Power
    Number of Ports: 4
    Power switching: Individual
    Compound device: No
    Over-current Protection: Individual
    Device Descriptor:
    bcdUSB: 0x0200
    bDeviceClass: 0x09
    bDeviceSubClass: 0x00
    bDeviceProtocol: 0x02
    bMaxPacketSize0: 0x40 (64)
    idVendor: 0x050D (Belkin Components)
    idProduct: 0x0237
    bcdDevice: 0x0007
    iManufacturer: 0x00
    iProduct: 0x00
    iSerialNumber: 0x00
    bNumConfigurations: 0x01
    ConnectionStatus: DeviceConnected
    Current Config Value: 0x01
    Device Bus Speed: High
    Device Address: 0x03
    Open Pipes: 1
    Endpoint Descriptor:
    bEndpointAddress: 0x81 IN
    Transfer Type: Interrupt
    wMaxPacketSize: 0x0001 (1)
    bInterval: 0x0C
    Configuration Descriptor:
    wTotalLength: 0x0029
    bNumInterfaces: 0x01
    bConfigurationValue: 0x01
    iConfiguration: 0x00
    bmAttributes: 0xE0 (Bus Powered Self Powered Remote Wakeup)
    MaxPower: 0x32 (100 Ma)
    Interface Descriptor:
    bInterfaceNumber: 0x00
    bAlternateSetting: 0x00
    bNumEndpoints: 0x01
    bInterfaceClass: 0x09 (Hub)
    bInterfaceSubClass: 0x00
    bInterfaceProtocol: 0x01
    iInterface: 0x00
    Endpoint Descriptor:
    bEndpointAddress: 0x81 IN
    Transfer Type: Interrupt
    wMaxPacketSize: 0x0001 (1)
    bInterval: 0x0C
    Interface Descriptor:
    bInterfaceNumber: 0x00
    bAlternateSetting: 0x01
    bNumEndpoints: 0x01
    bInterfaceClass: 0x09 (Hub)
    bInterfaceSubClass: 0x00
    bInterfaceProtocol: 0x02
    iInterface: 0x00
    Endpoint Descriptor:
    bEndpointAddress: 0x81 IN
    Transfer Type: Interrupt
    wMaxPacketSize: 0x0001 (1)
    bInterval: 0x0C

    PropBOE
    Device Descriptor:
    bcdUSB: 0x0200
    bDeviceClass: 0x00
    bDeviceSubClass: 0x00
    bDeviceProtocol: 0x00
    bMaxPacketSize0: 0x08 (8)
    idVendor: 0x0403 (Future Technology Devices International Limited)
    idProduct: 0x6001
    bcdDevice: 0x0600
    iManufacturer: 0x01
    0x0409: "Parallax Inc."
    iProduct: 0x02
    0x0409: "PropBOE"
    0x0409: "PropBOE"
    iSerialNumber: 0x03
    0x0409: ""
    bNumConfigurations: 0x01
    ConnectionStatus: DeviceConnected
    Current Config Value: 0x01
    Device Bus Speed: Full
    Device Address: 0x07
    Open Pipes: 2
    Endpoint Descriptor:
    bEndpointAddress: 0x81 IN
    Transfer Type: Bulk
    wMaxPacketSize: 0x0040 (64)
    bInterval: 0x00
    Endpoint Descriptor:
    bEndpointAddress: 0x02 OUT
    Transfer Type: Bulk
    wMaxPacketSize: 0x0040 (64)
    bInterval: 0x00
    Configuration Descriptor:
    wTotalLength: 0x0020
    bNumInterfaces: 0x01
    bConfigurationValue: 0x01
    iConfiguration: 0x00
    bmAttributes: 0xA0 (Bus Powered Remote Wakeup)
    MaxPower: 0xFA (500 Ma)
    Interface Descriptor:
    bInterfaceNumber: 0x00
    bAlternateSetting: 0x00
    bNumEndpoints: 0x02
    bInterfaceClass: 0xFF
    bInterfaceSubClass: 0xFF
    bInterfaceProtocol: 0xFF
    iInterface: 0x02
    0x0409: "PropBOE"
    0x0409: "PropBOE"
    Endpoint Descriptor:
    bEndpointAddress: 0x81 IN
    Transfer Type: Bulk
    wMaxPacketSize: 0x0040 (64)
    bInterval: 0x00
    Endpoint Descriptor:
    bEndpointAddress: 0x02 OUT
    Transfer Type: Bulk
    wMaxPacketSize: 0x0040 (64)
    bInterval: 0x00
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-24 11:34
    The hub is requesting only 100 mA, but the Prop BOE is still requesting 500 mA via the hub, as shown below:
    Device Descriptor:
    bcdUSB:             0x0200
    bDeviceClass:         0x00
    bDeviceSubClass:      0x00
    bDeviceProtocol:      0x00
    bMaxPacketSize0:      0x08 (8)
    idVendor:           0x0403 (Future Technology Devices International Limited)
    idProduct:          0x6001
    bcdDevice:          0x0600
    iManufacturer:        0x01
    0x0409: "Parallax Inc."
    iProduct:             0x02
    0x0409: "PropBOE"
    0x0409: "PropBOE"
    iSerialNumber:        0x03
    0x0409: ""
    bNumConfigurations:   0x01
    
    ConnectionStatus: DeviceConnected
    Current Config Value: 0x01
    Device Bus Speed:     Full
    Device Address:       0x06
    Open Pipes:              2
    
    Endpoint Descriptor:
    bEndpointAddress:     0x81  IN
    Transfer Type:        Bulk
    wMaxPacketSize:     0x0040 (64)
    bInterval:            0x00
    
    Endpoint Descriptor:
    bEndpointAddress:     0x02  OUT
    Transfer Type:        Bulk
    wMaxPacketSize:     0x0040 (64)
    bInterval:            0x00
    
    Configuration Descriptor:
    wTotalLength:       0x0020
    bNumInterfaces:       0x01
    bConfigurationValue:  0x01
    iConfiguration:       0x00
    [b]bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
    MaxPower:             0xFA (500 Ma)[/b]
    
    Interface Descriptor:
    bInterfaceNumber:     0x00
    bAlternateSetting:    0x00
    bNumEndpoints:        0x02
    bInterfaceClass:      0xFF
    bInterfaceSubClass:   0xFF
    bInterfaceProtocol:   0xFF
    iInterface:           0x02
    0x0409: "PropBOE"
    0x0409: "PropBOE"
    
    Endpoint Descriptor:
    bEndpointAddress:     0x81  IN
    Transfer Type:        Bulk
    wMaxPacketSize:     0x0040 (64)
    bInterval:            0x00
    
    Endpoint Descriptor:
    bEndpointAddress:     0x02  OUT
    Transfer Type:        Bulk
    wMaxPacketSize:     0x0040 (64)
    bInterval:            0x00
    

    So it would appear that this is what the laptop sees and rebels against. It would make more sense for the hub to modify the power request on the fly as it passes to the host or to modify the "bus-powered" attribute to read "self-powered."

    -Phil
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-24 11:43
    The hub is requesting only 100 mA, but the Prop BOE is still requesting 500 mA via the hub, as shown below:
    ...
    So it would appear that this is what the laptop sees and rebels against. It would make more sense for the hub to modify the power request on the fly as it passes to the host or to modify the "bus-powered" attribute to read "self-powered."

    -Phil

    It seems that each device in the string makes a go/no-go decision based on the max power it could be expected to deliver.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-10-24 11:49
    The hub is requesting only 100 mA, but the Prop BOE is still requesting 500 mA via the hub, as shown below:

    So it would appear that this is what the laptop sees and rebels against. It would make more sense for the hub to modify the power request on the fly as it passes to the host or to modify the "bus-powered" attribute to read "self-powered."

    -Phil

    That is interesting...the whole reason powered hubs were popular when USB first came out is that many hosts could not provide sufficient power to the devices. I would have expected as you said, for the device request to be altered when connected to the powered hub, but I guess I didn't do my research very well at the time. I expected the powered hub to alter the request. I often used powered hubs to protect the host PC from damage more than anything. Still, interesting information. Thanks for the follow-up. :nerd:
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-24 12:03
    I plugged my PropBOE into my Acer Notebook and checked USBView.
    Even though USBView didn't show max power values for the internal hub, the ACer recognized the BOE and set it up as COM4.

    Must be hardware differences...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-24 12:18
    This just gets weirder. When I check my laptop's internal hub with Device Manager and click the "Power" tab, it states, "Total power available: 500 mA per port."

    When I plug in the 90 mA BOE, it shows up under "Attached devices" as "USB Serial Converter" with "90 mA" for "Power Required." When I plug in the 500mA BOE, I get "Unknown USB Device" and "500 mA" instead.

    BTW, the laptop's two USB ports are USB 1.1.

    -Phil
  • User NameUser Name Posts: 1,451
    edited 2013-10-24 12:44
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-24 12:52
    This just gets weirder. When I check my laptop's internal hub with Device Manager and click the "Power" tab, it states, "Total power available: 500 mA per port."

    When I plug in the 90 mA BOE, it shows up under "Attached devices" as "USB Serial Converter" with "90 mA" for "Power Required." When I plug in the 500mA BOE, I get "Unknown USB Device" and "500 mA" instead.

    BTW, the laptop's two USB ports are USB 1.1.

    -Phil

    Device Manager on my notebook shows 5 hubs (even though there are only 3 external ports & one for the webcam), four USB Host Controllers and one USB2 Universal Host Controller.
    Hard to figure out whats what!
    The hubs all show 500mA.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-24 14:16
    Phil: You did say you were using XP SP1. Perhaps there was a bug in XP SP1 that has been fixed later. IIRC there were a lot of problems with USB in the early days of windoze.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-24 14:50
    Cluso99 wrote:
    Perhaps there was a bug in XP SP1 that has been fixed later.
    And I think I found it. Just on a hunch, I reprogrammed the FTDI chip to request 498 mA instead of 500 mA. My laptop likes it! So somewhere in SP1's C code there's a line that reads something like:
    if (RequestedPower < MAX_POWER) {
      EverythingOkay()
    } else {
      Error()
    }
    

    -Phil
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-10-24 15:22
    And I think I found it. Just on a hunch, I reprogrammed the FTDI chip to request 498 mA instead of 500 mA. My laptop likes it!
    -Phil

    Great Phil! Glad you found a solution.
Sign In or Register to comment.