RPi 3G/4G Wireless Connection Backup Switcher: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
You can get this application in Python including source code for free at [https://github.com/koss822/misc/tree/master/RaspberryPi/WirelessSwitch Github/.../WirelessSwitch] | |||
== Preface == | |||
While I was developing surveillance camera I was facing a few challenges: | |||
# There might be power outage | |||
# Monthly cost should be kept to minimum (using 3G/4G pre-paid card as backup with primary cable network connection) | |||
I was looking for a '''simple way how to switch between cable and 3G/4G connection in case of power failure''' (cable network modem is powered up by home electricity). I was hoping to find some simple Linux tool which will switch connection automatically but unfortunately I was unable to find any one. So I programmed one myself in Python. It was difficult to test it completely for all scenarios but currently most functionality should be stable and with correct 3G/4G settings it should reconnect you automatically in case of power outage longer than 5 minutes to backup connection and send notification e-mail. | |||
To function properly you should have these set-up correctly: | |||
# Battery backed-up Raspberry Pi - [[5V UPS for Raspberry Pi]] | |||
# 3G/4G connection - [[RPi 3G Mobile connection with Huawei E173]] | |||
# E-mail account - e.g. [http://mail.google.com/ GMail] | |||
== Diagram == | |||
[[File:Rpi-backup1.png|600px]] |
Latest revision as of 12:59, 24 January 2019
You can get this application in Python including source code for free at Github/.../WirelessSwitch
Preface
While I was developing surveillance camera I was facing a few challenges:
- There might be power outage
- Monthly cost should be kept to minimum (using 3G/4G pre-paid card as backup with primary cable network connection)
I was looking for a simple way how to switch between cable and 3G/4G connection in case of power failure (cable network modem is powered up by home electricity). I was hoping to find some simple Linux tool which will switch connection automatically but unfortunately I was unable to find any one. So I programmed one myself in Python. It was difficult to test it completely for all scenarios but currently most functionality should be stable and with correct 3G/4G settings it should reconnect you automatically in case of power outage longer than 5 minutes to backup connection and send notification e-mail.
To function properly you should have these set-up correctly:
- Battery backed-up Raspberry Pi - 5V UPS for Raspberry Pi
- 3G/4G connection - RPi 3G Mobile connection with Huawei E173
- E-mail account - e.g. GMail