Skip to content

andreamisuraca/mercury-gsm-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercury GSM App

The application allows to trigger a relay with a phone call. A master phone number can grant and revoke permissions to allow other users (phone numbers) to trigger the relay.

Table of Contents

General Information

  • The project is a firmware ready to be flashed on the Mercury System.
  • For low level drivers an adapted Mercury Framework is used.
  • A typical use case consists of a GSM Gate Opener: you can open your gate with a phone call instead of using the remote.

(back to top)

Technologies Used

  • Base Board per Sistema Mercury
  • Big Relay board per sistema Mercury
  • Expansion Dual per Sistema Mercury
  • Modem Board GSM per Sistema Mercury
  • External Antenna MMCX/M
  • Microchip PICKIT™ 3 IN-CIRCUIT DEBUGGER
  • Microchip MPLAB® X IDE

(back to top)

Features

List the ready features here:

  • Set master phone number with phone call or via USB.
  • Replace master's phone number via USB.
  • Master phone number can add user's phone number in memory.
  • Master phone number can delete user's phone number from memory.
  • Master phone number can reset the memory and bring the board into its initial state.
  • All numbers in memory can trigger the relay.

(back to top)

Setup

The project can be open with Microchip's MPLAB® X IDE that is free to download and multiplatform. At the first start the IDE will detect the compiler version used in the project and will ask the user to download it. The project can then be built and flashed.

(back to top)

Usage

First Startup

When we plugged into an USB port a red and a green LED will turn on. An LED on the modem board will start flashing: it means your SIM card is working.
The very first startup the board memory is empty. A yellow LED will flash for 3 minutes. In this three minutes you can call your SIM card number, and the caller number will be saved as master phone number. When the master phone number is saved, or the 3 minutes elapsed, the LED will not blink anymore.
At any time the master phone number can be changed via USB with a dedicated software.
Consider removing the PIN from your SIM card before inserting it.

Add a phone number

The master phone number can allow other users to trigger the relay. To add a user into the board memory the following command needs to be send via SMS to your SIM card number: ADD;<phone_number> Replace <phone_number> with the number you want to add. The phone number should start with a '+' symbol, e.g.: ADD;+390123456789.
The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can add other users.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds (e.g.: The number was already in memory).

Delete a phone number

The master phone number can revoke other users permission to trigger the relay. To remove a user from the board memory the following command needs to be send via SMS to your SIM card number: DEL;<phone_number> Replace <phone_number> with the number you want to add. The phone number should start with a '+' symbol, e.g.: DEL;+390123456789.
The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can remove other users.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds (e.g.: The number was not in memory).

Reset

The master phone number can perform a reset of the board. This will delete all the numbers saved in memory, even the master phone number itself. To remove a user from the board memory the following command needs to be send via SMS to your SIM card number: RES; The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can perform a reset.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds. The board will then restart and the yellow LED will blink for 3 minutes so the user can set again the master phone number.

Relay Trigger

All the numbers saved in memory (not just the master) can trigger the relay. To do that simply call yous SIM card number.
If the command was successfully performed the relay will be triggered for 1 second. A red LED placed on the relay board will be turned for as long as the relay is triggered.

(back to top)

Room for Improvement

Room for improvement:

  • Add command to set the relay activation time (currently 1 second).
  • Support internal phone numbers up to 15 digits.

TODOs:

  • Add Unit Tests.

(back to top)

Contributing

Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Software Credits

The development of this software was made possible using the following components:

(back to top)

License

Distributed under the GNU General Public License v3.0 License. See LICENSE file for more information.

(back to top)

Contact

Created by Andrea Misuraca - feel free to contact me!

(back to top)

About

GSM Application based on the Mercury System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published