Skip to content

80 Mech Setting (Mechanical Settings) ​

MechSetting is the mechanical setting of Sesame5, including the number of autolock seconds and the angles of unlocking and locking in Sesame5.

There are two situations for transmitting MechSetting:

  • The APP actively requests MechSetting from Sesame5.
  • Sesame5 actively pushes MechSetting to the mobile phone.

Sequence diagram of the interaction between the mobile phone and ssm5 transmitting mechsetting ​

The APP actively requests MechSetting from Sesame5.

Sesame5 actively pushes MechSetting to the mobile phone.

APP request command ​

Byte5 ~ 10
DatamechSettingitem code

item code : SSM2_ITEM_CODE_MECH_SETTING (80)

mechSetting : Mechanical settings

ssm5 response message ​

Byte210
Dataresitem_codetype
DescriptionCommand Processing StatusCommand NumberPush Type

type : SSM2_OP_CODE_RESPONSE (0x07)

item code : SSM2_ITEM_CODE_MECH_SETTING (80)

res : CMD_RESULT_SUCCESS (0x00)

ssm5 push content ​

ByteN ~ 210
Datapayloaditem_codetype
DescriptionData sent to mobile phoneCommand NumberPush Type

type : SSM2_OP_CODE_PUBLISH (0x08)

item code : SSM2_ITEM_CODE_MECH_SETTING (80)

payload : See the following table for details

payload ​

Bit5 ~ 0
DatamechSetting

mechSetting Structure Content ​

MechSetting stores the number of autolock seconds and the angles of unlocking and locking in Sesame5. Below is the structure content of MechSetting:

Byte5 ~ 43 ~ 21 ~ 0
Dataautolock_secondunlocklock
DescriptionAuto-lock TimeUnlock AngleLock Angle
c
typedef struct door_lock_unlock_s {
    int16_t lock;
    int16_t unlock;
} door_lock_unlock_t;

typedef struct mech_setting_s {
    door_lock_unlock_t lock_unlock;
    uint16_t auto_lock_second;
} mech_setting_t;

iOS, Android, ESP32 examples ​