Discussion:
[opennms-discuss] preferred sms modem
onmstester onmstester
2017-02-08 07:22:30 UTC
Permalink
I'm using opennms in OEL 6.6. We want to send notifications via SMS.

Would you please recommend a SMS modem to be used?

If anyone have tried that i would appreciate if reply the type and model of the modem and required configuration (linux or windows). Actually i've never deal with this type of modems and just a little worried about buying a non-compliant modem.



Thanks in Advance.
Cyrille Bollu
2017-02-08 09:24:01 UTC
Permalink
Hello,

We use a simple Huawei model K4505 3G USB stick.

We had 3 issues to address:


1. Our OpenNMS is a virtual machine hosted in a VMWare chassis: We had
to set-up some pass-through to stop the ESX host from locking the device
effectively preventing our OpenNMS VM to use it
2. This kind of USB stick often also present a block device to the OS in
addition the the modem device. This block device usually countains a small
FAT32 partition containing drivers for the USb stick. On Windows, when you
plug the USM modem for the first time, it will mount as a block device
allowing you to install the driver that turn the stick in a modem. On a
linux box, this procedure doesn't work at all but still the USB stick will
be seen as a block device instead of a modem, and you'll have to turn it
into a modem yourself using the usb_modeswitch tool. Hereunder you'll find
what we exactly did for our Huawei key
3. Once in serial/modem mode, the USB stick will be mounted at some
/dev/ttyUSBxxxx point. On our Ubuntu box, this mount point might change at
every reboot. We therefore had to add a udev rule to make sure it always
mounts at the same mount point. See hereunder for the exact udev rule we're
using.

In addition, since this USB stick is not of professional quality, it
sometimes hangs (approx. 2-3 times a year). We therefore have cronjobs to
regularly tests the modem (and report alarms to OpenNMS when they fail ;-)
).

That's it for us.

Cheers,

Cyrille

*udev rule to has a static mount point for the USB 3G modem *

***@opennms:/etc/opennms# <http://opennms/etc/opennms> cat
/etc/udev/rules.d/999-sms-gateway.rules
# This rules create a symlink from /dev/sms to wathever ttyUSB device
is created for the SMS gateway
# Gammu is configured to use /dev/sms to send SMS
(see /etc/gammurc)
SUBSYSTEM=="tty", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0016",
SYMLINK+="sms"


*How to change a Huawei model K4505 3G USB stick from block device mode to
serial (modem) mode:*
$lsusb
Bus 002 Device 006: ID 12d1:1521 Huawei Technologies Co., Ltd.

$usb_modeswitch -v 0x12d1 -p 0x1521 -M
55534243123456780000000000000011060000000000000000000000000000

Looking for default devices ...
Found default devices (1)
Accessing device 006 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
Vendor String: Vodafone
Model String: CD ROM (Huawei)
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: Vodafone Group (Huawei)
Product: Vodafone Mobile Broadband (Huawei)
Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
OK, message successfully sent
-> Run lsusb to note any changes. Bye.

$lsusb
Bus 002 Device 009: ID 12d1:1464 Huawei Technologies Co., Ltd

$modprobe usbserial vendor=0x12d1 product=0x1464

$ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
Post by onmstester onmstester
I'm using opennms in OEL 6.6. We want to send notifications via SMS.
Would you please recommend a SMS modem to be used?
If anyone have tried that i would appreciate if reply the type and model
of the modem and required configuration (linux or windows). Actually i've
never deal with this type of modems and just a little worried about buying
a non-compliant modem.
Thanks in Advance.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom of
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Seth Leger
2017-02-10 04:32:55 UTC
Permalink
This is a fantastic tutorial Cyrille. Do you mind adding a page to the
wiki about this? The only other SMS tutorial I can think of off hand was
a blog post from Tarus a year or two ago.

Seth Leger
The OpenNMS Group
Post by Cyrille Bollu
Hello,
We use a simple Huawei model K4505 3G USB stick.
1. Our OpenNMS is a virtual machine hosted in a VMWare chassis: We had
to set-up some pass-through to stop the ESX host from locking the
device effectively preventing our OpenNMS VM to use it
2. This kind of USB stick often also present a block device to the OS
in addition the the modem device. This block device usually
countains a small FAT32 partition containing drivers for the USb
stick. On Windows, when you plug the USM modem for the first time,
it will mount as a block device allowing you to install the driver
that turn the stick in a modem. On a linux box, this procedure
doesn't work at all but still the USB stick will be seen as a block
device instead of a modem, and you'll have to turn it into a modem
yourself using the usb_modeswitch tool. Hereunder you'll find what
we exactly did for our Huawei key
3. Once in serial/modem mode, the USB stick will be mounted at some
/dev/ttyUSBxxxx point. On our Ubuntu box, this mount point might
change at every reboot. We therefore had to add a udev rule to make
sure it always mounts at the same mount point. See hereunder for the
exact udev rule we're using.
In addition, since this USB stick is not of professional quality, it
sometimes hangs (approx. 2-3 times a year). We therefore have cronjobs
to regularly tests the modem (and report alarms to OpenNMS when they
fail ;-) ).
That's it for us.
Cheers,
Cyrille
_*udev rule to has a static mount point for the USB 3G modem *_
# This rules create a symlink from /dev/sms to wathever ttyUSB device is created for the SMS gateway
# Gammu is configured to use /dev/sms to send SMS (see /etc/gammurc)
SUBSYSTEM=="tty", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0016", SYMLINK+="sms"
_*How to change a Huawei model K4505 3G USB stick from block device mode
to serial (modem) mode:*_
|$lsusb|
|Bus ||002| |Device ||006||: ID 12d1:||1521| |Huawei Technologies Co., Ltd.|
|$usb_modeswitch -v ||0x12d1| |-p ||0x1521| |-M
||55534243123456780000000000000011060000000000000000000000000000|
|Looking ||for| |default| |devices ...|
| ||Found ||default| |devices (||1||)|
|Accessing device ||006| |on bus ||002| |...|
|Using endpoints ||0x01| |(out) and ||0x81| |(in)|
|Inquiring device details; driver will be detached ...|
|Looking ||for| |active driver ...|
| ||OK, driver found (||"usb-storage"||)|
| ||OK, driver ||"usb-storage"| |detached|
|Received inquiry data (detailed identification)|
|-------------------------|
| ||Vendor String: Vodafone|
| ||Model String: CD ROM (Huawei)|
|Revision String: ||2.31|
|-------------------------|
|Device description data (identification)|
|-------------------------|
|Manufacturer: Vodafone Group (Huawei)|
| ||Product: Vodafone Mobile Broadband (Huawei)|
| ||Serial No.: not provided|
|-------------------------|
|Setting up communication with ||interface| |0| |...|
|Trying to send the message to endpoint ||0x01| |...|
| ||OK, message successfully sent|
|-> Run lsusb to note any changes. Bye.|
|$lsusb|
|Bus ||002| |Device ||009||: ID 12d1:||1464| |Huawei Technologies Co., Ltd|
|$modprobe usbserial vendor=||0x12d1| |product=||0x1464|
|$ls /dev/ttyUSB*|
|/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 |
__
I'm using opennms in OEL 6.6. We want to send notifications via SMS.
Would you please recommend a SMS modem to be used?
If anyone have tried that i would appreciate if reply the type and
model of the modem and required configuration (linux or windows).
Actually i've never deal with this type of modems and just a little
worried about buying a non-compliant modem.
Thanks in Advance.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
<http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
<https://lists.sourceforge.net/lists/listinfo/opennms-discuss>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss

Continue reading on narkive:
Loading...