We received this good question from a manufacturing partner. They did the following:
- generated a SET_CREDIT=0 keycode
- generated an UNLOCK keycode
- entered the UNLOCK keycode and showed that the unit became UNLOCKED
- entered the SET_CREDIT=0 keycode, but the Nexus Keycode Library called
nxp_keycode_feedback_start(NXP_KEYCODE_FEEDBACK_TYPE_MESSAGE_VALID)instead of requesting to set the device PAYG credit to 0.
This is expected behavior. After UNLOCK and SET_CREDIT=0 keycodes are successfully applied, they prevent older keycodes from being applied. Because the SET_CREDIT=0 keycode was generated first, it is older. The expected UI feedback is VALID to indicate that the older keycode is valid for this unit, but didn’t have any effect on the PAYG credit.
Nexus Keycode behaves this way because a SET_CREDIT=0 keycode is usually sent at the beginning of a new loan. In this case we want to prevent any older keycodes from having any effect to prevent fraud risk. UNLOCK is usually sent at the end of a loan, so again we don’t want any older keycodes to have an effect. Only the PAYG platform should have the control to re-lock a unit, if for example this unit is re-sold.