Zero Lipo software causes Failed to Authenticate error


#21

No worries! I hate having to drag you through the debug process, but you’re my only hope of figuring out what’s wrong. Thanks for your patience!

Yup. Just the one liner. We’re going to go through the cleanshutdown installer step-by-step and see where it goes horribly wrong, then try to figure out why.

Like all great bugs, however, I fully expect the answer to be something really obtuse that I haven’t even thought of.


#22

No problem at all, if it helps to try get it resolved. It took me so long to get the tiny 4wd working (through lack of understanding) I’ll do anything to not mess it up now! Just confirm, I’m waiting for a lipo battery to arrive so I’ve not plugged anything into the zerolipo yet. I assume I shouldn’t until the installer works anyway. I was powering the tiny 4wd off a USB power bank.


#23

Did you run the installers at all while running off the USB power bank?

It wont do any immediate harm to plug in a LiPo, even without the software installed. The risk is that the battery safe shutdown limit will be reached and power abruptly cut to the Pi which may or may not corrupt the filesystem.


#24

No, once the issue with authentication arose, I stopped trying the zerolipo installers, got the tiny 4wd working on a fresh full raspbian install while plugged into the mains, and then tried the USB power bank. I haven’t touched that SD card since other than to backup the img., and was hoping to get the zerolipo resolved while waiting on the lipo battery.


#25

In reply to an earlier question, I didn’t ever get it working.


#26

Well I’ve replicated the same setup as best I can on a Pi Zero W, with a 2.5A Pi Power supply, one of our SD cards, and the latest Raspbian Lite, but I can’t make it produce the “Failed to Authenticate” error for love nor money.

There must be some permutation of factors I’m missing.

Actually, thinking about it, I wasn’t using WiFi so I’m going to have to go back, erase my SD card and try again exclusively over WiFi tomorrow.

@Gruntplace sorry if you’ve answered this already, but what mains power supply are you using?

Same question to @hystrix

And what are you using to control the Pi when performing the install, a mouse/keyboard (if so, how are they connected?) or SSH?


#27

Hi,
I tried typing in…

git clone https://github.com/pimoroni/clean-shutdown

And got ‘-bash: git: command not found’. Should I be using sudo or curl before that? Sorry, total noob!

As for the power supply, official raspberry as per photo


#28

Power supply code Pimoroni RPI-012.

I’ve used both Ssh and bluetooth dongle keyboard direct. Today was direct, not ssh with this keyboard/dongle and hdmi to tv. And I’ll stick with that while running through your instructions.


#29

Oh sorry- sudo apt install git first if you’re using lite.


#30

Thanks. Sorry, I was going to try that but thought I’d better only do exactly as I am told so you’ll know what’s been done.
So I did that, rebooted and ran ‘git clone… clean-shutdown’ and got the following


#31

That’s a start. Thank you!

Could you:

sudo apt install raspi-gpio
sudo reboot

And see what happens.

Then:

cd clean-shutdown
sudo cp ./daemon/etc/init.d/cleanshutd /etc/init.d/
sudo cp ./daemon/usr/bin/cleanshutd /usr/bin
sudo chmod +x /usr/bin/cleanshutd
sudo reboot

And again, see if it implodes!


#32

Thanks for your patience.
I hope I’ve done this right and all of the above are individual entries. Results below and no probs logging in after reboot.


#33

Looks like you’ve nailed it.

Next lines:

sudo cp ./daemon/etc/cleanshutd.conf /etc/
sudo nano /etc/cleanshutd.conf

And make sure the config file looks like this:

daemon_active=1
trigger_pin=4
led_pin=off
poweroff_pin=off
hold_time=0
shutdown_delay=5
polling_rate=1

Ctrl+X and follow instructions to exit, then reboot again.


#34

That didn’t seem to work, unless there is a typo?


#35

Oh sorry, you’ve rebooted so you’ll need to:

cd clean-shutdown

again, to be in the right working directory.


#36

No probs. I had to change the config from pic below to match yours.
Reboot and logged in fine.


#37

Annnd finally:

sudo systemctl enable cleanshutd
suso reboot

(It’s really hard to convince a phone to write sudo)


#38

Ha, I know! Thanks for your help. I did that and rebooted and I’m afraid I couldn’t log in… Pics below just before and after reboot.



#39

I think it actually shut itself down there when I went to just try insert ‘pi’ again although I may have mashed the keys a bit. Tried again on starting up and no joy


#40

Oooh yes now it’s shutting down because the Zero LiPo thinks it has a low battery- behaving as intended, for better or worse. It should be possible to prevent that but I need to not be looking it up via a phone!