I have problems connecting to an FX9600 RFID reader configured to Secure Mode.
I can connect using RFID_Login() but RFID_Connect fails.
Code for RFID_Login:
printf("RFID_Login 1 to %s %s:%s unsecure\n", loginInfo.hostName, loginInfo.userName, loginInfo.password);
RFID_STATUS status = RFID_Login(&pAdminHandle, &loginInfo, FX, FALSE, NULL);
if (status != RFID_API_SUCCESS) {
printf("RFID_Login 2 to %s %s:%s secure\n", loginInfo.hostName, loginInfo.userName, loginInfo.password);
status = RFID_Login(&pAdminHandle, &loginInfo, FX, TRUE, NULL);
if (status != RFID_API_SUCCESS) {
printf("RFID_Login failure: %s\n", RFID_GetErrorDescription(status));
}
else {
printf("RFID_Login 2 success\n");
}
}
else {
printf("RFID_Login 1 success\n");
}
Code for RFID_Connect:
printf("RFID_Connect to %s:%d\n", readerIP_.c_str(), readerPort_);
res = RFID_Connect(&readerHandle_, const_cast<char *>(readerIP_.c_str()), readerPort_, 10000, &connectionInfo);
if (res == RFID_API_SUCCESS) {
printf("RFID_Connect success\n");
} else {
printf("RFID_Connect failure: %s\n", RFID_GetErrorDescription(res));
}
Output connecting to port 5084:
RFID_Login 1 to 10.93.30.25 admin:xxx unsecure
RFID_Login 2 to 10.93.30.25 admin:xxx secure
RFID_Login 2 success
RFID_Connect to 10.93.30.25:5084
RFID_Connect failure: Unable to open connection to reader
Output connecting to port 4085:
RFID_Login 1 to 10.93.30.25 admin:Default1! unsecure
RFID_Login 2 to 10.93.30.25 admin:Default1! secure
RFID_Login 2 success
RFID_Connect to 10.93.30.25:5085
RFID_Connect failure: Command Timeout
To me it was unexpected that a login can be made to a secure mode reader without setting the secure mode flag, but I can login, but I can't connect.
1 Replies
I have also tried adding the SEC_CONNECTION_INFO struct to CONNECTION_INFO:
Same result:
RFID_Login 1 to 10.93.30.25 admin:Default1! unsecure
RFID_Login 2 to 10.93.30.25 admin:Default1! secure
RFID_Login 2 success
RFID_Connect to 10.93.30.25:5085
RFID_Connect failure: Unable to open connection to reader