FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: FT260 UART-HID bridge problems  (Read 1015 times)

Delier

  • Newbie
  • *
  • Posts: 3
    • View Profile
FT260 UART-HID bridge problems
« on: April 21, 2021, 08:04:26 PM »

Hello,

I've got seriuos problems with getting FT260 chip to work properly as UART-HID bridge. I am using STM32 microcontroler as UART source and python program on computer to receive hid data. The problem is that when I am sending data via UART I do not get it on computer as a single packet, but always as a few smallest size packets (ID=F0) containing 1 or 2 bytes of data. There are also situations when I don't receive all data I sent. Also sometimes packets seem to contain some parts of data I tried to send, but are not marked as vaild bytes. I am pretty sure that I've got the transmission parameters right. Below I pasted example of data I receive on HID end, when I send array {1, 2, 3, 4, 5, 6, 7, 8} via UART (baud rate = 19200, parity=odd).

Any ideas why would that happen? Is there any specific way I am supposed to assemble data when I am sending it thourgh UART? Maybe I should add some kind of header and/or end sign? Or maybe there are other requirements that I missed?

Example data received by python program:
Raw data: [240, 1, 1, 0, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Raw data: [240, 2, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Raw data: [240, 2, 4, 5, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Raw data: [240, 2, 6, 7, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Raw data: [240, 1, 8, 7, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Logged

FTDI_USA

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: FT260 UART-HID bridge problems
« Reply #1 on: April 22, 2021, 07:02:26 PM »

Hello:

What OS are you using to talk with the FT260?

If you are running Windows, we offer the LibFT260 dll for configuring/communicating the FT260 as a USB-HID to UART bridge:
https://ftdichip.com/wp-content/uploads/2021/02/LibFT260-v1.1.3.zip

Best Regards,
FTDI US Support
Logged

Delier

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FT260 UART-HID bridge problems
« Reply #2 on: April 28, 2021, 09:52:06 PM »

Thank you for your reply. I am using Python on Windows. I will try porting dll to python and see if it solves my problem.
Logged

fmartinez

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: FT260 UART-HID bridge problems
« Reply #3 on: May 05, 2021, 01:18:10 PM »

Hello Delier, how are you?

We are having exactly the same problem in Windows. Could you solve it?

Thank you.
Logged

Delier

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FT260 UART-HID bridge problems
« Reply #4 on: May 05, 2021, 07:08:49 PM »

Hello!
I nearly got it working...ish. After porting LibFT260.dll to python with ctypes I am able to send and receive data. The problem is, that ever other frame I receive at pc side is corrupted and it seems pretty consistent. I am trying to find out what is causing that (no luck so far). But I think that using ctypes and dll is right direction.
Logged