OK, so I have a Pi3 and a new ATX-Raspi. I have it all wired up, and ran the setup script and everything seemed ok except the Pi will not respond to the power button at all (except to power up). The button flashes like it is supposed to flash (ie - quick flashing for reboot, slower (more like a fadein/out) for shutdown), the shutdown light lights up on the ATX-Raspi, but nothing happens on the Pi!
I see the script running:
root 472 0.0 0.3 5088 2936 ? S 15:16 0:00 /bin/bash /etc/shutdowncheck.sh
I have my ATX-Raspi connected correctly (GPIO7 (Pin 26)) for shutdown and GPIO8 (Pin 24) for BootOK. However when I push the button nothing happens.
In addition, as long as the script is running, I cannot halt or powerdown the Pi at all. I get the following error:
root scruffy: ~ # halt
Failed to start halt.target: Connection timed out
Broadcast message from root@scruffy on pts/0 (Wed 2016-05-11 15:25:56 MST):
The system is going down for system halt NOW!
root scruffy: ~ #
If I kill the shutdowncheck.sh script, I still cannot halt or reboot the Pi. I have to physically pull the power from the ATX-Raspi to gain control of the Pi.
If I comment out the shutdowncheck.sh script in rc.local, I can halt and reboot without any problems at all, but as soon as I run the script again, the button does not work and I cannot reboot or halt from the cli.
root scruffy: ~ # uname -a
Linux scruffy 4.4.8-v7+ #881 SMP Sat Apr 30 12:16:50 BST 2016 armv7l GNU/Linux
root scruffy: ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 59G 3.9G 52G 7% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 6.2M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p6 63M 21M 43M 32% /boot
root scruffy: ~ # gpio readall
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 0 | IN | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | IN | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | OUT | 1 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | OUT | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
| 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 |
| 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | |
| 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 |
| 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | |
| 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 |
| 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 |
| | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
GPIO7 is IN and 8 is OUT and on the ATX-Raspi I see the BootOK LED is lit after I boot. However the button will not shut it down and the halt and reboot commands no longer work as long as the Pi is booted with the shutdowncheck.sh enabled.
The other odd thing is that with the shutdowncheck.sh enabled in my rc.local, attempting to SSH into the PI takes forever after I input the password. However, if I comment out the shutdowncheck.sh script from rc.local, power cycle the pi I can login normally.
So I tried two different GPIOs just in case something was up. I changed my script as follows:
SHUTDOWN=20
.
.
.
BOOT=21
I see that they are correctly setup on boot:
root scruffy: ~ # gpio read 20
0
root scruffy: ~ # gpio read 21
1
and IN/OUT is set correctly as well:
root scruffy: ~ # gpio readall
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 0 | IN | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | IN | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | OUT | 1 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
| 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 |
| 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | |
| 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 |
| 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | |
| 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 |
| 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 |
| | | 0v | | | 39 || 40 | 1 | OUT | GPIO.29 | 29 | 21 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
Again, the bootOK LED comes on when the Pi boots, and the ShutDown LED lights up when you hit the button, but the Pi refuses to halt or reboot with the button or via the CLI if booted with the shutdowncheck.sh enabled in the rc.local.
Hopefully someone has some insight!!
Many Thanks!
Very odd.
What distro are you running?
Quote from: Felix on May 12, 2016, 10:59:02 AM
Very odd.
What distro are you running?
The latest Jessi via noobs.
After trying a second ATXRaspi, I ran an rpi-update and that seems to have fixed whatever the problem was I was having!
Yeah, I did try jessie (my main gateway still on raspbian) and everything just works. So not sure what that was about, your wiring looked fine and everything else. Let me know if you have trouble again.
Quote from: Felix on May 13, 2016, 08:25:30 AM
Yeah, I did try jessie (my main gateway still on raspbian) and everything just works. So not sure what that was about, your wiring looked fine and everything else. Let me know if you have trouble again.
As soon as I updated the Pi, it worked! Of course, now I don't need them since I switched to the MightyBoost + Moteino! :) ;D