Camble's Safe Shutdown and Minty Battery Monitor Problems

Having trouble with your GBZ build? Ask your questions here!
User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 1:56 pm

This is the first time I'm trying this combination, and I can't for the life of me figure out what's going wrong. I spent all day on it yesterday and got nowhere. I think it's software - all the hookups seem OK, as far as I can tell. Hopefully someone has some ideas for me, because I've tried going through the forums, and what I can find buried in there, I have tried, but still can't get this working.

Setup: I have Camble's Safe Shutdown, an Adafruit Powerboost 1000C, and an ADS1015 for the battery monitor. I'm running my buttons through the GPIO with Retrogame. This is basically what my setup looks like: viewtopic.php?f=42&t=4585&start=130#p67718 but with the adafruit PB and i also have a tactile switch to gpio 7 for the battery monitor button.

With just Retrogame installed, it works fine and picks up the buttons great. As soon as I install the Minty Combo script, Retrogame seems to stop working (no buttons register) until I comment out the Minty script call in rc.local again. I never get the battery indicator to show up. I do see an error early on the Minty install that says "libsdl1.2-dev" install failed due to dependency "libcaca-dev" but I cannot seem to do anything about that. Manual install for that lib gives the same message, and manually installing the depencies said they were up-to-date.
SpoilerShow
battery_monitor_error.png
battery_monitor_error.png (38.63 KiB) Viewed 6569 times
The Safe Shutdown doesn't seem to be working either. I went through the install steps on github, and sometimes it does do something but I don't think it's the correct thing, and sometimes it just acts as a power switch. Sometimes it's like the switch gets disabled and does nothing at all, and I have to pull the battery to shut it off.

When it has "worked" it triggers the same process as if I selected "shut down system" in EmulationStation, which goes through shutting all the services off, and then calls a "shutdown", but then that's where it gets weird again - It throws a bunch of errors around "Kernel Panic" and doesn't shut the pi off. I found that I could add "kernel_panic=1" to /etc/sysctl.conf which makes it do a reboot when that occurs, and then after that reboot starts up, it actually does shut off. But that doesn't seem like the correct functionality (is it?).

I've tried on multiple fresh, new RetroPie installs, and also gave Tinkerboy's image a try, but didn't have any different results there.

Also - for some reason the wifi in the Pi0 i'm using in the build doesnt work, but everything else seems fine, so whenever I need to ssh in or download/update anything, I have to pull the card out and use a different pi0 to do that. I don't know if that could be messing with something, but it didn't seem likely. They are both the same model pi.

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by VeteranGamer » Sun Mar 03, 2019 2:53 pm

Personally I don't like this combination (Camble Safe Shutdown and the ADS1015)
but that's not to say it wont work......


Retrogame and the MintyBatteryMonitor shouldn't have any issues with each other....

Make sure that the GPIO arent conflicting
GPIO 7 for the Safe Shutdown (can be changed, but also isn't needed if you have Camble Safe Shutdown... leave/ignore this )
GPIO 19 for the monitor enable (just change to which ever button you prefer to enable, based on that GPIO)

Most importantly....
make sure you install the MntyBatteryMonitor with out any issues

https://github.com/HoolyHoo/Mintybatterymonitor

and that you enabled i2C via Raspi-Config (interfacing option) before starting any installation...



as for Cambles Safe Shutdown....
Make sure everything is wired up as it should be....
Make sure you install it correctly (personally I don't test it during the install process, miss/leave that bit out)
But
I've always had issues with it when trying to install/enable it on
RetroPie 4.4
there have also been others that have had similar issues, and have some solutions to these issues

viewtopic.php?f=38&t=2260

my personal work around for this is to just use RetroPie 4.3....
its not completely ideal, as there is a v4.4....
but if you have a look at the updates, there isn't a considerably benefit from one version to the next especially if your using a RPi0





.
Last edited by VeteranGamer on Sun Mar 03, 2019 8:01 pm, edited 1 time in total.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 4:15 pm

thanks. is there a reason why you don't like that combo? i was trying to make one that was the easiest to use for someone not terribly tech-savvy, so that seemed like the best options.

i am using pin 19 for my face buttons currently, but I didn't see that anything that i was loading was using that. i was installing the minty combo script: https://github.com/HoolyHoo/MintyComboScript which has that monitor in it but i thought only used pins 2, 3, and 7. i will try just the battery script, and see if it works any better. the only error i could see is the one i mention above with the dependencies.

i2c sounds like it might be at least one of my issues - do think i have it disabled in raspi-config, but i'm pretty sure i tried it both enabled and disabled in the config.txt.

the safe shutdown - when i did try the manual "test", it did the same thing as I describe, ending with the "Kernel Panic" - as far as i can tell, everything is wired correctly - the pins for the powerboost all match up, and the three going to the pi seem to be in the right pins (17, 27, and 22 as well as the 3v).

My next thought was to try older retropie images, so maybe I'll do that first and see if I have luck there. it's good to hear I'm not alone in having issues at least. I tried going through that Safe Shutdown thread, but since it's 27 pages, it's really tough to find the useful info in there.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 5:02 pm

is this also a problem?

digging around a little in the minty combo script, it's got these:

Code: Select all

functionPin = grabPin(pinFile, pinDirectory)
functionBtn = Button(functionPin)
brightnessUpBtn = Button(4)
brightnessDownBtn = Button(5)
volumeUpBtn = Button(22)
volumeDownBtn = Button(14)
shutdownBtn = Button(26)
monitorBtn = Button(21)
wifiBtn = Button(20)
bluetoothBtn = Button(16)
cheatBtn = Button(6)
are those mapping to gpio pin numbers? should those all map to the same pins as i have in retrogame?

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by VeteranGamer » Sun Mar 03, 2019 5:26 pm

The main reasons I don’t like the combo....

Is that both have a
Safe Shutdown function
and a
Low Battery Indicators

Which means there is a possibility of a conflict...

The Safe Shutdown function isn’t something that is a major concerns, as all you have to do is just not use the one in the MintyBatteryMonitor...
(No need to even wire it up)

The low battery indicators on the other hand could be the thing that causes a conflict....
From my basic knowledge...
You can’t turn off/mute this in the MintyBatteryMonitor...
You do have a option with Camble Safe Shutdown...
But I’ve never disabled it, and from reading up on the issues that some have faced...
(27 pages isn’t that much, especially when trying to resolve something... start from the end working towards the front/first page)
Even after disabling it, the low battery indicator may still kick in (this may have been resolved)....


The I2C must be ENABLED...
I’ve never done this via the config.txt...
As it’s fairly straight forward to just go into
Raspi-Config (via Retropie Menu)
Interfacing Options
I2C (ENABLE it)
Exit
Restart

Make sure your wiring is correct
SDA/SCL

Then just SSH in to system...
Install MintyBatteryMonitor (without errors)
Restart

And you should have the battery monitor....


Safe Shutdown
Providing your wiring is correct
Try RetroPie 4.3
And see if you any success with that...

But
If you use the search function in this section...
(Game Boy Zero Support)
There are also other posts of people having issues with the Safe Shutdown
Which also have some solutions...
(These could be for Retropie v4.3 and v4.4)






.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 5:40 pm

trying with 4.3 image now to see what happens. i dunno, i think 27 pages is a lot to sift through ;P my eyes glaze over after a dozen.

my thoughts on adding the bat monitor was just to get that on screen feedback, because (i thought?) the safe shutdown didn't have a power level indicator. plus the other options in the minty combo script for brightness, etc seemed useful. i used it on another build, but i didn't have these issues getting it going. maybe it's the pi i'm using too.

i tried search too, but i'm either just terrible at narrowing in on what i need in the results, or i'm using the wrong terms, or something. i read though A LOT of forum posts, don't get me wrong - i spent a long time trying to sift through people's problems, but most of the time what I found wasn't relevant, didn't work, or it wasn't clear what the resolution was, or it was just noise or bad advice.
Last edited by infinitLoop on Sun Mar 03, 2019 6:39 pm, edited 2 times in total.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 5:57 pm

still getting "kernel panic" :( but safe shutdown at least worked, basically. now to try the minty scripts. at least i can work around the kernel panic with the reboot option. (that's one thing i found in that thread about it, but i wasn't able to find anything that led me to actually resolve whatever is causing it)

edit: both minty combo and just the battery monitor one caused the other two (retrogame and safe shutdown) to stop working again when it's installed. i'm starting over again to try it in a different order

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by VeteranGamer » Sun Mar 03, 2019 7:54 pm

My bad
I’v been referring to MintyBatteryMonitor (link provided in my first reply, use that)
Not Combo, as that’s really designed for the MintyPi

This is most probably the issue, and also why retro game is failing as your controls are not setup like the MintyPi and are also conflicting with the Safe Shutdown after installing it....
(Try MintyBatteryMonitor)


Also
What Power Supply are you using....


If you have a power boost 1000 then Camble Safe Shutdown will work with it (also try on 4.4)
But
If you have Helder RetroPSU, then I’m not 100% certain that Camble Safe Shutdown will work with it...
But he does have a script that suit the RetroPSU that has all the functions like turn on/off WI-FI etc


But the MintyPi combo is definitely a NO as it stands to work with Camble Safe Shutdown
Unless straight after you install it you go into it and make sure nothing conflicts...
(You have things conflicting all over the place)



.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by infinitLoop » Sun Mar 03, 2019 8:03 pm

VeteranGamer wrote:
Sun Mar 03, 2019 7:54 pm
What power supple are you using....

My bad
I’v been referring to MintyBatteryMonitor (link provided in my first reply, use that)
Not Combo, as that’s really designed for the MintyPi

This is most probably the issue, and also why retro game is failing as your controls are not setup like the MintyPi


If you have a power boost 1000 then Camble Safe Shutdown will work with it (also try on 4.4)
But
If you have Helder RetroPSU, then I’m not 100% certain that Camble Safe Shutdown will work with it...
But he does have a script that suit the RetroPSU that has all the functions like turn on/off WI-FI etc


But the MintyPi combo is definitely a NO as it stands to work with Camble Safe Shutdown
Unless straight after you install it you go into it and make sure nothing conflicts...
(You have thinks conflicting all over the place)
.
i'm using the adafruit powerboost

4.3 seems to be doing the same as 4.4 - i can get the safe shutdown working, but it throws a kernel panic.

i hoped remapping the keys to the same pins in that py might get the combo script working, but if something else is conflicting, then i can give that up i guess. are there logs somewhere that capture anything that would be illuminating here? something more than just the console output

i'll see if just the battery monitor will work on another fresh install, but it seemed to be doing the same stuff as the combo one

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: Camble's Safe Shutdown and Minty Battery Monitor Problems

Post by VeteranGamer » Sun Mar 03, 2019 8:19 pm

If your wirings/setup is correct (always best to double check)

Then there shouldn’t really be major issues....
(Can always also try 4.3 for Cambles SS)

Install RetroGame....
Re-configure the controls to your wiring and so that nothing conflicts with the Safe Shutdown

ENABLE I2C
Install MintyBatteryMonitor
(https://github.com/HoolyHoo/Mintybatterymonitor)


Install
Camble Safe Shutdown script
(This can also be the first thing you do, and also try 4.3 if 4.4 throws issues)





.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest