This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2630 afDataConfirm problem

Other Parts Discussed in Thread: CC2630

Hi,

We are using CC2630 with zstack_home_1_02_02a_44539. In board, we use zstack linux gateway to control the CC2630.

We have the scenario need to implement.
When the coordinator receive the IAS door sensor change status packet.
The coordinator will use the light control command to set hue light on or light off.

When linux gateway send light control command, the gateway will use AF_DataRequest to send packet and receive the AF Data Confirmation Message feedback from CC2630.

But sometiomes, CC2630 feedback AF Data Confirmation Message TransID is wrong and number is always 68.
After CC2630 feedback wrong TransID Confirmation Message, CC2630 can't receive IAS door sensor change status packet any more until we restart the zstack linux gateway.

We use the packet sniffer to check IAS sensor, it work, the sniffer can receive the IAS packet.

Does anyone have the suggestion about this issue?

Thanks a lot.

BR,
Rieen

  • Our linux kernel log:

    root@OpenWrt:/zias# ./zigbeeHAgw &
    root@OpenWrt:/zias# mkdir: can't create directory '/tmp/zigbee': File exists
    running zigbeegw.scr on an ARM
    done processing arguments, target arm
    NPI is 'NPI_lnx_arm_server'
    Zstack linux server is 'ZLSZNP_arm'
    gateway server is 'GATEWAY_SRVR_arm'
    network manager is 'NWKMGR_SRVR_arm'
    OTA server is 'OTA_SRVR_arm'
    making sure there are no lingering servers...
    there are 0 NIP servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are OTA servers
    sh: 0: unknown operand
    done
    Starting the ZigBee gateway subsystem
    ===================================================
    starting NPI, cmd ' /zias/NPI_lnx_arm_server /zias/NPI_Gateway.cfg ' atWed Mar 2 10:08:44 UTC 2016
    will delay 4 secs before starting Zstack
    deviceKey = 0 (0 )
    devPath = '/dev/ttyMSM1'
    logPath = './NpiLnxLog.txt'
    ... freeing memory (ret 0)
    Port: 2533
    The socket will listen on the following IP addresses:

    IPv6: ::
    IPv4: 0.0.0.0
    0.0.0.0 means it will listen to all available IP address

    waiting for first connection on #3...
    NPI started (pid 3509) at Wed Mar 2 10:08:48 UTC 2016
    ===================================================
    starting ZLSZNP, cmd ' ' atWed Mar 2 10:08:48 UTC 2016
    will delay 4 secs before starting GW
    Connected to #5.(0.0.0.0 / ::ffff:127.0.0.1)
    ZLSZNP started (pid 3515) at Wed Mar 2 10:08:52 UTC 2016
    ===================================================
    starting NETWORK_MGR, cmd '/zias/NWKMGR_SRVR_arm 127.0.0.1:2536 ' at Wed Mar 2 10:08:52 UTC 2016
    will delay 4 secs after starting netmgr
    [NWK_MGR/MAIN] : there are 2 args
    [NWK_MGR/MAIN] : argv[0] = /zias/NWKMGR_SRVR_arm
    [NWK_MGR/MAIN] : argv[1] = 127.0.0.1:2536
    [NWK_MGR/MAIN] : ************************************************
    [NWK_MGR/MAIN] : * Network Manager Server v1.0.1 *
    [NWK_MGR/MAIN] : * The following are the avaible key commands: *
    [NWK_MGR/MAIN] : * Exit Program. - q *
    [NWK_MGR/MAIN] : ************************************************

    ==> cmdid=32, endpoint=1, deviceid=7
    sendAPICExpectDefaultStatus
    ===== Done nmRegEndpoint
    ===== Done nmRegCallbacks
    send Nwk Info Read Req...
    NwkInfoReadRsp:
    - nwkaddr:0000
    - ieeeaddr:00124B0007E16D05
    - devstate:9
    - panid:3815
    - extendedpanid:00124B0007E16D05
    - coordaddr:0000
    - coordextaddr:0000000000000000
    - devtypes: Coordinator: 1
    - devtypes: Router: 0
    - logicalchannel:11

    ===== Done sendSysNwkInfoReadReq
    parsing Poll Control fields
    parsing defines
    parsing attributes
    parsing attrlists
    parsing clusterlists
    parsing endpointdefs
    parsing endpoints
    NETWORK MANAGER started (pid 3522) at Wed Mar 2 10:08:56 UTC 2016
    ===================================================
    starting GATEWAY_SERVER, cmd '/zias/GATEWAY_SRVR_arm 127.0.0.1:2536 127.0.0.1:2540 ' at Wed Mar 2 10:08:56 UTC 2016
    will delay 4 secs before starting netmgr
    [GATEWAY/MAIN] :
    [GATEWAY/MAIN] : ************************************************
    [GATEWAY/MAIN] : * Gateway Server v1.0.1 *
    [GATEWAY/MAIN] : * The following are the avaible key commands: *
    [GATEWAY/MAIN] : * Exit Program. - q *
    [GATEWAY/MAIN] : ************************************************

    parsing Poll Control fields
    parsing defines
    parsing attributes
    parsing attrlists
    parsing clusterlists
    parsing endpointdefs
    parsing endpoints
    GW: Register all EP
    => endpoint id=2, profile id=260
    -> AF Register success
    => endpoint id=3, profile id=260
    -> AF Register success
    => endpoint id=4, profile id=260
    -> AF Register success
    => endpoint id=5, profile id=260
    -> AF Register success
    => endpoint id=6, profile id=260
    -> AF Register success
    => endpoint id=7, profile id=260
    -> AF Register success
    GATEWAY SERVER started (pid 3529) at Wed Mar 2 10:09:00 UTC 2016
    ===================================================
    waiting for netmgr to exit ( pid 3522 ) @Wed Mar 2 10:09:00 UTC 2016

    root@OpenWrt:/zias#
    root@OpenWrt:/zias#
    Processing AF Data Confirmation Message: status: 0, sequence number: 1


    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 190

    Processing AF Data Confirmation Message: status: 0, sequence number: 2

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 191

    Processing AF Data Confirmation Message: status: 0, sequence number: 3

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 192

    Processing AF Data Confirmation Message: status: 0, sequence number: 4

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 193

    Processing AF Data Confirmation Message: status: 0, sequence number: 5

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 194

    Processing AF Data Confirmation Message: status: 0, sequence number: 6

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 195

    Processing AF Data Confirmation Message: status: 0, sequence number: 7

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 196

    Processing AF Data Confirmation Message: status: 0, sequence number: 8

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 197

    Processing AF Data Confirmation Message: status: 0, sequence number: 9

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 198

    Processing AF Data Confirmation Message: status: 0, sequence number: 10

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 199

    Processing AF Data Confirmation Message: status: 0, sequence number: 11

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 200

    Processing AF Data Confirmation Message: status: 0, sequence number: 12

    COMMAND_SS_IAS_ZONE_STATUS_CHANGE_NOTIFICATION - CmdId: 00, TransId: 201

    Processing AF Data Confirmation Message: status: 0, sequence number: 68

    root@OpenWrt:/zias#
  • Upload the Ubiqua sniffer capture.

    zstack_IAS_light.zip

  • Hi,

    Add the mutex Mutually Exclusive to protect the NPI_LUX_IPC_SendData() can fix it.
    At sometimes, two message will come into NPI_LUX_IPC_SendData() at same time, could make data error.