Page 1 of 1

External power button

Posted: Thu Apr 06, 2017 2:26 am
by v8dave
The button on the PCB is good enough for development work but I want to install this in a case with the LCD so I need to have access to the power button externally.

The schematic shows a connector for this called PWRJ but I can't find this on the board. Does this actually exist?

I could solder wires to the existing switch but that is not the ideal solution.

Re: External power button

Posted: Tue Apr 11, 2017 8:54 am
by jjm
Hi,
You cannot external power button on M3 , the hardware doesnot support it.

thank you!

Re: External power button

Posted: Wed Apr 12, 2017 10:22 am
by v8dave
jjm wrote:
Hi,
You cannot external power button on M3 , the hardware doesnot support it.

thank you!


Yeah, got a reply from FriendlyArm with the same information.

Real shame as putting this on a daughterboard PCB means I have to solder a wire onto the existing switch so that I can get external access so I can do this from front panel of the enclosure.

Re: External power button

Posted: Mon Apr 17, 2017 5:43 pm
by Hacky
You can create an app providing a shutdown / reboot function. Must be signed with the firmware key like described in the SerialPort Demo tutorial.

In Manifest you must request android.permission.SHUTDOWN.

In your code, you add:

Intent intent = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");
intent.putExtra("android.intent.extra.KEY_CONFIRM", false);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);