• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    How to Debug Gateway and Node connection

    Scheduled Pinned Locked Moved Troubleshooting
    9 Posts 4 Posters 1.4k Views 2 Watching
    Loading More Posts
    • 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.
    • M Offline
      monics
      last edited by

      Hi,

      I am new to mysensors and mycontroller, and have now spend several evenings on getting it all running 🙂

      Do anyone have a good guide to debug my setup, step by step, so that I can get an idea of why my setup wont work.

      My setup:
      a) I have installed mycontroller (1.0.0.Final) and have the server/interface running on my Rpi (Jessie).
      b) Have a serial gateway programed ( Arduino Uno + nRF24l01+) and attached to the Rpi.
      c) A Node (Arduino pro Mini + NRF24L01+ + DHT22) programmed

      Issue 1) I am missing some indication of how the system is performing.
      The mycontoller says it has connected to the Gateway.... but how often is this connection chekced? If I unplug the gateway, the Mycontroller still says OK connection....

      Issue 2) My Node seems to work OK, in the debug log (serial conn. to Arduino) I can see that the Node finds the gateway... but it do not get an ID from Mycontroller....

      How do I get debug log from the Serial Gateway controller.. (I know I have to enable debug in mysensors code, but how to monitor this data?)

      Thanks,
      Monics.

      jkandasaJ T 2 Replies Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @monics
        last edited by

        @monics said in How to Debug Gateway and Node connection:

        Issue 1) I am missing some indication of how the system is performing.
        The mycontoller says it has connected to the Gateway.... but how often is this connection chekced? If I unplug the gateway, the Mycontroller still says OK connection....

        By default, MyController checks node alive status every 30 minutes once,
        0_1509553273300_476e5356-b265-4a92-8486-9238132ffccb-image.png

        Issue 2) My Node seems to work OK, in the debug log (serial conn. to Arduino) I can see that the Node finds the gateway... but it do not get an ID from Mycontroller....

        Change Resource logs level to Notice or Trace, Will report incoming and outgoing messages on Status >> Resources logs. Sometimes Gateway message might not reach your node. Check the node coverage between your node and gateway.
        0_1509553387996_e535b3fc-96fb-48b1-bb77-21dd270b5402-image.png

        How do I get debug log from the Serial Gateway controller.. (I know I have to enable debug in mysensors code, but how to monitor this data?)

        When you enable Resource logs level to Notice or Trace as mentioned above you can see it on Status >> Resources logs

        1 Reply Last reply Reply Quote 0
        • T Offline
          Tag MOD @monics
          last edited by

          @monics

          Mycontroller has really great ways to troubleshoot!, if you want to look at OS level.

          If mycontroller is not running you can start the command

          sudo tail -f /dev/ttyUSB0
          

          This shows you all data that comes in from the sensor network

          1 Reply Last reply Reply Quote 0
          • skywatchS Offline
            skywatch
            last edited by

            Why is it that 'sudo tail -f /dev/serial0' does not work?

            T 1 Reply Last reply Reply Quote 0
            • T Offline
              Tag MOD @skywatch
              last edited by

              @skywatch

              What exactly does not work? 🙂

              I guess you see no output,

              1. ensure you are looking at the correct device file, it should be the same as is used for the gateway in the mycontroller software
              2. make sure mycontroller is not running.
              3. if all works okay, you should see similar output like below:
              root@orangepizero:~# tail -f /dev/ttyMySensorsGateway
              3;0;1;0;17;351
              3;5;1;0;26;0
              3;0;1;0;17;516
              3;5;1;0;26;0
              10;0;1;0;0;29.0
              
              1 Reply Last reply Reply Quote 0
              • skywatchS Offline
                skywatch
                last edited by skywatch

                @Tag
                You are correct, I see no output on the screen (but I didn't realise that you have to turn off myc first!)... I will try again soon. 🙂

                I guess it is the problem with mysgw on arduino. When mysgw was on pi with radio attached I could tail the mysgw with the system live. That was a help in debugging over ssh. For now though I either have to stop myc or attach pc to the gw by removing connections to pi. It's never as easy as you think it would be, is it? 🙂

                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  Tag MOD @skywatch
                  last edited by

                  @skywatch said in How to Debug Gateway and Node connection:

                  Once you know it its always easy 😉
                  It might be that the ttyUSB gets locked exclusively by mycontroller, so it might have to be released first.

                  1 Reply Last reply Reply Quote 0
                  • skywatchS Offline
                    skywatch
                    last edited by

                    @Tag

                    I am not using USB. I am using direct arduino serial -> pi serial.

                    About to try this as it's crashed again! 😞

                    T 1 Reply Last reply Reply Quote 0
                    • T Offline
                      Tag MOD @skywatch
                      last edited by

                      @skywatch

                      Could it be the oinclusion botton from another post,
                      What happens if you setup everything without any inclusion stuff?

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      0

                      Online

                      587

                      Users

                      529

                      Topics

                      3.4k

                      Posts
                      Copyright © 2015-2025 MyController.org | Contributors | Localization