Possible to hook up two FT232H back to back? - Page 1
Forum section: electronics / general

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 01, 2016, 06:15:41 pm
content: The aim is to transfer data from USB of PC(1) to USB of another PC(2) at Hi-Speed (FT232H datasheet states upto 40MBps for Synchronous FIFO and 8MBps for async FIFO modes).1. Two FT232H would be used back to back.2. The setup would be PC1(USB) -> FT232H -> ASYNC OR SYNC FIFO -> FT232H -> PC2(USB)3. To simplify things PC1 will be send only and PC2 will be receive only.The questions that come up are1. Can two FT232H be used in standalone mode no uC or anything else and manage HI-Speed data transfer.2. Would some sort of handshaking be needed to prevent buffer overflows etc. on does the FT232H handle this internally.Any comments on the above are highly appreciated.RegardsZR

author: janoc
author_rank: Super Contributor
timestamp: August 01, 2016, 06:29:00 pm
content: Afaik, if you need anything else than the default UART mode, you will need to tell the chip that you want something else from it. That is usually done from the PC using the various libraries and driver.Otherwise yes, it should work back to back. On the other hand, wouldn't it be easier to just network the two machines? Ethernet gives you even galvanic isolation (no ground loops!) and it is certainly going to be faster than this hack.What is the problem you are attempting to solve?

author: ebclr
author_rank: Super Contributor
timestamp: August 01, 2016, 08:41:25 pm
content: Just connect TX1 to RX2 and RX1 to Tx2 Gnd1 to Gn2 , and transmit with a flow control protocol like zmodem, You will need a software on both PC sidesOne possible suggestionhttps://sourceforge.net/projects/qodem/

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 02, 2016, 03:10:05 am
content: Quote from: janoc on August 01, 2016, 06:29:00 pmCorrect, as per the datasheet for Sync FIFO the FT232H needs to be configured by a EEPROM connected to the chip and also by software command something similar also for the Async FIFO mode.QuoteA few questions that arise are:1. What sort of connections would the two chips need.2. In Sync FIFO mode each FT232H would generate its own clock out and the data would be in sync with this so that would be a issue how to sync both the FT232H.3. In Async FIFO takes the clock out of play and on paper looks a bit easier than Sync FIFO but its lower speed than Sync.4. How would the sender know when to stop sending data, does the FT232H signal that its buffer is full and so cannot accept data, otherwise there might be data loss due to buffer overflow etc.5. What about power how to bus powered these 2, as you would be getting power on board from 2 seperate PC's.Regarding Ethernet yes it seems a better idea but one of the conditions is purely one way traffic and that might be difficult to achieve with ethernet also there is only 1 ethernet port per PC while with USB you could typically have upto 6.QuoteIts a one way connection with data flow to be purely one way and no data should be possible to move the other way around.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 02, 2016, 03:11:58 am
content: Quote from: ebclr on August 01, 2016, 08:41:25 pmYes that would have been an option but that mode is slow, for the FT232H its about 12MBaud, I would prefer the FIFO modes that give higher transfer rates.

author: MarkF
author_rank: Super Contributor
timestamp: August 02, 2016, 03:19:51 am
content: I have 2 DLP Design DLP-2232PB-G modules with FT2232 chips. I have successfully been able to connect the 2 modules to one PC. I see no reason why two FT232 chips shouldn't also connect to a PC.You will probably need a MCU or hardware logic to read the data from the FT232 chips.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 02, 2016, 03:41:13 am
content: Quote from: MarkF on August 02, 2016, 03:19:51 amI want to connect 2 pc's with the FT232H, as given in my original post PC(1) -> FT232H(1) -> FT232H(2) -> PC(2), and also want to know if this would be possible without a uC.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 02, 2016, 07:23:14 am
content: XY Problemalert.They've invented Ethernet for this.But if you insist in using usb-serial bridges. Used the api to get paralleled communication working in a small app.You might get 10 Mbaud. But you're not limited to amount of bridges you use. Apart from the number of usb hubs you can connect before the root hubs are saturated.Why do you think you must need an uC? FTDI's are fully controlled by the USB host.

author: tszaboo
author_rank: Super Contributor
timestamp: August 02, 2016, 07:45:04 am
content: Yes, you can do this. In fact, I've seen cables like this. Be careful with the maximum speeds, reaching them could be a challenge. OS overhead can be huge, it is possible that you need to use the "non serial port" drivers, and I think 40 Mbit is only for a burst.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 02, 2016, 08:05:22 am
content: Quote from: ZeroResistance on August 02, 2016, 03:10:05 am

author: Kilrah
author_rank: Unknown
timestamp: August 02, 2016, 08:13:15 am
content: Quote from: Jeroen3 on August 02, 2016, 07:23:14 amWoot, didn't know someone had a name for it! I'll refer this link way too often now...Quote from: ZeroResistance on August 02, 2016, 03:10:05 amSee above, what's the reason for that? Could be a misunderstood intent, something that doesn't make sense at all and there's no actual reason to enforce, etc... Always good to clarify the request first.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 02, 2016, 09:20:12 am
content: Quote from: ZeroResistance on August 02, 2016, 03:10:05 am- You're adding hardware anyway. Is it a usb device, or a pci device, does it matter? (hint: you can buy usb ethernet)- Tell the firewall to only accept outgoing UDP.

author: janoc
author_rank: Super Contributor
timestamp: August 02, 2016, 10:11:16 am
content: Quote from: Jeroen3 on August 02, 2016, 09:20:12 amI can actually understand the need to have a purely one way link in an environment where you don't 100% control the OS, so you can't know what it is going to send (e.g. Windows ...). If you physically cut/don't connect the line, then the there won't be any spurious transmissions no matter what the OS does, period. This is often used for forensics, honeypot setups, reverse engineering, secure logging and similar.On the other hand, unless this is for some sort of high security forensics setup or something of that sort, I would still go with ethernet and firewalls, as you wrote. The USB bridge would require adding software on the monitored system, which could be actually unacceptable in some cases. However, that is difficult to judge without knowing more about the problem being solved.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 02, 2016, 10:44:42 am
content: There are still ways to hack ethernet into simplex. But that deviates from acceptable standards just as much as a custom usb-serial-usb link.

author: ebclr
author_rank: Super Contributor
timestamp: August 02, 2016, 11:19:27 am
content: FT is just a totally unnecessary layer that you must avoidhttp://pt.aliexpress.com/item/Hot-High-Speed-USB-PC-To-PC-Online-Share-Sync-Link-Net-Direct-Data-File-Transfer/32607565108.html?spm=2114.02010208.3.2.AN68w7&ws_ab_test=searchweb201556_10,searchweb201602_3_10057_10056_10055_10037_10049_10033_10059_10058_10032_10017_405_404_10060_10061_10062_412,searchweb201603_7&btsid=a5efbca3-f55e-413d-81bd-f0767d16c818

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 02, 2016, 06:33:50 pm
content: Quote from: Jeroen3 on August 02, 2016, 07:23:14 amI was wondering who handles flow control does the FTDI driver manage this on the PC side ? How does the chip signal to the PC that its internal buffer is full and that the PC shouldn't send more data to prevent buffer overruns.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 02, 2016, 06:38:08 pm
content: Quote from: NANDBlog on August 02, 2016, 07:45:04 amYes FTDI does sell a cable but it is only capable of reaching 3MBaud and uses the FT232R Full-Speed chip and they use these in probably the UART mode. I am trying to use USB Hi-Speed chip FT232H and trying to achieve upwards of 8MBps. and BTW the datasheet states that this chip can reach upto 40MBps (Megabyte) not 40Mbit /s.Since I want to use the chips in FIFO modes I was trying to see what kind of connections would I need between these 2 chips?

author: Jeroen3
author_rank: Super Contributor
timestamp: August 02, 2016, 07:45:51 pm
content: Quote from: ZeroResistance on August 02, 2016, 06:33:50 pmOn the uart side: CTS and RTS signals.On the USB side: ftdi's driver of course. What else?Also a pc has a somewhatinfinitebuffer capabilities on modern pc's. They default to 4096 bytes iirc, and otherwise the call will just return and fail or block depending on the implementation of the application.Those USB to USB cables are not plu&play. You'll need ancient weird software to actually use them. The idea is nice, but they've lost big time from Ethernet.

author: janoc
author_rank: Super Contributor
timestamp: August 03, 2016, 02:28:25 pm
content: Quote from: Jeroen3 on August 02, 2016, 07:45:51 pmActually you may also need some software to actually set the chips in the right mode, unless you design in a pre-programmed EEPROM. The high speed modes are not the default.

author: free_electron
author_rank: Super Contributor
timestamp: August 03, 2016, 05:09:51 pm
content: Quote from: ZeroResistance on August 02, 2016, 03:41:13 amyes it can be done. very simple. wire TXD of one device to RXD of the other. wire RXD of on to TXD of the other ( essentially cross TXD and RXD between devices)do the same with CTS and RTS linesdo the same with DTS and DTR linesthis cable will behave as a null-modem cable and you can use any terminal program to transfer data. Select hardware handshaking and the FTDI chips will handle everythings ( that is why i wired up the handskae lines )

author: Kilrah
author_rank: Unknown
timestamp: August 03, 2016, 05:33:02 pm
content: One more who didn't read the thread

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: August 03, 2016, 06:22:55 pm
content: QuoteThanks for the info. What you are talking about is wiring the chips in UART mode.But I'm specifically looking for FIFO modes of transfer (either sync or async) in these modes offer higher transfer rates than UART mode.In sync mode data flows into and out of the chips via a 8bit bus at 60Mhz rate the clock is generated by the chip itself andIn async mode this clock is not generated but data flows are controlled by other signals.The link to the pdf is herehttp://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232H.pdfThe relevant modes are given on Pg 28 onwards.If I understand it correctly the Sync FIFO mode would be difficult to run in standalone mode without using external logic the async mode might still be possible but haven't figured out yet how it would work out.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 03, 2016, 07:42:05 pm
content: Quote from: janoc on August 03, 2016, 02:28:25 pmThen use the FT232R with their FT Prog tool.

author: free_electron
author_rank: Super Contributor
timestamp: August 06, 2016, 05:24:12 am
content: Quote from: ZeroResistance on August 03, 2016, 06:22:55 pmput both sides in 245 emulation mode ( parallel mode. wire up the hold pins to the fifo full pin. program the fifo full to trip at roughly 3/4 of fifo.245 mode has two handshake signals. you can simply cross those. all you need is a master clock generator to drive both channels.