View previous topic :: View next topic |
Author |
Message |
jakub.jnm
Joined: 26 Mar 2013 Posts: 20
|
Posted: Fri Apr 08, 2016 10:39 pm Post subject: Send sms via AT commands doesn't work |
|
|
Hi all,
i am not able to figure out why i am not able to send sms via AT commands. I have atmega32 directly connected to SIM800L and using following sub routine
Code: | Sub Sendsms()
Print "ATZ"
Wait 3
Print "AT+CMGF=1"
Wait 3
Print "AT+CMGS="00000000"
Wait 3
Print " test2 "
Wait 3
Print Chr(26)
Wait 2
|
When i am connected via serial to sim800l module those commands are working. Can some please help?
(BASCOM-AVR version : 2.0.7.1 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sat Apr 09, 2016 3:45 pm Post subject: |
|
|
Hello,
Wiring OK? Baudrate OK? Crystal Setup correctly?
Maybe try just writing a small script that blinks an LED every second (just to check the AVR is running at the correct speed). This is important as AVR's use the CPU clock to generate the clock for the UART.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Sat Apr 09, 2016 7:18 pm Post subject: |
|
|
You need to give us some more info....
Show some more code and preferably a schematic.
What does the gsm module sends back to you after the ATZ? _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Sun Apr 10, 2016 3:09 pm Post subject: |
|
|
dont know if SIM800L use quotes (") in CMGS number but you can try it
Code: | Print "AT+CMGF=1"
Waitms 500
Print "AT+CMGS={034}+xxxxxxxxxx{034}"
Wait 1
Print " test2 "
Waitms 500
Print Chr(26)
Wait 5 |
_________________ / Kim |
|
Back to top |
|
|
jakub.jnm
Joined: 26 Mar 2013 Posts: 20
|
Posted: Tue Apr 12, 2016 11:48 pm Post subject: |
|
|
kimmi wrote: | dont know if SIM800L use quotes (") in CMGS number but you can try it
Code: | Print "AT+CMGF=1"
Waitms 500
Print "AT+CMGS={034}+xxxxxxxxxx{034}"
Wait 1
Print " test2 "
Waitms 500
Print Chr(26)
Wait 5 |
|
Yes, correct!! It's working now. Thx a lot |
|
Back to top |
|
|
slavcio2012
Joined: 14 Feb 2013 Posts: 1
|
Posted: Mon May 01, 2017 4:06 pm Post subject: |
|
|
Code: | Print "AT + CMGF = 1" ;Chr(13) |
|
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Tue May 02, 2017 1:57 am Post subject: Cr/Lf |
|
|
Do a search on M590 in this forum. You will find a SMS sender / receiver. Check the Bascom code. I am missing carriage return/line feed.
Most terminal programs sends a Cr/Lf at the end of te line.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
|