stuck with SMS AT+ commands for GSM modem

Bryang

Member
Hi,
I've been hunting through the forum & Youtube for a couple of weeks & seem to getting nowhere!

I have a 40X2, routing it throughan RS232 to a SIMCOM 5320E module, with a few LED's each step of the code to see what's going on. I'm positive I've got the circuit right (but of course I could be wrong!). I tried a few different codes based on stuff in the forums, & then I got the command set file, but with so many commands available that confused me even more! so I started again, stripped down with as basic a set of code I thought might work

Can anyone see any obvious code or commands I've missed?
I started with (excluding the LED sequencing)...

#Terminal 9600 ;watching actions on the PC screen
#No_Data
Symbol gsmTX = D.0
Symbol gsmRX = D.1
Symbol BAUD = T9600_8
high gsmTX ;SERIAL Tx - set the line to default High before using any AT+ commands
high D.2 ;LED indicator
pause 2000
setfreq M8

main:
pause 200
if pinD.3=1 then sendsms ;TRIGGER TO SEND SMS
goto main

sendsms:
pause 800
high gsmTX ;SERIAL Tx - set the line to default High before using any AT+ commands
pause 2000
setfreq M8
serout gsmTX, BAUD, ("AT+IPR=9600_8",CR) ;Baud rate (local) - default is 115200
serout gsmTX,BAUD,("AT+CMGF=1",CR) ;CMFG=Select SMS message format 1=text mode
pause 2000
serout gsmTX,BAUD,("AT+CSCA=",$22,"+61418706700",$22,CR) ;Telstra SMS Router number
pause 2000
serout gsmTX,BAUD,("AT+CMGS=",$22,"+61407xxxxxx",$22,CR) 'target cell phone
pause 2000
serout gsmTX,BAUD,("test message from modem",$1A)
pause 2000
goto main

...but I couldn't get anything to text, then I added one at a time what I thought might be pre-qualifyers befor the main: sub-routine....

serout gsmTX,BAUD,("AT",CR) : pause 200 ' Check if the modem is alive
serout gsmTX,BAUD,("AT+CREG?",CR) : pause 200 ' Returns 0,1 if the network is registered
serout gsmTX,BAUD,("AT+CSQ",CR) : pause 200 ' Check signal strength. 39 is the highest.
serout gsmTX,BAUD,("AT+CSMP=1,,0,0",CR) : pause 200 ' Set the modem in to plain text message mode
serout gsmTX,BAUD,("AT+CMGF=1",CR) : pause 200 ' Use ASCII encoded text messages

... but still nothing. Am I missing something obvious?
Any comments welcome

Thanks, Bryan.
 

inglewoodpete

Senior Member
I notice in your code that you refer to Australian mobile phone numbers.

I'm not particularly knowlegable on the subject but I thought that "GSM" in Australia means 2G. To my knowledge, the last Australian 2G network was shut down on 30th June 2018. Perhaps your circuit is not working because it cannot connect to a network.

Edit: Is the 5320E module capable of 3G?
 
Last edited:

Aries

New Member
Code:
serout gsmTX, BAUD, ("AT+IPR=9600_8",CR) ;Baud rate (local) - default is 115200
One thing strikes me - you are sending the characters 9600_8 as the rate - as this is the symbol for 9600 at Picaxe 8MHz, should you not be using an actual number - e.g. 9600?
 

Bryang

Member
Thx for the replys :)
Pete, yes I am in Australia, up in the Pilbara
my bad describing the modem - it does cover 3g...
SIM5320 E:(link)
- Dual-Band UMTS/HSDPA 900/2100MHz
- Quad-Band GSM/GPRS/EDGE 850/900/1800/1900MHz
• Output power
- WCDMA 850/1900: 0.25W
- WCDMA 900/2100: 0.25W
- GSM850/GSM900: 2W
- DCS1800/PCS1900: 1W
• Control Via AT Commands
• Supply voltage range: 3.4~ 4.2V
• HSDPA - Max. 3.6Mbps(DL)
• WCDMA - Max. 384Kbps(DL),Max.384Kbps(UL)
• EDGE Class: - Max. 236.8Kbps(DL),Max.118Kbps(UL)
• GPRS - Max. 85.6Kbps(DL),Max.42.8Kbps(UL)
• CSD - GSM data rate 14.4Kbps - WCDMA data rate 57.6Kbps - WCDMA 64kbps CSD for Video call
• Multi-PDP connect application

Aries, that makes sense. Have changed that line, but still no joy! but will keep trying :)
 

inglewoodpete

Senior Member
I can really only guess around the edges of your problem. (I used to configure Telstra 1G and 2G mobile exchanges back in the 1990s, so have a grasp of the principles but my configuration knowledge is way out of date).
  • If using Telstra, to my knowledge, only 850MHz band is used in rural and remote areas. You may have to tell the module to use that frequency band.
  • Does the SIM work in a standard 3G/4G phone in the same area? Specifically, can it send and receive SMS?
  • Your code does not have any serial receive code. How do you know the status of your network connection?
  • I would suggest using the 40X2's background serial data reception feature to capture everything that arrives on the serial receive pin (Leg 26).
 
Last edited:

Bryang

Member
A bit more homework, & it looks like Pete was right & the SIM5320E no longer works in Australia (or at least not in rural areas) as carrier Telstra has indeed turned off some of the frequencies that the SIM5320E uses... so it's time to shop for another module!
 
Top