NetXMS Support Forum

English Support => General Support => Topic started by: praim on August 04, 2015, 12:34:37 AM

Title: SMS config
Post by: praim on August 04, 2015, 12:34:37 AM
Hello at first, sorry for my english language.
I have proxmox server and on that I have debian wheezy with netxms stable (1.2.17) but i can't send sms. I set up huawei modem (huawei k3765) on debian with no problem. My setting in netxms
SMSdriver = generis.sms restart = yes
SMSDrvConf = /dev/ttyUSB2 restart = yes

When I sent sms, it show me that SMS has been send but into my phone doesn't receive it.
Thank you for help
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 04, 2015, 03:10:02 AM
1) verify driver name, it should be "generic.sms"
2) Check driver configration:SMSDrvConfig=/dev/ttyUSB2,9600,8,N,1,T

Fields in SMSDrvConfig are:
1 - device name
2 - speed
3 - data bits
4 - parity: n/o/e (none/odd/even)
5 - stop bits: 1/2
6 - sending mode, T / P (text / PDU. Some modems support only text, some works only with PDU. Unicode can be send only in PDU mode)

3) Increase debug level of the server to 5 and look for "SMS: " in the log.
Title: Re: SMS config
Post by: praim on August 04, 2015, 08:26:26 PM
Thank you for answer ;) Now i look into log file and i see:"unable to load module "generic.sms" : generic.sms: cannot open shared object file: no such file or directory

And how can i change debug level? I find, that i have to write into netxmsd.conf DebugLevel = 5 but in  the log, i can't se anything with sms. 
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 05, 2015, 03:23:53 PM
Driver was not loaded, hence no debug messages.

Try to set SMSDriver to full file name with path, then restart server.
Sample setup:AirAlk:core(develop) $ find /opt/netxms -name \*generic\*
/opt/netxms/lib/libnxsms_generic.1.dylib
/opt/netxms/lib/libnxsms_generic.2.dylib
/opt/netxms/lib/libnxsms_generic.dylib
AirAlk:core(develop) $ ls -al /opt/netxms/lib/libnxsms_generic.dylib
lrwxr-xr-x  1 alk  wheel  24 Jul 26 12:14 /opt/netxms/lib/libnxsms_generic.dylib -> libnxsms_generic.2.dylib
AirAlk:core(develop) $ nxdbmgr get SMSDriver
NetXMS Database Manager Version 2.0-RC1 Build 8032

/opt/netxms/lib/libnxsms_generic.dylib


P.S. You can also change debug level in runtime. Go to Tools -> Server Console and type "debug X", where "X" is desired debug level.
Title: Re: SMS config
Post by: praim on August 05, 2015, 03:38:59 PM
/opt/netxms doesn't exist. But when I try to find in root director, can't find somenthing like "libnxsms_generic"
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 05, 2015, 03:40:44 PM
/opt/netxms is just an example from my system.
Try find / -name libnxsms_generic\*
Title: Re: SMS config
Post by: praim on August 05, 2015, 04:28:47 PM
Thank you, so i find /usr/lib/libnxsms_generic.so when I take this in SMSDriver, I can see in the log "failed to open port" Is it problem with /dev/ttyUSB2?

Thank you
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 05, 2015, 05:03:22 PM
Yes, server can't open /dev/ttyUSB2 for some reason.

You can check port using "screen" command (if you have it installed):screen /dev/ttyUSB2 9600
Press enter couple of times, try to enter "AT" and press enter – you should get reply from modem.
Title: Re: SMS config
Post by: praim on August 05, 2015, 05:06:41 PM
Ok here is screen command
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 06, 2015, 01:54:45 PM
I'm pretty much sure that you use wrong port. Most USB modems provide multiple ports – one for communications, one for diagnostic messages, and one or two for other purposes. Looks like you are using diagnostic port. Try other /dev/ttyUSB* ports with screen – it should respond to "ATI" command with modem information (vendor, model, etc.)
Title: Re: SMS config
Post by: praim on August 06, 2015, 02:00:36 PM
yes, this modem have 3 ports. But now i start server and use ttyUSB2 and sms was send. I don't now how, but problem is solved :). Thank you very much for your help. And when i post in "screen" command "ATI" it show me model, imei etc.

So thank you.
Title: Re: SMS config
Post by: praim on August 06, 2015, 02:03:37 PM
so error again, but in log is:" ReadToOK: read to mark returned -1"
Title: Re: SMS config
Post by: Alex Kirhenshtein on August 06, 2015, 02:28:50 PM
That's not an error, just diagnostics. Try to send one more message to verify that it works.
Title: Re: SMS config
Post by: praim on August 06, 2015, 02:34:25 PM
it sent only one sms. When i try to send next, in log is