Set time scriptlets
parent
e89f23efe3
commit
41e0475c93
|
@ -22,6 +22,7 @@ sudo apt install \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
bluez \
|
bluez \
|
||||||
ntpdate \
|
ntpdate \
|
||||||
|
sudo \
|
||||||
gcc-arm-none-eabi ccache \
|
gcc-arm-none-eabi ccache \
|
||||||
fonts-lobstertwo
|
fonts-lobstertwo
|
||||||
```
|
```
|
||||||
|
|
|
@ -14,3 +14,6 @@ JEBBATIMEDEVMAC=AA:BB:CC:DD:EE:40
|
||||||
# Bluetooth MAC of development unsealed watch DFU. One larger than main dev MAC.
|
# Bluetooth MAC of development unsealed watch DFU. One larger than main dev MAC.
|
||||||
JEBBATIMEDEVDFUMAC=AA:BB:CC:DD:EE:41
|
JEBBATIMEDEVDFUMAC=AA:BB:CC:DD:EE:41
|
||||||
|
|
||||||
|
# NTP Server
|
||||||
|
JEBBATIMENTPSERVER=192.168.1.1
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get config
|
||||||
|
. ~/.config/jebbatime.conf
|
||||||
|
|
||||||
|
cd $JEBBATIMEGITROOT
|
||||||
|
|
||||||
|
./tools/wasptool \
|
||||||
|
--battery \
|
||||||
|
--device $JEBBATIMEDEVMAC
|
||||||
|
|
||||||
|
echo "Connecting Bluetooth"
|
||||||
|
sudo bluetoothctl connect $JEBBATIMEDEVMAC
|
||||||
|
|
||||||
|
echo "Setting host `hostname` time via NTP"
|
||||||
|
sudo ntpdate $JEBBATIMENTPSERVER
|
||||||
|
|
||||||
|
echo "Checking time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--check-rtc \
|
||||||
|
--device $JEBBATIMEDEVMAC
|
||||||
|
|
||||||
|
echo "Setting time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--rtc \
|
||||||
|
--device $JEBBATIMEDEVMAC
|
||||||
|
|
||||||
|
echo "Checking time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--check-rtc \
|
||||||
|
--device $JEBBATIMEDEVMAC
|
||||||
|
|
||||||
|
echo "Disconnecting Bluetooth"
|
||||||
|
sudo bluetoothctl disconnect $JEBBATIMEDEVMAC
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get config
|
||||||
|
. ~/.config/jebbatime.conf
|
||||||
|
|
||||||
|
cd $JEBBATIMEGITROOT
|
||||||
|
|
||||||
|
./tools/wasptool \
|
||||||
|
--battery \
|
||||||
|
--device $JEBBATIMEMAC
|
||||||
|
|
||||||
|
echo "Connecting Bluetooth"
|
||||||
|
sudo bluetoothctl connect $JEBBATIMEMAC
|
||||||
|
|
||||||
|
echo "Setting host `hostname` time via NTP"
|
||||||
|
sudo ntpdate $JEBBATIMENTPSERVER
|
||||||
|
|
||||||
|
echo "Checking time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--check-rtc \
|
||||||
|
--device $JEBBATIMEMAC
|
||||||
|
|
||||||
|
echo "Setting time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--rtc \
|
||||||
|
--device $JEBBATIMEMAC
|
||||||
|
|
||||||
|
echo "Checking time on watch"
|
||||||
|
./tools/wasptool \
|
||||||
|
--check-rtc \
|
||||||
|
--device $JEBBATIMEMAC
|
||||||
|
|
||||||
|
echo "Disconnecting Bluetooth"
|
||||||
|
sudo bluetoothctl disconnect $JEBBATIMEMAC
|
||||||
|
|
Loading…
Reference in New Issue