Skip to content

Commit

Permalink
Initial commit :hurtrealbad:
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakKemble committed Jan 6, 2020
1 parent 0819dac commit 624c641
Show file tree
Hide file tree
Showing 43 changed files with 643,598 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "GPRS_C_SDK"]
path = GPRS_C_SDK
url = https://github.com/zkemble/GPRS_C_SDK
1 change: 1 addition & 0 deletions GPRS_C_SDK
Submodule GPRS_C_SDK added at 5c6a34
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Remote Mail Notifier (and GPS tracker)
======================================

A notifier for when mail is received in your mail box! Uses an A9G GPRS/GPS module to send HTTP requests to a web server via the mobile network.\
A PHP script then sends messages to a Telegram group chat using the bot API. Since the A9G also has a built-in GPS receiver the mail notifier can be used as a GPS tracker!\
Also incorporates a BME280 environmental sensor and should last for around 4-5 years on a single charge of a 10440 lithium battery (~320mAh, equivalent AAA size), if mail is received 3 times per week.

[https://blog.zakkemble.net/remote-mail-notifier-and-gps-tracker/](https://blog.zakkemble.net/remote-mail-notifier-and-gps-tracker/)

![Mail notifier pic](https://github.com/zkemble/MailboxNotifier/raw/master/images/heylookmail.jpg "")

--------

Zak Kemble

contact@zakkemble.net
25 changes: 25 additions & 0 deletions firmware/a9g/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

LOCAL_NAME := projects/mailbox

LOCAL_MODULE_DEPENDS := \

LOCAL_API_DEPENDS := \
libs/gps \
libs/utils \

LOCAL_ADD_INCLUDE := \
include \
include/std_inc \
include/api_inc \
libs/cjson/src \
libs/gps/minmea/src \

IS_ENTRY_POINT := no

MYCFLAGS +=

C_SRC := ${notdir ${wildcard src/*.c}}

include ${SOFT_WORKDIR}/platform/compilation/cust_rules.mk

-include $(patsubst %,${DEPS_REL_PATH}/%.d,$(basename $(C_SRC)))
2 changes: 2 additions & 0 deletions firmware/a9g/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:: Keep the cmd window open after it finishes
cmd /k runmake.bat
38 changes: 38 additions & 0 deletions firmware/a9g/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Project: Remote Mail Notifier (and GPS Tracker)
* Author: Zak Kemble, contact@zakkemble.net
* Copyright: (C) 2020 by Zak Kemble
* License:
* Web: https://blog.zakkemble.net/remote-mail-notifier-and-gps-tracker/
*/

#ifndef CONFIG_H_
#define CONFIG_H_

#define FW_VERSION "1.0.0 200103"

#define HTTP_API_KEY "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

#define APN_NAME "apnname"
#define APN_USER "apnuser"
#define APN_PASS "apnpass"

#define BAL_NUM_SEND "0000"
#define BAL_NUM_RECV " 0000" // A9G BUG: Short numbers start with a space for some reason
#define BAL_MSG "BAL"

#define HTTP_HOST "example.com"
#define HTTP_PORT 80
#define HTTP_PATH "/mailnotifier.php"

#define DEBUG 1 // Disable all *_DBG() and PRINTD() messages

#define DEBUG_SMS 1
#define DEBUG_GSM 1
#define DEBUG_GPS 1
#define DEBUG_MAIL 1
#define DEBUG_GPRS 1
#define DEBUG_SMTP 1
#define DEBUG_HTTP 1

#endif /* CONFIG_H_ */
Loading

0 comments on commit 624c641

Please sign in to comment.