0

I am trying to call my phone from raspberry pi through SIM900A module , I interface the wires well and the module blinking . the python code run and say that its calling, but my phone don't ringing ? this is the code


import os, time

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)

port = serial.Serial('/dev/ttyAMA0', baudrate=9600, timeout=1)

port.write(b'AT\r')

rcv = port.read(10)

print(rcv)

time.sleep(1)

port.write(b'ATDxxxxxxxxxx')

print('Calling…')

time.sleep(30)

port.write(b'ATH\r')

print('Hang Call…')```


The output is :
 

b'T\r\r\nok\r\n'
calling...
Hang call...

The mincom give me a response OK for AT command 
1
  • 2
    Have you tried doing this manually in a serial comm app (eg. minicom or miniterm.py)? You will probably get better feedback about what is happening. – goldilocks Jan 12 at 15:13
1

You didn't finish your ATD command with carriage return (\r) character.

It's always good practice to read answers that modem sends back to you. By ignoring them, you don't really know what your problem is, you only know that there is some.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.