RPi 3G/4G Wireless Connection Backup Switcher: Difference between revisions

From EnigmaGuy Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
# 3G/4G connection - [[RPi 3G Mobile connection with Huawei E173]]
# 3G/4G connection - [[RPi 3G Mobile connection with Huawei E173]]
# E-mail account - e.g. [http://mail.google.com/ GMail]
# E-mail account - e.g. [http://mail.google.com/ GMail]
== Diagram ==
[[File:Rpi-backup1.png|600px]]

Revision as of 07:14, 23 November 2015

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:

  1. There might be power outage
  2. 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:

  1. Battery backed-up Raspberry Pi - 5V UPS for Raspberry Pi
  2. 3G/4G connection - RPi 3G Mobile connection with Huawei E173
  3. E-mail account - e.g. GMail

Diagram