Waking the Raspberry Pi with a wireless command

Wake Up

The Pi responsible for issuing the wake up call starts with rfwake LocalRFID RemoteRFID GPIO-Pin (Listing 6). The Pi that needs to wake up begins to boot after a few moments. Once this happens, you will find the RFID of the calling Pi in the log file. You should configure its own local RFID as well as the GPIO pin on the P1 plug in the /etc/default/rtc file. The start scripts will automatically communicate the information contained there to Rfwait and Rfrespond.

Listing 6

Output of rfwake

¤¤nonumber
$ rfwake 11:22:33:44:55:66:77:88 01:23:45:67:89:AB:CD:EF 25
1. Wake-Telegram sent.
2. Wake-Telegram sent.
[...]
169. Wake-Telegram sent.
ACK received from called Station RFID 01:23:45:67:89:ab:cd:ef

In the interest of being thorough, consider at this point how to configure the Pi so that it can be awakened via a timer. Set a relative time interval for the future as shown in the first line of Listing 7. In the example used, this amounts to 180 seconds. You can set an absolute point in time as demonstrated by the second line. This arrangement ignores alarm times from the past. It can handle alarm events in the near future, by setting them to occur in precisely 2 minutes.

Listing 7

wakealarm

¤¤nonumber
$ sudo sh -c ,echo $(($(date +%s) + 180)) > /etc/wakealarm'
$ sudo sh -c ,date -d "2015-10-31 18:00:00" +%s > /etc/wakealarm'

Conclusion

The author's Raspberry Pi boots reliably across a distance of several floors, through two steel and concrete ceilings. The 868 MHz band in the environment is quiet. The Pi in question is installed under the building's roof and actsas a weather station. It measures solar radiation every 10 minutes. Every evening it promptly responds to the wireless wake up call to transmit the data via WiFi. A lead battery which is recharged once a week serves as the power supply.

This project requires some practice in constructing and operating more complex electronic switches and more extensive electronics work and shop equipment. In return for your efforts, you will get a solid base for performing additional experiments in the area of short range wireless. For example you can work on optimizing the balance between shorter distances and data throughput.

There are possibilities for those who want to do even more. The 868 MHz band is only a small part of the full SRD range of 863 to 870 MHz. Familiarity with the ETSI documents and the data sheets for the wireless module provides a good way to acquire the necessary knowledge.

README

If you decide to use a Raspberry Pi running on solar power for tasks carried out via WiFi, then ideally, start up and shut down should be at specific timesto conserve power.The setup described in this article boots the Pi with a radio signal trigger.

Caution

The project presented here is the author's best attempt to remain within the ETSI specifications especially with respect to maximum transmission capacity, length of transmission and the permitted transmission spectrum. However this information is not guaranteed to be accurate.

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content