Neoway M590 GSM Texter

neiltechspec

Senior Member
Found a Neoway M590 GSM SMS Text Module on fleabay for £7.90.
Came setup for 9600baud, uses TTL simple AT commands for comms & runs off 3.3v

It's really easy to use, but suggest the datasheets are studied as well.

Code:
#rem

M590 GSM Texter 9600baud
V1.0 Sept 2016

On Power Up module sends :-
MODEM:STARTUP then
+PBREADY when ready for AT commands

Send AT+CMGF=1 for plain text mode

Send AT+CSCS="GSM" for GSM default alphabet

Delete all stored messages
AT+CMGD=0,4
OK

Send Network Check
AT+CREG?
response if registered
+CREG: 0,1

To send SMS Text
AT+CMGS="07702XXXXXX"<CR>(0x0D) to send,
when the indicating symbol &#8216;>&#8217;
appears, input SMS content
"Test Message"
CTRL+Z(0x1A) to send.

Data to   M590 = C.2
Data from M590 = C.3
Ring from M590 = C.4
Input1 on B.1
Input2 on B.2
Input3 on B.3
Input4 on B.4
LED on B.5

#endrem

#picaxe 14M2
#no_data
#terminal 19200

init:
	setfreq m16
	low B.5
	pause 4000
	sertxd("Waiting for Modem Init",13,10)                                       
	serin C.3,T9600_16,("+PBREADY")
	sertxd("Modem Initialised",13,10)
	pause 4000
	serout C.2,T9600_16,("AT+CMGF=1",13)
	pause 4000
	serout C.2,T9600_16,("AT+CSCS=",34,"GSM",34,13)
	pause 4000
	serout C.2,T9600_16,("AT+CMGD=0,4",13)
	gosub check

main:
	if pinB.1 = 0 then gosub alarm1
	if pinB.2 = 0 then gosub alarm2
	if pinB.3 = 0 then gosub alarm3
	if pinB.4 = 0 then gosub alarm4
	pause 1000
	gosub check

alarm1:
	serout C.2,T9600_16,("AT+CMGS=",34,"07702XXXXXX",34,13)
	pause 4000
	serout C.2,T9600_16,(34,"Doorbell",34)
	pause 4000
	serout C.2,T9600_16,(26)
	sertxd("SMS 1 sent",13,10)
	pause 40000
	do until pinB.1=1 loop
	return
	
alarm2:
	serout C.2,T9600_16,("AT+CMGS=",34,"07702XXXXXX",34,13)
	pause 4000
	serout C.2,T9600_16,(34,"House Alarm",34)
	pause 4000
	serout C.2,T9600_16,(26)
	sertxd("SMS 2 sent",13,10)
	pause 40000
	do until pinB.2=1 loop
	return
	
alarm3:
	serout C.2,T9600_16,("AT+CMGS=",34,"07702XXXXXX",34,13)
	pause 4000
	serout C.2,T9600_16,(34,"Alarm 3",34)
	pause 4000
	serout C.2,T9600_16,(26)
	sertxd("SMS 3 sent",13,10)
	pause 40000
	do until pinB.3=1 loop
	return

alarm4:
	serout C.2,T9600_16,("AT+CMGS=",34,"07702XXXXXX",34,13)
	pause 4000
	serout C.2,T9600_16,(34,"Alarm 4",34)
	pause 4000
	serout C.2,T9600_16,(26)
	sertxd("SMS 4 sent",13,10)
	pause 40000
	do until pinB.4=1 loop
	return

check:
	pause 4000
	serout C.2,T9600_16,("AT+CREG?",13)
	serin [4000],C.3,T9600_16,("+CREG: "),b1,b2,b3
		
	if b1 = 48 and b3 = 48 then
	 sertxd("Not Searching",13,10)
	 low B.5
	 goto check
	endif
	
	if b1 = 48 and b3 = 49 then
	sertxd("Network ok",13,10)
	 high B.5
	 goto main
	endif

	if b1 = 48 and b3 = 50 then
	 sertxd("Refused",13,10)
	 low B.5
	 goto check
	endiF
	
	if b1 = 48 and b3 = 51 then
	 sertxd("Searching",13,10)
	 low B.5
	 goto check
	endif
	
	sertxd("Network Invalid response",13,10)
	
	goto check
Neil
 
Last edited:

lbenson

Senior Member
Interesting part. Thanks for the code.

I just ordered 2 in kit form for under $2 U.S. each including shipping. Can you post the datasheet?
 

neiltechspec

Senior Member
Unfortunately, the file sizes are too large for this forum.
Easy enough to find on google though - I did.

They are called:
neoway-m590-hardware-design-manual-v1.pdf
neoway-m590-at-command-sets-v3.pdf

Just be aware, the datasheets say 115k is the default baud rate. Mine came as 9600.

Neil.
 

zorgloub

Member
Hello neiltechspec, Hello everyone,
For info, I had already tested these Neoway M950 modules but they do not seem very sensitive and the connection to the network is particularly painful.
So I'll test the Sim800 and Sim900 ...
cordially
 
Last edited:

ZUBIARRAIN

New member
Bonjour

Je recherche un code picaxe avec sim800 et je regarde votre croquis sans écran et juste une alarme. Pensez-vous si mon code est correctement écrit. Merci beaucoup.

#rem

M590 GSM Texter 9600baud
V1.0 septembre 2016

Lors de la mise sous tension, le module envoie: -
MODEM: DEMARRAGE puis
+ PBREADY lorsqu'il est prêt pour les commandes AT

Envoyer AT + CMGF = 1 pour le mode texte brut

Envoyer AT + CSCS = "GSM" pour l'alphabet par défaut GSM

Supprimer tous les messages stockés
À + CMGD = 0,4
d'accord

Envoyer une vérification du réseau
À + CREG?
réponse si enregistré
+ CREG: 0,1

Pour envoyer du texte SMS
AT + CMGS = "0664843535" <CR> (0x0D) pour envoyer,
lorsque le symbole indicateur & # 8216;> & # 8217;
apparaît, saisissez le contenu du SMS
"Message d'essai"
CTRL + Z (0x1A) pour envoyer.

Données vers SIM800 = C.2
Données de SIM800 = C.3
Input1 sur B.1

#endrem

#picaxe 14M2
#pas de données
#terminal 19200

init:
setfreq m16
pause 4000
serine C.3, T9600_16, ("+ PBREADY")
pause 4000
serout C.2, T9600_16, ("AT + CMGF = 1", 13)
pause 4000
serout C.2, T9600_16, ("AT + CSCS =", 34, "GSM", 34,13)
pause 4000
serout C.2, T9600_16, ("AT + CMGD = 0,4", 13)
chèque gosub

principale:
si pinB.1 = 0 alors gosub alarm1
pause 1000
chèque gosub

alarm1:
serout C.2, T9600_16, ("AT + CMGS =", 34, "0664843535", 34,13)
pause 4000
serout C.2, T9600_16, (34, "Alarme piège 1", 34)
pause 4000
serout C.2, T9600_16, (26)
sertxd ("SMS 1 envoyé", 13,10)
pause 40000
faire jusqu'à ce que pinB.1 = 1 boucle
revenir

Chèque:
pause 4000
serout C.2, T9600_16, ("AT + CREG?", 13)
serin [4000], C.3, T9600_16, ("+ CREG:"), b1

aller vérifier la pause 40000
faire jusqu'à ce que pinB.1 = 1 boucle
revenir

aller vérifier
 
Top