Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with the new firmware of Anviz facepass7 #48

Open
ivigo91 opened this issue Sep 19, 2020 · 4 comments
Open

Errors with the new firmware of Anviz facepass7 #48

ivigo91 opened this issue Sep 19, 2020 · 4 comments

Comments

@ivigo91
Copy link

ivigo91 commented Sep 19, 2020

I am testing with a new Anviz Facepass7 device. The firmware has been updated to version 03.20.69.

I'm trying to enroll a user with the following code (modified from the 'FacepassExample' method):
if (!dict.ContainsValue("TEST"))
{
ulong employee_id = 5;
var fp = await device.EnrollFingerprint(employee_id, 1);
var employee = new Anviz.SDK.Responses.UserInfo(employee_id, "name");
await device.SetEmployeesData(employee);
await device.SetFaceTemplate(employee.Id, fp);

            //var employee = new Anviz.SDK.Responses.UserInfo(stats.UserAmount + 1, "TEST");
            //await device.SetEmployeesData(employee);
            //Console.WriteLine("Created test user, begin fp enroll");
            //var fp = await device.EnrollFingerprint(employee.Id);
            //await device.SetFingerprintTemplate(employee.Id, Anviz.SDK.Utils.Finger.RightIndex, fp);
        }

I get the registration to be enabled on the anviz device and it picks up my face but I find an error in 'await device.SetFaceTemplate(employee.Id, fp);'

The excepcion is:

System.Exception: 'Device connection lost.'

This error is controlled in :
'AnvizStream.cs':

public async Task SendCommand(Command cmd)
{
if (!DeviceSocket.Connected)
{
throw new Exception("Device is not connected.");
}
ResponseCode = cmd.ResponseCode;
await cmd.Send(DeviceStream);
taskEmitter = new TaskCompletionSource();
var result = await taskEmitter.Task;
if (result == null)
{
throw new Exception("Device connection lost.");
}
return result;
}

Despite de error, the user is on registration to the device but without face register
I've tried to change the order of the methods (as made for the fingerprint registration) but it appears the same error. The code for this test is :

   if (!dict.ContainsValue("TEST"))
            {
                //ulong employee_id = 5;
                //var fp = await device.EnrollFingerprint(employee_id, 1);
                //var employee = new Anviz.SDK.Responses.UserInfo(employee_id, "name");
                //await device.SetEmployeesData(employee);
                //await device.SetFaceTemplate(employee.Id, fp);

                var employee = new Anviz.SDK.Responses.UserInfo(stats.UserAmount + 1, "TEST");
                await device.SetEmployeesData(employee);
            //    Console.WriteLine("Created test user, begin fp enroll");
                var fp = await device.EnrollFingerprint(employee.Id,1);
                await device.SetFaceTemplate(employee.Id, fp);
            }

On this test doesn't even save the user on anviz device.

Any idea what may be happening? thank you in advance.

@Meswy
Copy link

Meswy commented Sep 23, 2020

Hi, i think the new sdk (31/07/20) has been changed. I have requested it from anviz recently. As soon as they send it to me I will do tests.

Does anyone have it?

Thx.

@xiltoos
Copy link

xiltoos commented Oct 12, 2020

Hello, i confirme that method SetFaceTemplate not work in the last firmware version 03.20.78.

Error message: "RET: FAIL"

SDK v45
https://drive.google.com/file/d/14HThV8qT7aOlLN8Q6cotHTY6pnk5r_Sk/view

Can help?

Thanks Gildo

@Jones9854
Copy link

Hi @xiltoos, I have access to a Face Deep 5 clock but would need some guidance how to fix this issue using WireShark. Are there any resources or suggestions on how to approach this? Thanks, Christian

@palanikumar32
Copy link

I faced the same error "Device connection lost." in Face Deep 3 device. This was resolved by enabling AuthenticateConnection to true.

var manager = new AnvizManager();
manager.AuthenticateConnection = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants