Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modem.on('sms received') not working, sms not incoming. #41

Open
websharik opened this issue Jul 21, 2018 · 1 comment
Open

modem.on('sms received') not working, sms not incoming. #41

websharik opened this issue Jul 21, 2018 · 1 comment

Comments

@websharik
Copy link

websharik commented Jul 21, 2018

Modem HUAWEI E1715. SMS sends ok.

modem.open('COM5', function(){
	modem.on('sms received', function(smsc, sender, time, text) {
		console.log('sms in');
		console.log('sender:'+sender+' text:'+text);
	});

	modem.getMessages(function(messages) {
		console.log(messages);
	});
});

setInterval(function(){}, 1000);

getMessages return empty arr

@websharik
Copy link
Author

#5 was help me. alexislg2 sometimes not get sms, but me never get sms.

SMS incoming:

modem.open('COM6', function(){
	console.log('modem ready');

	modem.execute('AT+CNMI=2,1,0,2,0');
	setInterval(function(){modem.execute('AT+CNMI=2,1,0,2,0');}, 4000);
	
	modem.on('sms received', function(sms) {
		console.log('sms in');
		console.log(sms);
	});
});

SMS not incoming.

modem.open('COM6', function(){
	console.log('modem ready');

	modem.execute('AT+CNMI=2,1,0,2,0');
	//setInterval(function(){modem.execute('AT+CNMI=2,1,0,2,0');}, 4000);
	
	modem.on('sms received', function(sms) {
		console.log('sms in');
		console.log(sms);
	});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant