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

How to Debug Gateway and Node connection

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 4 Posters 1.6k 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 1 Nov 2017, 08:42

    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.

    J T 2 Replies Last reply 1 Nov 2017, 16:25 Reply Quote 0
    • J Offline
      jkandasa @monics
      last edited by 1 Nov 2017, 16:25

      @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 1 Nov 2017, 18:19

        @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
        • S Offline
          skywatch
          last edited by 5 Nov 2017, 23:05

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

          T 1 Reply Last reply 6 Nov 2017, 10:20 Reply Quote 0
          • T Offline
            Tag MOD @skywatch
            last edited by 6 Nov 2017, 10:20

            @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
            • S Offline
              skywatch
              last edited by skywatch 11 Jul 2017, 17:29 7 Nov 2017, 11:57

              @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 7 Nov 2017, 17:14 Reply Quote 0
              • T Offline
                Tag MOD @skywatch
                last edited by 7 Nov 2017, 17:14

                @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
                • S Offline
                  skywatch
                  last edited by 7 Nov 2017, 20:21

                  @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 8 Nov 2017, 07:23 Reply Quote 0
                  • T Offline
                    Tag MOD @skywatch
                    last edited by 8 Nov 2017, 07:23

                    @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
                    2 out of 9
                    • First post
                      2/9
                      Last post

                    0

                    Online

                    618

                    Users

                    531

                    Topics

                    3.4k

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