Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:odroid-ups2 [2016/03/21 16:29] ruppi [ODROID-C1] |
en:odroid-ups2 [2016/03/23 09:57] joy.cho [Auto shutdown Script] |
||
---|---|---|---|
Line 101: | Line 101: | ||
- Extract the blue cable of the 3-pin socket,\\ | - Extract the blue cable of the 3-pin socket,\\ | ||
- Connect the 3-pin socket as shown in the figure above the 40 pin Header.\\ | - Connect the 3-pin socket as shown in the figure above the 40 pin Header.\\ | ||
- | The extracted lines as shown below, connect the pin #26 of the 40 pin header.\\ | + | The extracted lines connect the pin #26 of the 40 pin header as shown below.\\ |
+ | {{:en:connection_ups2_for_odroidc2.png?400|}} | ||
Line 124: | Line 124: | ||
The BAT_OK and AC_OK signals are used in the below simple shell script which runs in the background via crontab. | The BAT_OK and AC_OK signals are used in the below simple shell script which runs in the background via crontab. | ||
+ | |||
+ | <WRAP left round important 70%> | ||
+ | Before using UPS2 on ODROID-C2, please check u-boot version. \\ | ||
+ | If the version of yours is the one before Mar 18 2016, update boot loader as following. \\ | ||
+ | On Ubuntu release version "ver1.2" or higher, the control routine for ups2 port will be applied. | ||
+ | |||
+ | Click the following site to download boot loader | ||
+ | * [[http://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_bootloader.tar.gz|Download]] | ||
+ | <code> | ||
+ | $ tar zxvf c2_bootloader.tar.gz | ||
+ | $ cd c2_bootloader | ||
+ | $ ./sd_fusing.sh <device/path/of/your/card> | ||
+ | </code> | ||
+ | </WRAP> | ||
==== Auto shutdown Script ==== | ==== Auto shutdown Script ==== | ||
This script checks the status of power and battery.\\ | This script checks the status of power and battery.\\ | ||
Save the following code as ups2.sh in home directory.\\ | Save the following code as ups2.sh in home directory.\\ | ||
- | Note that this script can be used with U3 as well as C1 without modification.\\ | + | Note that this script can be used with U3 as well as C1/C2 without modification.\\ |
<code> | <code> | ||
#!/bin/sh | #!/bin/sh | ||
Line 186: | Line 200: | ||
if [ $retval -eq 0 ] | if [ $retval -eq 0 ] | ||
then | then | ||
- | echo "battery is low than 3.7V" | + | echo "battery is lower than 3.7V" |
if test $MODEL = "ODROID-C2" | if test $MODEL = "ODROID-C2" | ||
then | then |