User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Pi4 Power-On button

Sat Sep 21, 2019 3:22 pm

Hi all
I want to add a Power-ON button to my Pi4.
I think I read most of relevant official documentation (including rpi_SCH_4b_4p0_reduced.pdf and BCM2711 doc) but I didn't find how to use J2, either RUN or GLOBAL_EN pins, nor what they are intended for. Instead I only found something to read for other Pi versions.

Please anybody kindly direct me to this.

Best thanks

PS : my second step will be to possibly add some WoL (as Pi4 can't do it yet, I'll try to use a drawer old NIC pci board to see if It can be used out of a PC MoBo for this single use).

fruitoftheloom
Posts: 21042
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Pi4 Power-On button

Sat Sep 21, 2019 3:38 pm

SyncBerry wrote:
Sat Sep 21, 2019 3:22 pm
Hi all
I want to add a Power-ON button to my Pi4.
I think I read most of relevant official documentation (including rpi_SCH_4b_4p0_reduced.pdf and BCM2711 doc) but I didn't find how to use J2, either RUN or GLOBAL_EN pins, nor what they are intended for. Instead I only found something to read for other Pi versions.

Please anybody kindly direct me to this.

Best thanks

PS : my second step will be to possibly add some WoL (as Pi4 can't do it yet, I'll try to use a drawer old NIC pci board to see if It can be used out of a PC MoBo for this single use).

Raspbian Buster has the capability to send Wake on LAN Packets to 'Wake on Lan' capable machines on the same Network.


None of the Raspberry Pi SBCs have any built in function to be awoken via 'Wake on Lan' Packets
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

drgeoff
Posts: 9912
Joined: Wed Jan 25, 2012 6:39 pm

Re: Pi4 Power-On button

Sat Sep 21, 2019 3:57 pm

SyncBerry wrote:
Sat Sep 21, 2019 3:22 pm
PS : my second step will be to possibly add some WoL (as Pi4 can't do it yet, I'll try to use a drawer old NIC pci board to see if It can be used out of a PC MoBo for this single use).
Good luck with that.

fruitoftheloom
Posts: 21042
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Pi4 Power-On button

Sat Sep 21, 2019 5:19 pm

drgeoff wrote:
Sat Sep 21, 2019 3:57 pm
SyncBerry wrote:
Sat Sep 21, 2019 3:22 pm
PS : my second step will be to possibly add some WoL (as Pi4 can't do it yet, I'll try to use a drawer old NIC pci board to see if It can be used out of a PC MoBo for this single use).
Good luck with that.

Yep need PCI express and a lot of hacking !

https://hackaday.com/2019/07/10/giving- ... i-express/
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

alphanumeric
Posts: 2138
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Pi4 Power-On button

Sat Sep 21, 2019 7:25 pm

With the newer eeprom Boot code you can boot a Pi 4B up by momentarily grounding GPIO 3, physical Pin 5. With a config.txt edit adding

Code: Select all

dtoverlay=gpio-shutdown  
you can have it do a proper shut down my grounding that same pin.
With the factory shipped eeprom Boot code I believe you have to use the global enable pin to boot it up. Grounding GPIO 3 won't do anything as its in a very low power state or something.

https://www.raspberrypi.org/forums/view ... t=246027

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 7:57 am

fruitoftheloom wrote:
Sat Sep 21, 2019 3:38 pm
Raspbian Buster has the capability to send Wake on LAN Packets to 'Wake on Lan' capable machines on the same Network.
Hi Fruit, any OS with a network stack can do this. Sorry, I thought my wording was clear enough to explain I'll try awake the Pi. Also, any OS capable to send WoL packets can even send them to a device that doesn't support WoL or has it disabled : it just won't wake ;-)
For memory, I'll search if the PoE HAT can bring the feature, but for now I really don't care.
But ATM this is only the second step I should not have talked about in my very first post here, my bad.
fruitoftheloom wrote:
Sat Sep 21, 2019 3:38 pm
None of the Raspberry Pi SBCs have any built in function to be awoken via 'Wake on Lan' Packets
As stated in the title, I only care with the Pi4. I read the devs may work on this once they have reached to bring let's call "Boot-from-USB" (SDCardless ). So just let's discard this WoL thing and let's focus on power button.

Bye bye

[EDIT] : my confusion : devs won't work with WoL : they are said to have a WIP for boot from network (which is not WoL), then maybe later boot from USB
Last edited by SyncBerry on Sun Sep 22, 2019 9:25 am, edited 2 times in total.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 8:01 am

drgeoff wrote:
Sat Sep 21, 2019 3:57 pm
Good luck with that.
Hi Drgeoff
Who won't try won't succeed ;-)

Have a good day

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 8:17 am

fruitoftheloom wrote:
Sat Sep 21, 2019 5:19 pm
Yep need PCI express and a lot of hacking !
https://hackaday.com/2019/07/10/giving- ... i-express/
Hi again Fruit. Ooooch ! No, this is not my idea. To say it short I don't need any PCI[e] bus : just give some 5VSB to the good pins on the edge connector of the NIC board, plug it with an Ethernet cable and dig for some signal (on WoL header or some other pin of the edge connector) that would raise when a WoL packet comes here, then adapt this signal to ... the Power-On button circuitry (whose initial aim for manual power-on-without-even-looking-at-the-wallet remains as is). Let's keep that WoL for later.

Still nothing to say about J2 ?

Bye

drgeoff
Posts: 9912
Joined: Wed Jan 25, 2012 6:39 pm

Re: Pi4 Power-On button

Sun Sep 22, 2019 8:45 am

1. The PoE HAT does nothing to aid your quest for WoL.

2. I think you will need more than power to a PCI NIC. For example, how is it going to be told its IP address?

User avatar
rpdom
Posts: 15572
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Pi4 Power-On button

Sun Sep 22, 2019 8:52 am

drgeoff wrote:
Sun Sep 22, 2019 8:45 am
2. I think you will need more than power to a PCI NIC. For example, how is it going to be told its IP address?
WoL doesn't use the IP address. It uses the MAC address.

However, the idea is still daft.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 8:52 am

alphanumeric wrote:
Sat Sep 21, 2019 7:25 pm
With the newer eeprom Boot code you can boot a Pi 4B up by momentarily grounding GPIO 3, physical Pin 5. With a config.txt edit adding

Code: Select all

dtoverlay=gpio-shutdown  
you can have it do a proper shut down my grounding that same pin.
With the factory shipped eeprom Boot code I believe you have to use the global enable pin to boot it up. Grounding GPIO 3 won't do anything as its in a very low power state or something.

https://www.raspberrypi.org/forums/view ... t=246027
Hi Alphanumeric
Oh yes you gave me some light : on the schematic I can now see the arrows let us know GLOBAL_EN is an input and RUN is an output. This may be enough for an official documentation.
Although, something is puzzelling me in your answer: "you can boot a Pi 4B up by momentarily grounding GPIO 3" vs "Grounding GPIO 3 won't do anything as its in a very low power state" mean opposite things to me, unless the first assertion would be "you can reboot..." instead of "you can boot...". Sorry, English is not my native language.
Also, if grounding GLOBAL_EN while the Pi is already running would trigger a dirty reboot, I'll have to use the RUN status along with some easy electronics to disable the Power-On button in that case.
Many thanks

alphanumeric
Posts: 2138
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Pi4 Power-On button

Sun Sep 22, 2019 9:08 am

My Pi 4B, with the factory eeprom boot code would "not" boot up when I grounded GPIO3.
That led me to new boot code here, https://www.raspberrypi.org/forums/view ... t=246027

With that new code it "will" now boot up when I ground GPIO 3. I do believe you get that same code if you update the eeprom from the terminal window.
https://www.raspberrypi.org/forums/vie ... it=eeprom

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

WoL a Pi4 with help of an external NIC board

Sun Sep 22, 2019 9:21 am

Workaround to unavailable WoL feature on Pi4
This began here below:
rpdom wrote:
Sun Sep 22, 2019 8:52 am
...
However, the idea is still daft.
Hi RPDom
Thank you for supporting my idea (I'd rather say draft) ;-)
I hope (dream ?) the 3 pins WoL header of the NIC board is something as simple as an open-collector that shorts the Power-On button of a casual PC thereby starting the whole power supply.
The external NIC itself, as never fully powered, will never acquire an IP which is not a problem, the Pi having it's own NIC... then IP. Just a cheapo remote IP switch with no IP :-)
Additional logic to the idea is that, as the NIC will never be more clever as when it is powered with 5VSB, the WoL signal supplied by the NIC would be disabled by some signal coming from the "now-running" Pi4 (maybe RUN J2 output), to prevent a reboot in case new WoL packets comes in once Pi is already running.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 10:55 am

Whaoo ! There I'll have to do my trades (I won't use any HAT, so not concerned with related improvements, but low power state consumption remains of interest because I plan to halt/shutdown the RPi when no activity on this kind of NAS project).
I didn't ever think things was as ~simple~ as flashing (I don't mock devs huge job, just mean simple for us users).
I have now to learn more (read understand) about the logic of POWER_OFF_ON_HALT plus WAKE_ON_GPIO and defaults then try to deduce the possible remaining use cases of J2's GLOBAL_EN if any.
At a first glance I understand the power consumption of the RPi4 in low power mode is higher with new eeprom code defaults than before. If it's only about µA I'll won't care.

Thanks again αN

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Pi4 Power-On button

Sun Sep 22, 2019 10:59 am

rpdom wrote:
Sun Sep 22, 2019 8:52 am
...
However, the idea is still daft.
Let's talk in a dedicated thread : www.raspberrypi.org/forums/viewtopic.ph ... .......406

[moderator: Lets NOT! opening a second thread to talk about the same thing is not allowed here, and duplicates will be deleted!]

hippy
Posts: 6220
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi4 Power-On button

Sun Sep 22, 2019 1:05 pm

SyncBerry wrote:
Sat Sep 21, 2019 3:22 pm
PS : my second step will be to possibly add some WoL (as Pi4 can't do it yet, I'll try to use a drawer old NIC pci board to see if It can be used out of a PC MoBo for this single use).
I know that can work as I have done it. Though only as far as flashing a LED when WoL packets were received, not actually waking a Pi. As you note that may need some additional electronics to prevent hard resets if a WoL packet is recieved when running.

I used an old ISA NIC and just 5V/0V. That worked out of the box for me though some NIC's may need inserting into a PC and configuring first -

https://www.raspberrypi.org/forums/view ... 14#p620449
fruitoftheloom wrote:
Sat Sep 21, 2019 5:19 pm
drgeoff wrote:
Sat Sep 21, 2019 3:57 pm
Good luck with that.
Yep need PCI express and a lot of hacking !
No you don't; as stated above.

Alernative to a 'hacked NIC' another Pi can be used as a WoL waker for other Pi's. That is more useful if one has a number of Pi's which need waking rather than just one -

https://www.raspberrypi.org/forums/view ... 6#p1359230
rpdom wrote:
Sun Sep 22, 2019 8:52 am
WoL doesn't use the IP address. It uses the MAC address.

However, the idea is still daft.
Not sure why or what exactly you think is "daft". Until the Pi supports WoL waking one has to find some other way to do it if one wants that capability.
SyncBerry wrote:
Sun Sep 22, 2019 10:59 am
Let's talk in a dedicated thread : https://www.raspberrypi.org/forums/view ... 3&t=252406
Not sure why we need to or what there is to discuss which needs a secondary thread.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12400
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Pi4 Power-On button

Sun Sep 22, 2019 1:20 pm

Merged the secondary thread here, as an alternative to just deleting it.

please don't start another thread about the exact same topic/idea.

Return to “General discussion”