domen.petric
Posts: 3
Joined: Sat Jul 23, 2016 3:35 pm

raspberry pi 2 B model + RPI GSM ADD-on v2.0

Sat Jul 23, 2016 3:55 pm

Hi everyone,

I am new to raspberry pi staff so excuse me for things i don't know

I want to build my own weather station. Actually i want to make weather station in my brother greenhouse and if i master sending temperature data via sms and to some cloud server, then maybe also opening and closing greenhouse heating or cooling, watering ,... I am a dreamer ;D

I have
-Raspberry pi 2 model B
-RPI GSM ADD-on v2.0
-some temperature and humidity sensors

I managed to install Raspbian Jessie on my sd card. From there on i don't know how to proceed. I tried to open serial ports as some tutorials proposed, but since they were for earlier versions of Rasbian or for different GSM module nothing work.

Please advise how to proceed or what tutorial would be smart to read

Thank you in advance
Domen

User avatar
liudr
Posts: 685
Joined: Sat Jun 01, 2013 12:11 am
Location: Central MN, USA
Contact: Website

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Sat Jul 23, 2016 9:18 pm

Provide a link to the GSM add-on and each sensor. Are you sure that you only want to SMS to a server instead of doing regular http etc?
Arduino data loggers, user interface, printed circuit board designer since 2009, RPI 3B 2B 2B Zero Jessie, assembly/C/C++/java/python programmer since the 80's

domen.petric
Posts: 3
Joined: Sat Jul 23, 2016 3:35 pm

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Sun Jul 24, 2016 8:12 pm

liudr wrote:Provide a link to the GSM add-on and each sensor. Are you sure that you only want to SMS to a server instead of doing regular http etc?
Thank you for reply. My GSM module is on following link.
http://wiki.iteadstudio.com/RPI_SIM800_ ... DD-ON_V2.0
my temperature and humidity sensor is this one:
https://www.adafruit.com/product/393

At end of project i would like sending data via http to server, but more important for now is sending warning SMS to brother cell phone if temperature in greenhouse gets to high.

User avatar
liudr
Posts: 685
Joined: Sat Jun 01, 2013 12:11 am
Location: Central MN, USA
Contact: Website

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Mon Jul 25, 2016 12:04 am

I have not done SMS myself (maybe sometime soon) but there should be some online tutorials if you search the right keywords. For now, you need a cheap SIM card for your purpose. It depends on your area. Do some search around and find something you can easily afford (best to have some google hits with the carrier and raspberry pi).

There is no driver for modules like this. You will have to get the SMS software to open the /dev/ttyAMA0 serial port, which is connected to the GSM module.

Google DHT22 and raspberry pi. There are plenty of samples. If you want to follow one of them and bring back questions/issues, that would be a good starting point to get help here.
Arduino data loggers, user interface, printed circuit board designer since 2009, RPI 3B 2B 2B Zero Jessie, assembly/C/C++/java/python programmer since the 80's

domen.petric
Posts: 3
Joined: Sat Jul 23, 2016 3:35 pm

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Mon Jul 25, 2016 8:46 pm

Since it was some middle way between more tutorials i am writing here the solution for that combination of hardware and software.
Maybe all steps aren't necessary.

1.) Install fresh raspbian Jessie.
2.) connect GSM module RPI GSM ADD-on v2.0 800SIM to RPI, insert SIMcard, module is powerd from RPI so no need for power cable. search for power button and press it (lead near antena should be on all the time, other flash sometimes, also power flash is on all the time)
3.)Go to setting

Code: Select all

sudo raspi-config
-Expand Filesystem
-Boot options>Console
-Advance options > serial > disable
-reboot
4.)sudo systemctl disable [email protected]
5.) I changed baud rate 38400 maybe it is not necessary but i found out my provider uses that one

Code: Select all

[email protected]:~/Desktop/sim-module-master $ cat /boot/cmdline.txt 
dwc_otg.lpm_enable=0 console=serial0,38400 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
6.) Add

Code: Select all

enable_uart=1
dtoverlay=pi3-miniuart-bt
to /boot/config.txt
7.) reboot
8.) download https://github.com/JFF-Bohdan/sim-module and forget about minicom :D
9.) edit test_*.py files and run thme with python3, if you are having problems edit log and change loging from INFO to DEBUG
10.) Enjoy

mattoni
Posts: 17
Joined: Tue Dec 22, 2015 9:57 am

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Fri Oct 04, 2019 3:41 pm

First of all, thanks for your post domen.petric...it helped me in doing some step further in making SIM800 ADD-ON working on my raspberry pi (something not really straightforward).
I don't know if it's just my problem, but, important thing, i had to unplug the SIM800 hat from raspberry and powering it separately with another power supply. Then, i connected TX, RX and GND pins (8,10,14).
With this set-up, the SIM800 seems connecting to the carrier (status led blinking slowly).
The problem now is that i get a strange error executing test_sms.py:

[email protected]:~/Code/phone/sim-module $ python3 test_sms.py
[2019-10-04 17:34:37,239] INFO: opening port
[2019-10-04 17:34:37,241] INFO: initializing SIM900 session
[2019-10-04 17:34:37,285] DEBUG: __sendRawBytes, sending: bytearray(b'AT\r\n')
[2019-10-04 17:34:39,489] DEBUG: __sendRawBytes, sending: bytearray(b'AT\r\n')
[2019-10-04 17:34:39,492] ERROR: 'ascii' codec can't decode byte 0xfc in position 0: ordinal not in range(128)
[2019-10-04 17:34:39,695] DEBUG: __sendRawBytes, sending: bytearray(b'AT\r\n')
[2019-10-04 17:34:41,899] DEBUG: __sendRawBytes, sending: bytearray(b'AT\r\n')
[2019-10-04 17:34:44,103] DEBUG: __sendRawBytes, sending: bytearray(b'AT\r\n')
[2019-10-04 17:34:46,304] ERROR: error initializing session: 'ascii' codec can't decode byte 0xfc in position 0: ordinal not in range(128)
DONE

Does someone have any clues?
Thanks


domen.petric wrote:
Mon Jul 25, 2016 8:46 pm
Since it was some middle way between more tutorials i am writing here the solution for that combination of hardware and software.
Maybe all steps aren't necessary.

1.) Install fresh raspbian Jessie.
2.) connect GSM module RPI GSM ADD-on v2.0 800SIM to RPI, insert SIMcard, module is powerd from RPI so no need for power cable. search for power button and press it (lead near antena should be on all the time, other flash sometimes, also power flash is on all the time)
3.)Go to setting

Code: Select all

sudo raspi-config
-Expand Filesystem
-Boot options>Console
-Advance options > serial > disable
-reboot
4.)sudo systemctl disable [email protected]
5.) I changed baud rate 38400 maybe it is not necessary but i found out my provider uses that one

Code: Select all

[email protected]:~/Desktop/sim-module-master $ cat /boot/cmdline.txt 
dwc_otg.lpm_enable=0 console=serial0,38400 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
6.) Add

Code: Select all

enable_uart=1
dtoverlay=pi3-miniuart-bt
to /boot/config.txt
7.) reboot
8.) download https://github.com/JFF-Bohdan/sim-module and forget about minicom :D
9.) edit test_*.py files and run thme with python3, if you are having problems edit log and change loging from INFO to DEBUG
10.) Enjoy

User avatar
davidcoton
Posts: 4200
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Fri Oct 04, 2019 5:05 pm

From domen.petric's profile page:
Joined:
23 Jul 2016 16:35
Last active:
17 Aug 2016 20:06
You are unlikely to get a reply from him/her.
Signature retired

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12351
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: raspberry pi 2 B model + RPI GSM ADD-on v2.0

Fri Oct 04, 2019 5:22 pm

That's why necroing is bad ..mkay...

If the subject is older than a year, its probably obsolete too, so locking.

Better start a new post.

Return to “Beginners”