• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    How to Debug Gateway and Node connection

    scheduled pinned locked moved Troubleshooting
    9 posts 4 posters 1.7k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • M offline
      monics
      global: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 topic:replies-to-this-post, 2 last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @monics
        global: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

        one-reply-to-this-post last-reply-time reply quote 0
        • T offline
          Tag MOD @monics
          global: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

          one-reply-to-this-post last-reply-time reply quote 0
          • skywatchS offline
            skywatch
            global:last-edited-by,

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

            T one-reply-to-this-post last-reply-time reply quote 0
            • T offline
              Tag MOD @skywatch
              global: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
              
              one-reply-to-this-post last-reply-time reply quote 0
              • skywatchS offline
                skywatch
                global: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 one-reply-to-this-post last-reply-time reply quote 0
                • T offline
                  Tag MOD @skywatch
                  global: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.

                  one-reply-to-this-post last-reply-time reply quote 0
                  • skywatchS offline
                    skywatch
                    global: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 one-reply-to-this-post last-reply-time reply quote 0
                    • T offline
                      Tag MOD @skywatch
                      global:last-edited-by,

                      @skywatch

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

                      one-reply-to-this-post last-reply-time reply quote 0
                      • first-post
                        last-post

                      0

                      online

                      644

                      users

                      532

                      topics

                      3.4k

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