This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Eddystone EID slot's IK is not properly restored from flash on POR

Hi, this is for anyone having problem with the eddystone EID after reboot. There seems to be a problem that the EID slot will write the encrypted IK to flash instead of the plain one.

  • This following patch fixes the problem in SDK 12.2.0 (I think it can apply to 13.0.1alpha as well):

    diff --git a/components/libraries/experimental_eddystone/es_slot.c b/components/libraries/experimental_eddystone/es_slot.c
    index e589865..a2283e7 100644
    --- a/components/libraries/experimental_eddystone/es_slot.c
    +++ b/components/libraries/experimental_eddystone/es_slot.c
    @@ -214,7 +214,7 @@ ret_code_t es_slot_write_to_flash(uint8_t slot_no)
             {
                 m_reg.slots[slot_no].seconds  = es_security_clock_get(slot_no);
                 m_reg.slots[slot_no].k_scaler = es_security_scaler_get(slot_no);
    -            es_security_encrypted_eid_id_key_get(slot_no, m_reg.slots[slot_no].ik);
    +            es_security_plain_eid_id_key_get(slot_no, m_reg.slots[slot_no].ik);
             }
             return es_flash_access_slot_configs(slot_no,
                                                 &m_reg.slots[slot_no],
    

    We have tested it, and google recognizes the device even if it was rebooted. This was also verified by the eidtools.py.

  • Hi,

    Thank you for reporting this and for posting the patch.

    This will be fixed in the next SDK release (SDK 13.0.0).

Related