SMS Text Messaging Status Updates With Your CloudShell2: Remote Monitoring Made Simple

There is a new version of the Cloudshell2 Info and Monitoring Tool, Version 1.0.4-1. Following are a couple of new features:

  • Add GSM Shield support via USB2UART device
  • Add new command line switch to identify a defective hard disc more easily (experimental)

GSM shield support

Figure 01

Figure 02

The picture above shows how I connected the GSM shield to my ODROID-XU4, the picture also shows an Arduino Nano which is only a suggestion as they are very cheap and it's successor (Arduino Nano Every) is only 8€ with a stronger microprocessor, of course, you could use any USB2UART device (see link below) but a lot of you guys own maybe already an Arduino so you could also use it, each Arduino should also have a tristate mode in which you start the Arduino with RST and GND connected to each other. It's like a bridge from USB to pin 0 and 1. If this is not working for you, like it didn't work for me, you have to use a sketch/source like this example (https://bit.ly/2kxFxaf). Skip the text output, use the same baud rate for hardware und software serial and it should work.

Here is a link with further instructions for which device you should use to communicate with the GSM Shield: https://bit.ly/2kXcxZD. By the way, I used this https://bit.ly/2kqkbLI to connect the 5V to my GSM shield, depending on what GSM shield you are using this could be entirely different, external power supply plug, etc.

Before you connect anything you should setup the GSM shield with your PC/Laptop/ODROID with minicom minicom -b 115200 -D /dev/ttyUSB0 or if you want to do that on Windows, you can use my tool (SerialLogger) which I wrote back in 2013. It is shipped with the debian package and you can find it inside the /usr/share/doc/cloudshell2-monitoring/ folder. It is a 64-bit application, if you want a 32-bit or WindowsXP build, please ask.

Figure 03 - Serial Logger

If the communication is working, you must disable the PIN of your SIM card with this command AT+CLCK="SC",0,"1234" (1234 should be exchanged with your PIN) and configure other settings about your network band. You should already be able to send and receive SMS with your shield (Fixed baud rate setup is also recommended instead of auto on your GSM shield).

Now you can setup the GSM shield inside the /etc/cloudshell2-monitoring/cloudshell2-monitoring.conf config file, with your phone number to send SMS, nickname, port name, and baud rate.

Note: I do not check signal strength nor do I check if the GSM shield is connected to a network provider, you have to have a good cell reception and the right frequency band must selected and auto select network must be enabled.

If everything is working and your PIN is disabled and your GSM shield is connected to your ODROID-XU4, you have to restart cloudshell2-monitoring tool sudo systemctl restart cloudshell2-monitoring.service and you can check if the GSM shield was detected with:

odroid@odroidxu4:~/CloudShell2$ sudo systemctl status cloudshell2-monitoring.service
● cloudshell2-monitoring.service - "ODROID Cloudshell2 Monitoring"
   Loaded: loaded (/lib/systemd/system/cloudshell2-monitoring.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-09-12 18:05:17 CEST; 5s ago
 Main PID: 6137 (start-lcd)
   CGroup: /system.slice/cloudshell2-monitoring.service
           ├─6137 /bin/bash /usr/bin/start-lcd
           └─6141 /usr/bin/cloudshell2-monitoring

Sep 12 18:05:17 odroidxu4 systemd[1]: Started "ODROID Cloudshell2 Monitoring".
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: Found GSM Shield
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM disable echo
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM enable live SMS
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM set SMS text mode
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
If this is OK, you can now send SMS messages to your CloudShell2 and your CloudShell2 will automatically inform you if something goes wrong (RAID error, over temperature, etc.)

Figure 04 - iPhone SMS messages

Valid commands at the time of publication, include (status, reboot, shutdown) with the nickname of your cloudshell2 as prefix (cs2 as default), like in the picture above.

References https://bit.ly/2mtQdr0

Be the first to comment

Leave a Reply