Skip to content
  • 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. ST=Fail unless I'm watching it
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

ST=Fail unless I'm watching it

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 3 Posters 1.6k Views 3 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.
  • jerseyguy1996J Offline
    jerseyguy1996J Offline
    jerseyguy1996
    wrote on last edited by
    #1

    Okay that subject could probably use some work but hopefully I can explain things. I have a Raspberry PI 3 running PiGatewaySerial, and I have an arduino running the BinarySwitchSensor example code. When I first started the code I was getting ST=Fail about 90 percent of the time.

    alt text

    The image shows the serial monitor for the arduino on the right side of the picture and the terminal window for the Raspberry Pi on the left.

    Just to check the operation of the radios I ran the "gettingstarted" sketch in the RF24 library on both the raspberry pi and the arduino. The picture below shows that the radios are purring along like a kitten. No missed transmissions.

    alt text

    On a whim I decided to view the output of the ttyMySensorsGateway while the PiGatewaySerial process was running and suddenly it started working. What's more whacky, if I stopped watching the ttyMySensorsGateway it would start missing transmissions again. Then when I started watching it would start working.

    alt text

    I don't know nearly enough about the inner workings of the library to know where to even begin figuring out the source of this behavior. Any hints as to why it might be doing this?

    AWIA 1 Reply Last reply
    0
    • jerseyguy1996J Offline
      jerseyguy1996J Offline
      jerseyguy1996
      wrote on last edited by
      #2

      Well the pictures don't seem to show up.

      These links should work. The pictures in order:

      https://flic.kr/p/J3dw4Z

      https://flic.kr/p/J3dvfe

      https://flic.kr/p/J3dwQZ

      AWIA sundberg84S 2 Replies Last reply
      0
      • jerseyguy1996J jerseyguy1996

        Well the pictures don't seem to show up.

        These links should work. The pictures in order:

        https://flic.kr/p/J3dw4Z

        https://flic.kr/p/J3dvfe

        https://flic.kr/p/J3dwQZ

        AWIA Offline
        AWIA Offline
        AWI
        Hero Member
        wrote on last edited by
        #3

        @jerseyguy1996 I can hardly read the pictures. you can copy/paste the images in your posting. Screencopy - I usually use the 'snipping tool' in Windows.

        1 Reply Last reply
        0
        • jerseyguy1996J jerseyguy1996

          Okay that subject could probably use some work but hopefully I can explain things. I have a Raspberry PI 3 running PiGatewaySerial, and I have an arduino running the BinarySwitchSensor example code. When I first started the code I was getting ST=Fail about 90 percent of the time.

          alt text

          The image shows the serial monitor for the arduino on the right side of the picture and the terminal window for the Raspberry Pi on the left.

          Just to check the operation of the radios I ran the "gettingstarted" sketch in the RF24 library on both the raspberry pi and the arduino. The picture below shows that the radios are purring along like a kitten. No missed transmissions.

          alt text

          On a whim I decided to view the output of the ttyMySensorsGateway while the PiGatewaySerial process was running and suddenly it started working. What's more whacky, if I stopped watching the ttyMySensorsGateway it would start missing transmissions again. Then when I started watching it would start working.

          alt text

          I don't know nearly enough about the inner workings of the library to know where to even begin figuring out the source of this behavior. Any hints as to why it might be doing this?

          AWIA Offline
          AWIA Offline
          AWI
          Hero Member
          wrote on last edited by
          #4

          @jerseyguy1996 the 'fail' messages occur when the serial gateway does not acknowledge the send. I assume when you are 'not watching' the gateway is 'off'. Not that only you a looking in different direction. Although the last would be interesting as a sensor :smile:

          jerseyguy1996J 1 Reply Last reply
          1
          • jerseyguy1996J jerseyguy1996

            Well the pictures don't seem to show up.

            These links should work. The pictures in order:

            https://flic.kr/p/J3dw4Z

            https://flic.kr/p/J3dvfe

            https://flic.kr/p/J3dwQZ

            sundberg84S Offline
            sundberg84S Offline
            sundberg84
            Hardware Contributor
            wrote on last edited by
            #5

            @jerseyguy1996 - "st=fail" means the receiving node or gateway has problems sending ack back to the sending node.

            Its probably a hardware issue (power and/or range). Try adding a capacitor (http://www.mysensors.org/build/connect_radio#connecting-a-decoupling-capacitor) to the receiving radio, change powersource, move receiver/sender closer to eachother or build a repeater.

            Also if you are in the testface and have the node and gateway close to each other it can be the issue. If I only have a couple of meters it performce worse.

            Controller: Proxmox VM - Home Assistant
            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

            jerseyguy1996J 1 Reply Last reply
            1
            • AWIA AWI

              @jerseyguy1996 the 'fail' messages occur when the serial gateway does not acknowledge the send. I assume when you are 'not watching' the gateway is 'off'. Not that only you a looking in different direction. Although the last would be interesting as a sensor :smile:

              jerseyguy1996J Offline
              jerseyguy1996J Offline
              jerseyguy1996
              wrote on last edited by jerseyguy1996
              #6

              @AWI Thanks for responding! I wonder if there is a way to confirm that if nothing is actively receiving information from the gateway that it is off. The system definitely works fine when I use cat to redirect the serial gateway traffic to stdout.

              pi@raspberrypi:~ $ sudo cat /dev/ttyUSB20
              0;0;3;0;14;Gateway startup complete.
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              255;255;3;0;3;
              

              Prior to the redirect I get st=fail. Below is the serial monitor for the arduino sending.

              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok
              

              So basically it fails a bunch of times and then once I start viewing it on the terminal its good from that point on. The only screwing thing about that is that if i'm not viewing it on the terminal, every so often (roughly 10% of the time) one of the transmissions will succeed. Definitely doesn't seem to be a hardware issue as the thing works great......as long as the serial gateway is redirected to the terminal.

              1 Reply Last reply
              0
              • sundberg84S sundberg84

                @jerseyguy1996 - "st=fail" means the receiving node or gateway has problems sending ack back to the sending node.

                Its probably a hardware issue (power and/or range). Try adding a capacitor (http://www.mysensors.org/build/connect_radio#connecting-a-decoupling-capacitor) to the receiving radio, change powersource, move receiver/sender closer to eachother or build a repeater.

                Also if you are in the testface and have the node and gateway close to each other it can be the issue. If I only have a couple of meters it performce worse.

                jerseyguy1996J Offline
                jerseyguy1996J Offline
                jerseyguy1996
                wrote on last edited by jerseyguy1996
                #7

                @sundberg84 said:

                @jerseyguy1996 - "st=fail" means the receiving node or gateway has problems sending ack back to the sending node.

                Its probably a hardware issue (power and/or range). Try adding a capacitor (http://www.mysensors.org/build/connect_radio#connecting-a-decoupling-capacitor) to the receiving radio, change powersource, move receiver/sender closer to eachother or build a repeater.

                Also if you are in the testface and have the node and gateway close to each other it can be the issue. If I only have a couple of meters it performce worse.

                Thanks for responding! I do have capacitors on both the sending and receiving radios...soldered directly to the pins. It doesn't seem to be hardware as even prior to adding the capacitors the radio was transmitting and receiving reliably using the "gettingstarted" sketch in the RF24 library.

                1 Reply Last reply
                0
                • sundberg84S Offline
                  sundberg84S Offline
                  sundberg84
                  Hardware Contributor
                  wrote on last edited by
                  #8

                  @jerseyguy1996 - Do you have a controller behind the gateway? The req ID means the node is asking for a ID from the controller. It looks like the gateway recieves this request but there is no responce.

                  Controller: Proxmox VM - Home Assistant
                  MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                  MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                  RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                  jerseyguy1996J 1 Reply Last reply
                  0
                  • sundberg84S sundberg84

                    @jerseyguy1996 - Do you have a controller behind the gateway? The req ID means the node is asking for a ID from the controller. It looks like the gateway recieves this request but there is no responce.

                    jerseyguy1996J Offline
                    jerseyguy1996J Offline
                    jerseyguy1996
                    wrote on last edited by
                    #9

                    @sundberg84 said:

                    @jerseyguy1996 - Do you have a controller behind the gateway? The req ID means the node is asking for a ID from the controller. It looks like the gateway recieves this request but there is no responce.

                    That's a good question. So when I run 'make all' on the mySensors Raspberry repository:

                    https://github.com/mysensors/Raspberry

                    I get two executables. There is the PiGatewaySerial and PiGateway. Do they both need to be running? I may have been under the mistaken impression that you could run one or the other. I'll give it a try.

                    1 Reply Last reply
                    0
                    • sundberg84S Offline
                      sundberg84S Offline
                      sundberg84
                      Hardware Contributor
                      wrote on last edited by
                      #10

                      @jerseyguy1996 - You need one gateway and one controller. The gateway can be in different shapes, like ethernet or serial - i think the one you mention is different gateway. You also need a controller. The gateway is more of the communicatior between nodes and controller, where the controller is the brain and GUI.

                      Controller: Proxmox VM - Home Assistant
                      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                      jerseyguy1996J 1 Reply Last reply
                      0
                      • sundberg84S sundberg84

                        @jerseyguy1996 - You need one gateway and one controller. The gateway can be in different shapes, like ethernet or serial - i think the one you mention is different gateway. You also need a controller. The gateway is more of the communicatior between nodes and controller, where the controller is the brain and GUI.

                        jerseyguy1996J Offline
                        jerseyguy1996J Offline
                        jerseyguy1996
                        wrote on last edited by
                        #11

                        @sundberg84 Dang....now I'm really confused. I was under the impression that PIGatewaySerial handled assigning node id's and such. How would I find that out? I don't see a whole lot of documentation on this repository although I'm sure it exists......it seems pretty well built. The end result of all of this is to hopefully bind this serial connection to openhab. That's the goal at least.

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


                        9

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.0k

                        Posts


                        Copyright 2019 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
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular