FTDI Community

General Category => Discussion - Software => Topic started by: alexeiko on August 16, 2018, 10:51:14 AM

Title: [FT4232] Accessing device from different processes
Post by: alexeiko on August 16, 2018, 10:51:14 AM
Hi, All!

I'm using FT4232 for JTAG and I2C protocols. I want to ask how is it possible to access same device from a couple of different processes in windows?
I initialize channel A to MPSSE and obtain a handle for it. In another process I want to have the ability to work with this channel (already initialized). The problem is that I can't FT_Open a device which is already opened. Is there any way to obtain a handle in the new process (without first closing the device in the other process) ?

Thanks a lot!

Alexei
Title: Re: [FT4232] Accessing device from different processes
Post by: FTDI Community on August 16, 2018, 01:57:18 PM
Hi Alexei,

I'm afraid that each individual port on the device can only be opened once / with one handle. As you mentioned any further attempts whilst already open will fail.

One thing you could consider is to have a 'routing' process open which talks to the port and then pass any data to this from any other processes and it can send to the device, and vice versa for reading. That way there is only one process opening the port.

Best Regards, FTDI Community
Title: Re: [FT4232] Accessing device from different processes
Post by: alexeiko on August 22, 2018, 09:32:44 AM
Hi Alexei,

I'm afraid that each individual port on the device can only be opened once / with one handle. As you mentioned any further attempts whilst already open will fail.

One thing you could consider is to have a 'routing' process open which talks to the port and then pass any data to this from any other processes and it can send to the device, and vice versa for reading. That way there is only one process opening the port.

Best Regards, FTDI Community

Hi!

Thanks for the answer. I thought about that option but wanted to check that perhaps there is something simpler that can be done...

Alexei