Ad Widget

Collapse

GSM/LTE USB modem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • it.tech
    Junior Member
    • May 2021
    • 28

    #1

    GSM/LTE USB modem

    Guys, I would highly appreciate any advice if I can make it work.
    I really need to have Zabbix send SMS/text based alerts and can't find the GSM modem described in the document.
    Instead I have connected this device to the server and it was recognized, it is MiFi 7000 device with SIM card.

    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: new high-speed USB device number 4 using ehci-pci
    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: New USB device found, idVendor=1410, idProduct=b020, bcdDevice= 3.10
    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: Product: MiFi 7000
    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: Manufacturer: Novatel Wireless
    Nov 10 12:07:31 zabbix kernel: usb 1-3.1: SerialNumber: 0123456789ABCDEF
    Nov 10 12:07:31 zabbix kernel: usbcore: registered new interface driver cdc_ether
    Nov 10 12:07:31 zabbix kernel: rndis_host 1-3.1:1.0 eth0: register 'rndis_host' at usb-0000:00:1a.7-3.1, RNDIS device, 00:15:ff:50:92:67
    Nov 10 12:07:31 zabbix kernel: usbcore: registered new interface driver rndis_host

    lsusb on the contrary doesn't show me anything meaningful about this device:

    [root@zabbix ~]# lsusb
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 002: ID 0624:0248 Avocent Corp. Virtual Hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 003: ID 413c:2107 Dell Computer Corp. KB212-B Quiet Key Keyboard
    Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    And of course there's no device for ttyUSB

    ls /dev/ttyUSB*
    [root@zabbix ~]# ls /dev/ttyUSB*
    ls: cannot access '/dev/ttyUSB*': No such file or directory
    Last edited by it.tech; 12-11-2021, 04:37.
  • it.tech
    Junior Member
    • May 2021
    • 28

    #2
    Anyone? Anything ?
    Буду очень сильно благодарен за помощь!

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      On my RHEL7 Zabbix server, the USB modem uses the "cdc_acm" driver and the device shows up as /dev/ttyACM0.

      From 'dmesg':

      Code:
      [ 9.916177] cdc_acm 1-1.4:2.0: ttyACM0: USB ACM device
      [ 9.916611] usbcore: registered new interface driver cdc_acm
      [ 9.916611] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
      Since your driver is 'cdc_ether' rather than 'cdc_acm', you may want to do some research to see if it's going to show up as some other device path.

      Comment

      • it.tech
        Junior Member
        • May 2021
        • 28

        #4
        thank you, Tim ! This is a good catch for the driver type. Apparently I do need to try another device. My Zabbix runs on Fedora which is essentially the same as your RHEL but with more deviations from the standard set of drivers to support USB/GSM modems.

        Comment

        • it.tech
          Junior Member
          • May 2021
          • 28

          #5
          Hello,
          I couldn't find anything better or newer or older to have the system detect it as cdc_acm device.
          But upon plugging a Netgear LTE device I have the system recognized it as follows:

          [350931.382420] usb 1-3.1: new high-speed USB device number 4 using ehci-pci
          [350931.495610] usb 1-3.1: New USB device found, idVendor=0846, idProduct=68e1, bcdDevice= 2.28
          [350931.495617] usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
          [350931.495620] usb 1-3.1: Product: AirCard 785S
          [350931.495622] usb 1-3.1: Manufacturer: NETGEAR, Inc.
          [350931.495625] usb 1-3.1: SerialNumber: 014197000089498
          [350931.581480] usbcore: registered new interface driver cdc_ether
          [350931.601986] rndis_host 1-3.1:1.0 eth0: register 'rndis_host' at usb-0000:00:1a.7-3.1, RNDIS device, 00:a0:c6:00:00:00

          I have a new interface showing with the IP address assigned to it:

          enp0s26f7u3u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1430
          inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255
          inet6 fe80::e928:cb71:ed93:da4 prefixlen 64 scopeid 0x20<link>
          ether 00:a0:c6:00:00:00 txqueuelen 1000 (Ethernet)
          RX packets 432 bytes 30934 (30.2 KiB)
          RX errors 0 dropped 0 overruns 0 frame 0
          TX packets 450 bytes 59301 (57.9 KiB)
          TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

          And running ethtools shows me the specific driver used for this devices:

          [root@zabbix ~]# ethtool -i enp0s26f7u3u1
          driver: rndis_host
          version: 5.14.16-201.fc34.x86_64
          firmware-version: RNDIS device
          expansion-rom-version:
          bus-info: usb-0000:00:1a.7-3.1
          supports-statistics: no
          supports-test: no
          supports-eeprom-access: no
          supports-register-dump: no
          supports-priv-flags: no

          Do I have any chances of moving ahead and do something about it to have it activated as a real GSM modem to send alerts ?
          If yes, what would be the next step?

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            I think you definitely have a chance, but you're going to have to do some research to figure out your best options.

            I've not personally worked with an RNDIS device on Linux, but some quick web searching implies that some of them can be switched via USB /sys entrypoints to act more like a serial device.

            A global supplier of wireless components, IOT solutions and tech support. Specialist in LTE, 5G, WI-FI, GPS modules, antennas and RF cable assembly.


            Looks like you should start with 'lsusb' and also do some poking around in the /sys/bus/usb/devices/<your usb ID here>/ , probably in combination with a lot of web searching.

            Keep us informed as you make progress or about the roadblocks you run into.

            Comment

            • it.tech
              Junior Member
              • May 2021
              • 28

              #7
              Thank you, Tim. I don't know if I need to poke around and do changes as it is described in the beginning of the page you referred me to.
              I think my Fedora Linux kernel properly identified the device and loaded the driver for it, correct me if I'm wrong.
              Here's the output of ifconfig with enp0s26f7u3u1 interface whose MAC address is linked to the device reported by dmesg

              rndis_host 1-3.1:1.0 eth0: register 'rndis_host' at usb-0000:00:1a.7-3.1, RNDIS device, 00:a0:c6:00:00:00

              [root@zabbix ~]# ifconfig
              eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
              inet 172.16.0.94 netmask 255.255.252.0 broadcast 172.16.3.255
              inet6 fe80::862b:2bff:fe6a:5f1 prefixlen 64 scopeid 0x20<link>
              ether 84:2b:2b:6a:05:f1 txqueuelen 1000 (Ethernet)
              RX packets 13954644 bytes 1403067313 (1.3 GiB)
              RX errors 0 dropped 31981 overruns 0 frame 0
              TX packets 8335081 bytes 903492150 (861.6 MiB)
              TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

              enp0s26f7u3u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1430
              inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255
              inet6 fe80::e928:cb71:ed93:da4 prefixlen 64 scopeid 0x20<link>
              ether 00:a0:c6:00:00:00 txqueuelen 1000 (Ethernet)
              RX packets 1407 bytes 95742 (93.4 KiB)
              RX errors 0 dropped 0 overruns 0 frame 0
              TX packets 1446 bytes 188797 (184.3 KiB)
              TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

              And my ping to Internet sourcing from this interface

              [root@zabbix ~]# ping -I enp0s26f7u3u1 1.1.1.1
              PING 1.1.1.1 (1.1.1.1) from 192.168.1.4 enp0s26f7u3u1: 56(84) bytes of data.
              64 bytes from 1.1.1.1: icmp_seq=1 ttl=50 time=181 ms
              64 bytes from 1.1.1.1: icmp_seq=2 ttl=50 time=19.8 ms

              Having it proved on the device/driver level what's the next step ?

              Comment

              • tim.mooney
                Senior Member
                • Dec 2012
                • 1427

                #8
                You're correct that the kernel loaded a driver for the device, and the device appears to be working as a NIC. In theory, that should work for alerting. Depending upon how your media types are configured, your alerts could go out over that link as SMTP messages or HTTP(S) POST or something else to an external site, to trigger an alert.

                What I can't answer for you is if that's a good idea or not. Imagine the trouble you could end up with if you end up with a routing issue and traffic you're not expecting to go over that link does. A scenario where you get a very expensive phone bill because of an oops on your Zabbix monitoring server seems like it might be possible, unless you're very careful.

                At least in the case of the article I linked, that particular device was capable of operating both as a NIC and as a more traditional modem. Most of the setups I've seen for SMS integration with Zabbix have stayed closer to the traditional modem route, e.g.


                https://techexpert.tips/zabbix/zabbi...ication-setup/

                Another article I found goes into a bit more detail about these types of devices, so this might be worth a read:

                Home of USB_ModeSwitch - Activating Switchable USB Devices on Linux


                One other thing. Your SMS provider may have recommendations about how to connect to them. That may influence how you decide to proceed too.

                Comment

                • it.tech
                  Junior Member
                  • May 2021
                  • 28

                  #9
                  Had to put it aside, other more prioritized challenges popped up.
                  Well, I'm a bit confused now. First of all, once this device is installed with the new network interface it created an additional default route and it screwed up Zabbix normal communication
                  [root@zabbix ~]# route
                  Kernel IP routing table
                  Destination Gateway Genmask Flags Metric Ref Use Iface
                  default _gateway 0.0.0.0 UG 100 0 0 enp0s26f7u3u1
                  default _gateway 0.0.0.0 UG 101 0 0 eno1
                  172.16.0.0 0.0.0.0 255.255.252.0 U 101 0 0 eno1
                  192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s26f7u3u1

                  Second,
                  There's no /dev/ttyUSb device in the system no matter what I do. How would I complete the setup Media types
                  I have no clue, what device am I pointing it to under /dev/ directory ?

                  Comment

                  Working...