“RPi-in-the-middle” gate opening proxy

If you have to pay to open some gates to parking places or garages by calling to specific number from your mobile, this page may be for you. Solution described here will not completely free you from payments but it provides possibility to share costs between multiple users. Idea behind this solution is that you make a contract with parking operator with one SIM card and put that SIM to your Raspberry Pi with SIM900 GSM/GPRS Add-on. After that you make your Raspberry to CALL OUT to the gate FOR YOU and your predefined list of friends RIGHT AFTER any of YOU have CALLED IN to your Raspberry. So, its like call forwarder or re-caller which allows you to pay just one fee but use functionality with unlimited number of people.

  1. First please read How to use Raspberry Pi with SIM900 GSM/GPRS add-on with bash to get your RPi with SIM900 add-on up and running. Make sure that your configuration and scripts are in place and SIM900 powers up after reboot etc.
  2. Make sure you put only your friends phone numbers to the /etc/mgetty/dialin.config . Otherwise everybody who know the number of your RPi can open the gate without sharing the cost with you.
  3. Add following command to the end of command2.sh script, what you created during configuration (step 1), just before any exit commands.
/usr/bin/timeout 30s /usr/sbin/callback -d -l ttyAMA0 -s 9600 <gate phone number here>\;

This command will just call out to specified (gate) number. By the time command2.sh is executed, your GSM addon should have hanged up incoming call already.  Timeout command in the front of callback command is just a precaution – if gate is not hanging up the call, it will be hanged after 30 seconds anyway.

If you found something in this page useful, consider donating or say thanks by clicking on the banners.

…and FUCK YOU, you greedy parking operators who want money even for parking my motorcycle!

Leave a Reply

Your email address will not be published. Required fields are marked *