Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. kskud
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by kskud

    • RE: How to disable default node registration to the GW?

      As for me it can be achieved by these parameters:
      #define MY_NODE_ID 7
      #define MY_PARENT_NODE_ID 0
      #define MY_PARENT_NODE_IS_STATIC

      In this case we have all what we need to initialize any node. But it doesn't work for me.

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      @martinhjelmare

      Yes. You are right.
      0_1470064751331_upload-d1a03bcb-9b27-4594-a1fb-e3374784d0f4

      And it's strange that disabling registration (MY_REGISTRATION_FEATURE) still process another kind of "registration"

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      Probably it will help someone. I found how to do what I want without big changes. So you have to:

      1. commented out in MyConfig.h this line:
        #define MY_REGISTRATION_FEATURE

      2. add changes to MyTransport.cpp (add marked lines of code)
        bool transportCheckUplink(bool force) {
        #if !defined(MY_PARENT_NODE_IS_STATIC) and !defined(MY_REGISTRATION_FEATURE)
        if (!force && (hwMillis() - _transportSM.lastUplinkCheck) < CHKUPL_INTERVAL) {
        TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:OK,FCTRL\n")); // flood control
        return true;
        }
        // ping GW
        uint8_t hopsCount = transportPingNode(GATEWAY_ADDRESS);
        // verify hops
        if (hopsCount != INVALID_HOPS) {
        // update
        _transportSM.lastUplinkCheck = hwMillis();
        TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:OK\n"));
        // did distance to GW change upstream, eg. re-routing of uplink nodes
        if (hopsCount != _nc.distance) {
        TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:DGWC,O=%d,N=%d\n"), _nc.distance, hopsCount); // distance to GW changed
        _nc.distance = hopsCount;
        }
        return true;
        }
        else {
        TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:FAIL\n"));
        return false;
        }
        #else
        return true;
        #endif
        }

      3. add to your node's sketch:
        #define MY_NODE_ID 7
        #define MY_PARENT_NODE_ID 0
        #define MY_PARENT_NODE_IS_STATIC

      After that you will be able to start your device, send data even if the parent node is disabled (the request just fail). Once you enable GW you will be able to get presentation, heartbeat status, do standard requests to the node.

      posted in Troubleshooting
      kskud
      kskud