Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Serial Gateway not working after Raspberry Pi upgrade

Serial Gateway not working after Raspberry Pi upgrade

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CraigDubya
    wrote on last edited by CraigDubya
    #1

    Hi,

    I recently upgraded my raspberry pi with sudo apt-get upgrade.

    It must have overwritten config files because my serial gateway has stopped working.

    It's been a long time since I got it working, and I think the problem lies with specifying the usb port it is plugged in to.

    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=1
    mysgw: TSM:FAIL:PDT
    mysgw: TSM:FAIL:RE-INIT
    mysgw: TSM:INIT
    mysgw: !TSM:INIT:TSP FAIL
    
    

    I have tried:

    sudo ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
    

    and:

    sudo ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB0
    

    but it is still failing.

    Can anyone suggest anything that I am missing?

    I am using an Arduino Nano with nrf24 connected to raspberry pi via USB.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      CraigDubya
      wrote on last edited by
      #2

      I have installed Arduino IDE on the raspberry pi, and opened a terminal window.

      I can see that the arduino nano is receiving messages from my sensor nodes, so it is definately my raspberry pi configuration.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CraigDubya
        wrote on last edited by
        #3

        Can anyone help?

        mfalkviddM 1 Reply Last reply
        0
        • C CraigDubya

          Can anyone help?

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @craigdubya the rapberry pi gateway is not for usb-connected Arduinos. The raspberry pi gateway is used when the nrf24 module is wired directly to the gpio pins on the raspberry pi, without using an Arduino.

          With your setup, you don't need the raspberry pi gateway. Just configure your controller to use the usb device that represents your Arduino Nano.

          C 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @craigdubya the rapberry pi gateway is not for usb-connected Arduinos. The raspberry pi gateway is used when the nrf24 module is wired directly to the gpio pins on the raspberry pi, without using an Arduino.

            With your setup, you don't need the raspberry pi gateway. Just configure your controller to use the usb device that represents your Arduino Nano.

            C Offline
            C Offline
            CraigDubya
            wrote on last edited by
            #5

            @mfalkvidd Ahh ok, so it seems that my openhab setup is the problem here. I will continue to try to understand the problem, since the whole purpose of the raspberry pi upgrade was to upgrade openhab to version 2.2.

            I'll hop over to their forums and try and understand what has changed since my upgrade.

            Thanks! :)

            C 1 Reply Last reply
            1
            • C CraigDubya

              @mfalkvidd Ahh ok, so it seems that my openhab setup is the problem here. I will continue to try to understand the problem, since the whole purpose of the raspberry pi upgrade was to upgrade openhab to version 2.2.

              I'll hop over to their forums and try and understand what has changed since my upgrade.

              Thanks! :)

              C Offline
              C Offline
              CraigDubya
              wrote on last edited by CraigDubya
              #6

              I have a new problem regarding the mysensors serial gateway.

              I have started with a fresh install of Openhab, and have found the documents detailing how to install an up to date java 8 version confusing and out of date. With that said, I'm not sure my java is working properly which may be causing this problem.

              I have installed the mysensors binding via the paperUI marketplace, and after adding the serial gateway and configuring it, it says UNINITIALIZED - HANDLER_INITIALIZING_ERROR.

              The logs in karafe gives:

              00:30:44.518 [DEBUG] [org.openhab.binding.mysensors        ] - BundleEvent STARTING - org.openhab.binding.mysensors
              00:30:44.529 [DEBUG] [org.openhab.binding.mysensors        ] - BundleEvent STARTED - org.openhab.binding.mysensors
              00:30:44.686 [DEBUG] [org.openhab.binding.mysensors        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=212, service.id=343, service.bundleid=225, service.scope=bundle} - org.openhab.binding.mysensors
              00:30:45.167 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:7e41fb40' changed from UNINITIALIZED to INITIALIZING
              00:30:45.250 [DEBUG] [ensors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
              00:30:45.294 [DEBUG] [sensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
              00:30:45.299 [DEBUG] [sensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: null
              00:30:45.304 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@18c1f58': null
              java.lang.NullPointerException: null
                      at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.loadCacheFile(MySensorsBridgeHandler.java:172) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
                      at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:79) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
                      at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) ~[?:?]
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
                      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
                      at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
                      at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
                      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
                      at java.lang.Thread.run(Thread.java:748) [?:?]
              00:30:45.345 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:7e41fb40' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR)
              00:30:45.344 [ERROR] [home.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'mysensors:bridge-ser:7e41fb40': null
              java.lang.NullPointerException: null
                      at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.loadCacheFile(MySensorsBridgeHandler.java:172) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
                      at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:79) [225:org.openhab.binding.mysensors:2.3.0.201803141156]
                      at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) ~[?:?]
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
                      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
                      at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
                      at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
                      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
                      at java.lang.Thread.run(Thread.java:748) [?:?]
              

              Can anyone help me to debug this problem?

              I can confirm that when using the command:

              screen /dev/ttyUSB0 115200
              

              I can see the debug information coming from the gateway:

              0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGA---,VER=2.2.0
              0;255;3;0;9;4 TSM:INIT
              0;255;3;0;9;6 TSF:WUR:MS=0
              0;255;3;0;9;14 TSM:INIT:TSP OK
              0;255;3;0;9;17 TSM:INIT:GW MODE
              0;255;3;0;9;20 TSM:READY:ID=0,PAR=0,DIS=0
              0;255;3;0;9;23 MCO:REG:NOT NEEDED
              0;255;3;0;14;Gateway startup complete.
              0;255;0;0;18;2.2.0
              0;255;3;0;9;28 MCO:BGN:STP
              0;255;3;0;9;34 MCO:BGN:INIT OK,TSP=1
              

              And when I operate a sensor node:

              0;255;3;0;9;141450 TSF:MSG:READ,102-102-0,s=1,c=1,t=38,pt=7,l=5,sg=0:3.4
              102;1;1;0;38;3.4
              0;255;3;0;9;141457 TSF:MSG:READ,102-102-0,s=255,c=3,t=0,pt=1,l=1,sg=0:102
              102;255;3;0;0;102
              0;255;3;0;9;141470 TSF:MSG:READ,102-102-0,s=2,c=1,t=16,pt=1,l=1,sg=0:1
              102;2;1;0;16;1
              

              However, if I use the command:

              cat /dev/ttyUSB0
              

              I get nothing.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              22

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular