# PMS HAT in state lock after used reset\_for\_boot\_update() python classe

**URL:** <https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372>\
**Category:** Power Management & UPS HAT\
**Created:** [June 7, 2020, 5:50pm UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372 "2020-06-07T17:50:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adm](https://community.sixfab.com/user_avatar/community.sixfab.com/adm/32/125_2.png) [@adm](https://community.sixfab.com/u/adm)\
**Post date:** [June 7, 2020, 5:50pm UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372/1 "2020-06-07T17:50:08Z")

</div>

Hi,  
Without understanding the consequences I used reset\_for\_boot\_update() classe of power\_api and after restarting my system my HAT PMS seem to be is locked state.

**The LEDs L1 and L2 flash quickly with a white color for less than a second and stop for about 4 seconds before starting the cycle again. The power LED is green. The HAT fan runs continuously.**

1. In /var/log/daemon after starting the pms\_agent.service service I find:

tail -f /var/log/daemon.log | grep python3

Jun 7 18:56:39 b0x python3 [11344]: DEBUG: root: [FEEDER] Starting, locking  
Jun 7 18:56:39 b0x python3 [11344]: Received CONNACK (0, 0)  
Jun 7 18:56:39 b0x python3 [11344]: Connected to the server  
Jun 7 18:56:39 b0x python3 [11344]: Sending SUBSCRIBE (d0, m1) [(b ‘/ device / Vice-Wife-Dish-….-Juror / directives’, 0)]  
Jun 7 18:56:39 b0x python3 [11344]: Sending PUBLISH (d0, q0, r1, m2), ‘b’ / device / Vice-Wife-Dish-……-Juror / status ‘’, … (19 bytes)  
Jun 7 18:56:39 b0x python3 [11344]: Received SUBACK  
Jun 7 18:56:40 b0x python3 [11344]: error in 0  
Jun 7 18:56:40 b0x python3 [11344]: Received PUBLISH (d0, q0, r0, m0), ‘/ device / Vice-Wife-Dish-….-Sift-Juror / directives’, … (56 bytes)  
Jun 7 18:56:40 b0x python3 [11344]: DEBUG: root: Setting RTC time to UTC + 2  
Jun 7 18:56:40 b0x python3 [11344]: error in 0  
Jun 7 18:56:40 b0x python3 [11344]: ERROR: root: # 033 [33m [setRtcTime] # 033 [0m TypeError raised, clearing pipe  
Jun 7 18:56:40 b0x python3 [11344]: ERROR: root: [setRtcTime] trying again  
Jun 7 18:56:41 b0x python3 [11344]: DEBUG: root: [FEEDER] Starting, locking  
Jun 7 18:56:43 b0x python3 [11344]: error in 0  
Jun 7 18:56:43 b0x python3 [11344]: ERROR: root: # 033 [33m [setRtcTime] # 033 [0m TypeError raised, clearing pipe  
Jun 7 18:56:44 b0x python3 [11344]: ERROR: root: [setRtcTime] trying again  
Jun 7 18:56:44 b0x python3 [11344]: error in 1  
Jun 7 18:56:44 b0x python3 [11344]: ERROR: root: # 033 [33m [setRtcTime] # 033 [0m TypeError raised, clearing pipe  
Jun 7 18:56:44 b0x python3 [11344]: ERROR: root: [setRtcTime] trying again  
Jun 7 18:56:47 b0x python3 [11344]: error in 0  
…

1. root@b0x:~# systemctl status pms\_agent.service

● pms\_agent.service - Sixfab PMS Agent  
Loaded: loaded (/etc/systemd/system/pms\_agent.service; enabled; vendor preset: enabled)  
Active: active (running) since Sun 2020-06-07 19:06:24 CEST; 40s ago  
Main PID: 17267 (python3)  
Tasks: 3 (limit: 4915)  
Memory: 6.9M  
CGroup: /system.slice/pms\_agent.service  
└─17267 /usr/bin/python3 -u agent.py

Jun 07 19:06:53 b0x python3[17267]: error in 1  
Jun 07 19:06:54 b0x python3[17267]: DEBUG:root:[FEEDER] Starting, locking  
Jun 07 19:06:56 b0x python3[17267]: error in 0  
Jun 07 19:06:57 b0x python3[17267]: DEBUG:root:[FEEDER] Starting, locking  
…

The power\_api documentation for reset\_for\_boot\_update() classe said  
Function for resetting MCU and go to boot mode.

Can you help me out of this state ?  
Thank you in advance  
Alexandre

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [June 9, 2020, 9:40pm UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372/2 "2020-06-09T21:40:15Z")

</div>

Hi @adm,  
It’s normal. The UPS HAT goes to bootloader mode so it only responds to firmware requests.

---

<div class="post-metadata">

**Author:** ![adm](https://community.sixfab.com/user_avatar/community.sixfab.com/adm/32/125_2.png) [@adm](https://community.sixfab.com/u/adm)\
**Post date:** [June 10, 2020, 7:55am UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372/3 "2020-06-10T07:55:38Z")

</div>

@ensar  
Does it have a procedure to get the UPS HAT out of this state ?  
Thanks

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [June 12, 2020, 9:24am UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372/4 "2020-06-12T09:24:56Z")

</div>

You need to reset your HAT.  
Shorten the GND and RESET pins(shown in the figure below) to reset the HAT, which shifts to normal mode and then reboot.

 ![power_hat](https://community.sixfab.com/uploads/default/original/1X/5b79f3d2ebf6af9448811fa68adb270963d71caa.png)

---

<div class="post-metadata">

**Author:** ![adm](https://community.sixfab.com/user_avatar/community.sixfab.com/adm/32/125_2.png) [@adm](https://community.sixfab.com/u/adm)\
**Post date:** [June 14, 2020, 10:25am UTC](https://community.sixfab.com/t/pms-hat-in-state-lock-after-used-reset-for-boot-update-python-classe/372/5 "2020-06-14T10:25:57Z")

</div>

Everything is OK now 👍  
Many thank
