MxLabs / Anviz

.NET library to access and control Anviz devices.
MIT License
33 stars 17 forks source link

Device Timeout Waiting Response #62

Closed MCutrin closed 2 years ago

MCutrin commented 2 years ago

Hi everyone and thanks in advance for taking the time to read my issue.

I am developing a little VB.NET program that connects to an ANVIZ VF30 Pro in order to save all the user record data and integrate it with an ERP. I have been doing many tests: saving users, deleting them, enroling finger prints, getting data, etc. Everything was going perfectly until today, that suddenly, the Connect function is giving me the "Device timeout waiting response" error.

The device is correctly configured in the LAN and there is a succesfull Ping from my PC's command window.

I am a little bit frustrated since there is nothing that I have changed since the last time I made some tests and everything was working correctly.

I will leave my piece of code, but it is so simple that I doubt it makes any difference:

        Dim L_Manager As AnvizManager
        L_Manager = New AnvizManager
        '-------------------------------------------------------------------------------------------
        L_Manager.ConnectionUser = "0"
        L_Manager.ConnectionPassword = "12345"
        '-------------------------------------------------------------------------------------------
        Dim L_Device As AnvizDevice
        '-------------------------------------------------------------------------------------------
        Try
            L_Device = Await L_Manager.Connect("192.168.8.62")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Any help will be appreciated, thank you.

JohnKiller commented 2 years ago

Hi, If you have set a device password for the communication protocol, you must also set L_Device.AuthenticateConnection to true. It could also be that another device on your network is stealing its IP address. Does the official software work?

MCutrin commented 2 years ago

Hi! Thanks for your reply!

I kept trying different alternatives and I think that the problem was that the Wi-Fi mode was active, instead of only Ethernet, I'm not totally sure about this though.

Regarding to the line you mention, L_Device.AuthenticateConnection = True, it seems that in my case the connection is only working if I don't add this line to my code.

I'm not really sure if any of my reasons are true or if it was just a matter of bad luck, but apparently the connection is working again, so I will take that!

Thanks again for the fast response!