SMS config

Started by praim, August 04, 2015, 12:34:37 AM

Previous topic - Next topic

praim

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

Alex Kirhenshtein

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.

praim

#2
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. 

Alex Kirhenshtein

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.

praim

/opt/netxms doesn't exist. But when I try to find in root director, can't find somenthing like "libnxsms_generic"

Alex Kirhenshtein

/opt/netxms is just an example from my system.
Try find / -name libnxsms_generic\*

praim

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

Alex Kirhenshtein

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.

praim

Ok here is screen command

Alex Kirhenshtein

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.)

praim

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.

praim

so error again, but in log is:" ReadToOK: read to mark returned -1"

Alex Kirhenshtein

That's not an error, just diagnostics. Try to send one more message to verify that it works.

praim

it sent only one sms. When i try to send next, in log is