Skip to content

IQMESH WriteTrConf disables FRC [bug]

IQRF info

  • DAEMON_VERSION="v2.2.0-rc4"
  • "osVersion": "4.02D"
  • "osBuild": "08B8"
  • "dpaVer": "03.01"

OS info

  • Distributor ID: Raspbian
  • Description: Raspbian GNU/Linux 9.11 (stretch)
  • Release: 9.11
  • Codename: stretch

Issue

Using iqmeshNetwork_WriteTrConf results in FRC on coordinator being disabled. Request "request": "00.00.02.09.ff.ff.02.00.20" is always (?) added as last command.

It seems to be related to detecting if FRC on coordinator is set or not somewhere within code of:

FRC disable is added if request is addressed to coordinator Firs example

Looks like if FRC is set to true and is required it is set to true on beginning and than disabled at the end. Second example

If initially FRC is false it is not enabled but is disabled at the end. Last example

Examples

Turn FRC on coordinator

Initially FRC is enabled, so no change is expected, but instead FRC is set to false.

Iqrf/DpaRequest
{"mType": "iqmeshNetwork_WriteTrConf","data": {"msgId": "testIqmeshWrite","repeat": 0,"req": {"deviceAddr": 0,"embPers":{"frc": true}},"returnVerbose": true}}
Iqrf/DpaResponse
{
    "mType": "iqmeshNetwork_WriteTrConf",
    "data": {
        "msgId": "testIqmeshWrite",
        "rsp": {
            "deviceAddr": 0,
            "writeSuccess": true,
            "restartNeeded": false
        },
        "raw": [
            {
                "request": "00.00.00.02.ff.ff",
                "requestTs": "2020-02-26T11:12:28.239+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.00.82.00.00.00.47.1e.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00",
                "responseTs": "2020-02-26T11:12:28.277+00:00"
            },
            {
                "request": "00.00.02.09.ff.ff.02.20.20",
                "requestTs": "2020-02-26T11:12:28.278+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.89.00.00.00.47",
                "responseTs": "2020-02-26T11:12:28.322+00:00"
            },
            {
                "request": "00.00.02.09.ff.ff.02.00.20",
                "requestTs": "2020-02-26T11:12:28.322+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.89.00.00.00.47",
                "responseTs": "2020-02-26T11:12:28.366+00:00"
            }
        ],
        "status": 0,
        "statusStr": "ok",
        "insId": "iqrfgd2-default"
    }
}

Change RF channel

Again initially FRC enabled. Request 4 enables FRC (?), last request disables FRC/

Iqrf/DpaRequest
{"mType": "iqmeshNetwork_WriteTrConf","data": {"msgId": "testIqmeshWrite","repeat": 1,"req": {"deviceAddr": 3, "rfChannelA": 52},"returnVerbose": true}}
Iqrf/DpaResponse
{
    "mType": "iqmeshNetwork_WriteTrConf",
    "data": {
        "msgId": "testIqmeshWrite",
        "rsp": {
            "deviceAddr": 3,
            "writeSuccess": true,
            "restartNeeded": true
        },
        "raw": [
            {
                "request": "00.00.00.02.ff.ff",
                "requestTs": "2020-02-26T09:52:44.669+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.00.82.00.00.00.00.1e.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00",
                "responseTs": "2020-02-26T09:52:44.697+00:00"
            },
            {
                "request": "00.00.02.02.ff.ff",
                "requestTs": "2020-02-26T09:52:44.698+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.82.00.00.00.00.a8.c9.12.34.34.34.1e.34.33.34.32.32.34.34.34.34.34.00.36.34.34.34.34.34.34.34.34.34.34.34.37.34.03.20",
                "responseTs": "2020-02-26T09:52:44.746+00:00"
            },
            {
                "request": "00.00.02.02.ff.ff",
                "requestTs": "2020-02-26T09:52:44.746+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.82.00.00.00.00.a8.c9.12.34.34.34.1e.34.33.34.32.32.34.34.34.34.34.00.36.34.34.34.34.34.34.34.34.34.34.34.37.34.03.20",
                "responseTs": "2020-02-26T09:52:44.794+00:00"
            },
            {
                "request": "00.00.02.09.ff.ff.02.20.20",
                "requestTs": "2020-02-26T09:52:44.794+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.89.00.00.00.00",
                "responseTs": "2020-02-26T09:52:44.844+00:00"
            },
            {
                "request": "00.00.0d.02.ff.ff.02.08.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.08.02.09.ff.ff.11.34.ff",
                "requestTs": "2020-02-26T09:52:44.844+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.0d.82.00.00.00.00.01.08.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00",
                "responseTs": "2020-02-26T09:52:45.757+00:00"
            },
            {
                "request": "00.00.0d.01.ff.ff",
                "requestTs": "2020-02-26T09:52:45.758+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.0d.81.00.00.00.00.00.00.00.00.00.00.00.00.00",
                "responseTs": "2020-02-26T09:52:45.799+00:00"
            },
            {
                "request": "00.00.02.09.ff.ff.02.00.20",
                "requestTs": "2020-02-26T09:52:45.799+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.89.00.00.00.00",
                "responseTs": "2020-02-26T09:52:45.843+00:00"
            }
        ],
        "status": 0,
        "statusStr": "ok",
        "insId": "iqrfgd2-default"
    }
}

Thermometer after above

Initially FRC disabled by previous IQMESH_WriteTrConf was not enabled before following FRC send, but was disabled at the end.

Iqrf/DpaRequest
{"mType": "iqmeshNetwork_WriteTrConf","data": {"msgId": "testIqmeshWrite","repeat": 1,"req": {"deviceAddr": 2,"embPers":{"thermometer": true}},"returnVerbose": true}}
Iqrf/DpaResponse
{
    "mType": "iqmeshNetwork_WriteTrConf",
    "data": {
        "msgId": "testIqmeshWrite",
        "rsp": {
            "deviceAddr": 2,
            "writeSuccess": false,
            "restartNeeded": false
        },
        "raw": [
            {
                "request": "00.00.00.02.ff.ff",
                "requestTs": "2020-02-26T11:47:58.586+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.00.82.00.00.00.47.1e.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00",
                "responseTs": "2020-02-26T11:47:58.615+00:00"
            },
            {
                "request": "00.00.02.02.ff.ff",
                "requestTs": "2020-02-26T11:47:58.615+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.82.00.00.00.47.88.c9.32.34.34.34.1e.34.33.34.32.32.34.34.34.34.34.00.36.34.34.34.34.34.34.34.34.34.34.34.37.34.03.20",
                "responseTs": "2020-02-26T11:47:58.659+00:00"
            },
            {
                "request": "00.00.0d.02.ff.ff.02.04.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.08.02.09.ff.ff.02.04.04",
                "requestTs": "2020-02-26T11:47:58.659+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.0d.82.00.00.03.47",
                "responseTs": "2020-02-26T11:47:58.708+00:00"
            },
            {
                "request": "00.00.0d.02.ff.ff.02.04.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.08.02.09.ff.ff.02.04.04",
                "requestTs": "2020-02-26T11:47:58.708+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.0d.82.00.00.03.47",
                "responseTs": "2020-02-26T11:47:58.757+00:00"
            },
            {
                "request": "00.00.02.09.ff.ff.02.00.20",
                "requestTs": "2020-02-26T11:47:58.757+00:00",
                "confirmation": "",
                "confirmationTs": "",
                "response": "00.00.02.89.00.00.00.47",
                "responseTs": "2020-02-26T11:47:58.802+00:00"
            }
        ],
        "status": 1000,
        "statusStr": "DPA error.",
        "insId": "iqrfgd2-default"
    }
}
Edited by Miko@STN