Monitoring SMS’s with a ESP8266 and an Android App

In Brazil, we have many troubles with drivers using cell phones.

Many modern cars have systems to mirror the cell phone. But I wonder how many traffic accidents would be avoided, if we had an efficient and portable system for every type of vehicle.(Bluetooth systems are portable, but it has a very bad user-ability, in my opinion)

Government announcement regarding the subject

This article shows the technical details, of a small prototype i made thinking of solving this problem.

The implementation

My choice for implementing this device were: a NodeMCU, an OLED Display and an Android App to watch the sms’s notifications. How I like to program on LUA, i find it interesting to show the script for create a TCP server and show the data in the Display.

The SMS’s

As I will need to connect to NodeMCU, i initially chose to watch the SMS notifications from my cell phone, because i don’t know how to manage two connections in Android. Also, Android has good support for this.

Basically we need two classes.

The second class is a BroadcastReceiver that sends data to the Sms class

Without forgetting to change the Manifest.

Final result

The end result is small but promising

This is my first article written in English. I really hope you understood. If you need the complete code for this prototype, send me an email: