I am trying to send sms using RPI Add on v22 module and Raspberry-pi 3+.
I have mounted this module on top of Raspberry-pi.
When I use minicome
using
minicom -D /dev/ttyS0 -b 115200 -o
I get the terminal, but I can not type anything on that terminal. What's the problem there? My module is burnt?
My /boot/config.txt
dtoverlay=pi3-miniuart-bt
enable_uart=1
force_turbo=1
My /boot/cmdline.txt
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
My /lib/systemd/system/hciuart.service
After = dev-ttyS0.device
ExecStart = /usr/lib/hciattach /dev/ttyS0 bcm43xx 460800 noflow -
as given here.
My program is
import serial
import RPi.GPIO as GPIO
import os, time
GPIO.setmode(GPIO.BOARD)
port = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=1)
port.flush()
port.write('AT'+'\r\n')
rcv = port.read(10)
print rcv
time.sleep(1)
In terminal I get nothing printed, at least AT
command. If I change /dev/ttyS0
to /dev/ttyAMA1
, AT
command printed on terminal. But no ok
coming from device.
Here they suggested to edit /etc/inittab
, but I dont have any file there in my Pi.
I have separate 5V/2A power supply to the GSM module.
Added later by author: I have used minicom, sudo minicom -D /dev/ttyS0, but it has nothing
What am I missing here? I am new to these GSM modules. Any help would be greatly appreciated.
minicom
,screen
, orminiterm.py
(the last one is probably the easiest and would have been installed with py-serial), so that you know you have a working configuration. Once that's established you can try with your own code. – goldilocks Aug 30 '19 at 12:41minicom
,sudo minicom -D /dev/ttyS0
, but it has nothing. – Sachith Muhandiram Aug 30 '19 at 12:49RX
pin of Rpi is connected toTX
pin of GSM module. – Sachith Muhandiram Aug 30 '19 at 15:23