IRNAS / pira-smart-firmware

Firmware for PiRa Smart device
GNU General Public License v3.0
0 stars 1 forks source link

BLE command to turn on the RPi immediately #6

Open SloMusti opened 6 years ago

SloMusti commented 6 years ago

BLE command to turn on the RPi immediately, such that the user can turn it on

gorankecman commented 6 years ago

BLE command for the momentarily (within 1s) terminating sleep period of RPi has been added. When logical 1 is sent through this BLE service characteristic, RPi is waking up and Pira Smart device is waiting for RPi status ON pin to be pulled up. This feature is active only when RPi is in the sleep period. If BLE characteristic is changed while RPi is awake, its effect will be observed as soon as RPi is in sleep mode.

Branch: develop SHA1: 0a7be323ab22f9bcb656e309fb468c4c3cbb6fda

@SloMusti Test when hex provided.

SloMusti commented 6 years ago

@gorankecman all values that can be set through BLE must have a get value, so one can check what they have been set to

gorankecman commented 6 years ago

@SloMusti OK, that is fine, we can have that. However, for this particular value, it makes sense to reset it as soon as RaspberryPi power supply is turned ON. Do you agree? In that way, we can avoid situation for somebody to forget to reset it. Or at least to reset this value before entering sleep. Which one do you prefer?