MIP Driver - Issue with Enable/Disable hardware.

Hello, I have problem with the MIP driver that I develop. It is a driver for I/O board, connection is TCP/IP based, I am using a

simple TcpClient class. The problem appears when I Disable the hardware from Recording server menu. If I try to enable it again

I receive a strange connections in the I/O board, I mean strange because if I check the log I can see that the driver is not started yet, I mean Connect method is not called yet, but I receive a connection in the board. That is really annoying beacause I need to wait probably a minute before the Connect method is executed.

So, what is hidden inside Disable/Enable actions. I guess, Disable hardware will invoke Close method from the DriverConnectionManager and will stop the poller as well. What happens when I Enable the hardware? Is there any service that is running and possible open a Connection to the board right after Enable the hardware? I know it sound stupidly. Some logs I may check, except (DriverFrameworkProcess, HardwareDriver, DriverFramework_DeviceDriver, DriverFrameworkProxy), which I already did?

Milestone version: 2021 R1

MIPSDK: 2020 R3

It is recommended to use the latest MIP SDK when developing.

Can you please tell about the strange connections? Any details on what it might be could be a valuable clue for us to find the right guidance for you.

I updated it to 2021 R2 - same issue.

I also get this error in DriverFrameworkProxy.log:

Proxy not operational - ProxyState: NotStarted, MaxHardwarePerProcess: 10, retry: True

Hi,

Ok, I will update it to the last version.

strange connections - Every time when I start the hardware driver execution (i.e. Enable the hardware or just start the Recording server) I see two consecutive connections to my board, but looks like the driver is not loaded and run yet, because input poller is not started and no log messages appears.

Hello, any idea about the issue I have. Summarized: Every time I start the recording server I receive the following events in the hardware:

wait connection

192.168.16.77

closed

wait connection

192.168.16.77

closed

wait connection

192.168.16.77

{“method”: “get-in-all”, “result”: “0111”}

{“method”: “get-in-all”, “result”: “0111”}

{“method”: “get-in-all”, “result”: “0111”}

Which should means the driver is properly attached to the hardware on the third try, also in the driver log file I can see there is a single startup attempt - that should be the last one, when the poller is started. So what the first two may be due to?

Same happens if I disable the hardware and then enable it again - the connection closes, since the hardware is disabled and then, when I enable it, two connection attempts are received in the hardware. The driver is properly attached on the second one,

again - in the driver log file I see there is a single startup attempt - the last one, when the poller is started:

closed

wait connection

192.168.16.77

closed

wait connection

192.168.16.77

{“method”: “get-in-all”, “result”: “0111”}

{“method”: “get-in-all”, “result”: “0111”}

{“method”: “get-in-all”, “result”: “0111”}

So far not so bad, because as I see the driver is started somehow. But the real problem appears if the pc has more than one IP available on the ethernet adapter, because then, somehow the first one or two connection attempts can be made from IP which is not the one used by the driver. When this happens the driver can’t attach to hardware since the socket is already occupied.

Thank you.

The system will do more than one connection to a driver for any given device. Especially if the device is not providing a constant stream of data, which I guess will be the case with your device as it is pure I/O (so no video/audio)?

Your driver should be developed so that it can handle this, and also so that it ensures to use the right local address for connecting to the device. This is entirely controlled by your code in the driver - XProtect will never attempt a direct connection to the device.