I am constructing a fingerprint reader device for opening and closing doors. As the sensor and the NodeMCU controlling it will be placed outside, it needs to be tamper resistant. One of the measures is setting the password for the Grow R503 sensor.
I debugged my code first, so I had a working sensor. Then I added the “new_password” to the code, flashed and then changed the clause to “password”. Now I have lost communication to the sensor.
Serial debug log shows:
[09:41:51][E][fingerprint_grow:410]: Unknown response received from reader: 33
[09:41:51][E][fingerprint_grow:317]: Try led_control instead
[09:41:51][E][fingerprint_grow:410]: Unknown response received from reader: 33
[09:41:51][E][fingerprint_grow:317]: Try led_control instead
[09:41:51][E][fingerprint_grow:410]: Unknown response received from reader: 33
[09:41:51][E][fingerprint_grow:317]: Try led_control instead
[09:41:51][E][fingerprint_grow:198]: Wrong password
[09:41:51][E][component:112]: Component fingerprint_grow was marked as failed.
Serial port closed!
I have defined the password in the secrets file like this:
fingerprint_scanner: "0x01234567"
And then in the code for the NodeMCU first:
new_password: !secret fingerprint_scanner
and then
password: !secret fingerprint_scanner
I can see two possible issues with this:
- I shouldn’t have added the quotes around the password
- Does the secrets mechanism work with these commands
I tried converting the strings !secret
, 0x01234567
and "0x01234567"
to Hex and used the start of the result as password, but no luck.
Did I break my sensor, any tips anyone?
UPDATE:
I modified the C-source to print the password when checking. The int32 I see in the debug log is the INT value of the HEX value of the value in my secrets file. So something must have gone wrong setting the password. Any ideas? (I debugged before setting the password. At the end of debug I set my logging to WARN, so I didn’t the the actual value set in the logs when setting the password)