Announcement

Collapse
No announcement yet.

Intercept Errors with SNAPconnect

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Intercept Errors with SNAPconnect

    Hi

    I have a snapconnect script running. I connect portal to the network via this script. But when I do this, intecept stdio feature fails to produce any output. If I connect portal directly with serial, it works.

    How can I display internal python error messages from nodes either in the log of my snapconnect script, or in portal log when connected via snapconnect?

  • #2
    Are your Portal and SNAPconnect both set to the default address of 000001, by any chance?

    Comment


    • #3
      Jason makes a good point about same SNAP Address.

      May I ask what you mean (ie what step's you have taken) when you say...
      I connect portal to the network via this script
      Are you Attempting a 'remote connection' through Potal's connection dialog?

      One silly question -are both devices using the same channel and NetID?
      sigpic
      Proven Solutions for the Internet of Things
      www.synapse-wireless.com

      Comment


      • #4
        Thanks guys

        1. I connect portal via the SnapConnect script by using the "remote connection" feature and entering 127.0.0.1 - localhost. This way portal
        connects to snap within the snapconnect script

        My network

        portal -> snapconnect - serial -> EN171 -> radio -> other devices

        2. re: addresses. SnapConnect scripts default to a different address. There is definitely a problem if you have two portals with default - I had
        that and fixed it.

        Hope this helps!

        Comment


        • #5
          Just to confirm: Same setup works when you use Portal to connect to the SN171 directly, but not when you connect using a "remote connection" to the localhost IP address?
          sigpic
          Proven Solutions for the Internet of Things
          www.synapse-wireless.com

          Comment


          • #6
            That's correct.

            When I connect via local network I cannot use "intercept Stdio"
            and I cannot see any error messages from the remote nodes.

            Comment


            • #7
              Do you have a node you could use as a sniffer? It would be interesting to see if your debug messages are getting out into the air.


              You can also redirect the stdio and stderr by using uniconnects in your script (this is what Portal does in the background)
              Simply add...

              Code:
              uniConnect(3,4)
              uniConnect(3,5)
              unicastSerial(destAddr)
              ...to either your startup function or another function you can call remotely.
              sigpic
              Proven Solutions for the Internet of Things
              www.synapse-wireless.com

              Comment

              Working...
              X