Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PiSugar3 firmware update peculiarities #76

Open
mitpre opened this issue Aug 16, 2022 · 0 comments
Open

[BUG] PiSugar3 firmware update peculiarities #76

mitpre opened this issue Aug 16, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mitpre
Copy link

mitpre commented Aug 16, 2022

Environment

  • Pi hardware version: Raspberry Pi Zero W Rev 1.1
  • OS version: Raspbian GNU/Linux 11 (bullseye) (debian 11.4)
  • Application version: 1.7.1
  • PiSugar 3 firmware version: 1.2.6

When doing the firmware update of my PiSugar 3 board with curl https://cdn.pisugar.com/release/PiSugarUpdate.sh | sudo bash you should be asked the to confirm that the following is true:

WARNING:
1. PLEASE CONFIRM THAT THE BATTERY IS FULLY CHARGED
2. SYSTEMD SERVICE pisugar-server MUST BE STOPPED
OTHERWISE UPGRADE MAY NOT SUCCEED!!!
CONFIRM? (y or n):

However, the script just flies past this point and continues without any input. Then at the end, few seconds after the update is completed as successful with the following message:

Upgrade finished!
Wait 1s, PiSugar will jump to application soon!
Wait for five seconds
Starting pisugar-server...
Upgrade complete!
If you need help, visit https://github.com/PiSugar/

You get the following message to the terminal Low battery, will power off after 16 seconds and soon thereafter everything powers off.

The PiSugar logs are the following:

Aug 15 16:43:27 rolete systemd[1]: Stopping pisugar-server...
Aug 15 16:43:28 rolete systemd[1]: pisugar-server.service: Succeeded.
Aug 15 16:43:28 rolete systemd[1]: Stopped pisugar-server.
Aug 15 16:43:28 rolete systemd[1]: pisugar-server.service: Consumed 3.056s CPU time.
Aug 15 16:44:01 rolete systemd[1]: Started pisugar-server.
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_core::pisugar3] PiSugar3 battery bus: 0x01 addr: 0x57
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_server] TCP listening...
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_server] WS listening...
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_server] UDS listening...
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_server] Http web server listening...
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_core] Init rtc...
Aug 15 16:44:01 rolete pisugar-server[548]: [2022-08-15T14:44:01Z INFO  pisugar_core] Init battery...
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Battery low: 0
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Low battery, will power off after 16 seconds
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Battery low: 0
Aug 15 16:44:07 rolete pisugar-server[555]: Shutdown scheduled for Mon 2022-08-15 16:44:07 CEST, use 'shutdown -c' to cancel.
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Battery low: 0
Aug 15 16:44:07 rolete pisugar-server[559]: Shutdown scheduled for Mon 2022-08-15 16:44:07 CEST, use 'shutdown -c' to cancel.
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Battery low: 0
Aug 15 16:44:07 rolete pisugar-server[561]: Shutdown scheduled for Mon 2022-08-15 16:44:07 CEST, use 'shutdown -c' to cancel.
Aug 15 16:44:07 rolete pisugar-server[548]: [2022-08-15T14:44:07Z WARN  pisugar_server] Battery low: 0
Aug 15 16:44:08 rolete systemd[1]: Stopping pisugar-server...
Aug 15 16:44:10 rolete systemd[1]: pisugar-server.service: Succeeded.
Aug 15 16:44:10 rolete systemd[1]: pisugar-server.service: Unit process 562 (sh) remains running after unit stopped.
Aug 15 16:44:10 rolete systemd[1]: pisugar-server.service: Unit process 563 (shutdown) remains running after unit stopped.
Aug 15 16:44:10 rolete systemd[1]: Stopped pisugar-server.
Aug 15 16:44:10 rolete pisugar-server[563]: Failed to call ScheduleShutdown in logind, no action will be taken: Message recipient disconnected from message bus without replying

The first four lines are for shutting the server down by the firmware update script. Then update happens, and afterwards the pisugar-server is started again with the fifth line.

@mitpre mitpre added the bug Something isn't working label Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants