I’m a new N2 user. I have CE setup and working fine. I have my IR remote working with the wake button feature. But I’d also like to have a case style power/wake button.
I’ve followed the Odroid wiki for the N2 wake button feature, connected to the GPIO pins. I added the env settings to the boot.ini file, as per the wiki, but no luck.
I was hoping someone here could share if they managed to get the GPIO wake button to work with CE. Or is this wake button feature currently not available with CE, and it’s still on the to-do list?
Thanks for the reply. That is the wiki that I was following.
My error was that you have to make sure you know where to edit “boot.ini” and place the env var and update the bootargs. I placed it in a hurry to high up in the file and changes were over written. So you can’t really follow the wiki and simply add the suggested lines without studying and understanding how the boot.ini file works.
I think it would ideal if CE already had the changes to the “boot.ini”, so all someone has to do is wire up the button. I can’t see any harm done by the edits already being in place. I know when I purchased the Odroid-H2, all I had to do was wire in a button to the GPIO and it worked. I know it isn’t set up the same way, but the end result would be the same, all someone has to do is add the button.
For anyone else fumbling around with having to edit the boot.ini to add the wake/power button, here are my notes I made for myself if I have to do it again, to save me the time and hassle.
Wake/Power Button
Hook up a momentary switch with LED to the 40 pin GPIO header:
LED + > Pin 1 (3.3V)
LED - > Pin 6 (Gnd)
Switch > Pin 9 (Gnd)
Switch > Pin 11 (GPIO#479)
Use one of the two methods of editing the files in the boot partition.
Either make the card writable via SSH, or removing the card and editing the boot FAT partition in another computer.
Method #1:
Edit /flash/boot.ini
Method #2
Edit /boot.ini
Add Line 23:
setenv gpiopower “479”
Edit Line 40:
setenv bootargs “${initargs} ${displayopt} ${coreelec}”
Change to:
setenv bootargs “${initargs} ${displayopt} ${coreelec} gpiopower=${gpiopower}”
Sorry I thought you haven’t seen the wiki.
I’ve made a commit so from the next build you don’t need anything but edit your config.ini with the desired gpio number. The default value is 476 (pin 16, GPIOX_0) because it is a simple gpio pin without alternate function and it has a GND neighbour so with a two pin connector you can wire your button to it.
Would it hurt to add it by default, instead of having 2 dtb? Less confusing in the end…
I also plan to add such a button, just need to find a small one