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.

LP-CC2652RB: using "Z-Stack Linux Gateway - Quick Start Guide" raspberry pi is not found the door sensor module in sample code

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: Z-STACK, LAUNCHXL-CC1352P, LAUNCHXL-CC1352R1, LAUNCHXL-CC26X2R1, UNIFLASH, CC2652RB, CCSTUDIO,

Hi,

I am following "Z-Stack Linux Gateway - Quick Start Guide" to set-up and try to run sample gateway application.

http://software-dl.ti.com/simplelink/esd/zigbee_3_0_Linux/1.0.1/exports/Documents/Z-Stack%20Linux%20Gateway%20-%20Quick%20Start%20Guide.html

I have used Raspberry-pi instead of Beagle bone as Gateway and follow the below stape.

  1. Raspberry-Pi Setup:

Set-up the Raspberry pi 3b model with Raspberry Pi OS (32-bit) with desktop and kernel version is 5.4
Update and upgrade all packages.

    • sudo apt-get update
    • sudo apt-get upgrade
    • Install killall tools.
    • sudo apt-get install psmisc
    • Install dos2unix package
    • sudo apt-get install dos2unix

Ensure that the source/scripts/package_builder script has TARGET_PLATFORM set to "BEAGLEBONE_BLACK" (ie. export TARGET_PLATFORM="BEAGLEBONE_BLACK") .

    • sudo apt-get install autoconf automake libtool curl make g++ unzip
    • apt-get install protobuf-c-compiler
    • git clone github.com/.../protobuf.git
    • cd protobuf
    • ./autogen.sh
    • ./configure
    • make
    • make check
    • sudo make install
    • sudo ldconfig # refresh shared library cache.

2. Gateway Setup: The following instructions will cover setting up the Zigbee Gateway project.

Using WinSCP, connect to the Raspberry-Pi.
Copy the source/ folder to the Raspberry-Pi home directory.
On the host, navigate to the source/ directory.
cd source/
Convert the setup script to Unix line endings and make executable. Then run the setup script. This will convert all necessary scripts to Unix line endings, will delete (if applicable) and rebuild the source Linux Gateway code, extract binaries, make files executable and install all Node Modules:

    • sudo dos2unix setup.sh
    • sudo chmod +x setup.sh
    • sudo ./setup.sh

3. ZNP Setup: The following instructions will assist in programming one of the LaunchPads (LAUNCHXL-CC1352P, LAUNCHXL-CC1352R1, or LAUNCHXL-CC26X2R1) with a ZNP hex image.

Connect the LaunchPad to your PC.
Open Flash Programmer 2 (or UniFlash).
Erase all flash sections on the LaunchPad.
Select the appropriate image for the Launchpad:
ZNP images are located in Firmware/znp/
For example, a CC26x2R1 Launchpad will use "CC2652R1LP_GW_ZNP_UART.hex"
Flash this image to the LaunchPad.
When flashed successfully, connect the LaunchPad to the host, using the A-Male to Mini-Male USB Cable.


4. To start the gateway:

Open a new terminal accessing the host (eg PuTTY for Raspberry-Pi)

    • cd ~/source/out/Precompiled/servers
    • sudo ./zigbeeHAgw

This will start and monitor the following servers:
NPI_lnx
ZLSZNP
NWKMGR_SRVR
GATEWAY_SRVR
OTA_SRVR
To start the sample gateway application

    • cd ~/source/out/Precompiled/servers
    • sudo ./start_application

Gateway is not showing server connected to it.

after run "start application" it showing a below result.

"Waiting to connect to network manager server..."

  • Hi Amrut,

    I'm glad to see that you are referencing the Quick Start Guide, also note that there is a Zigbee Gateway SLA available which contains similar instructions.  Can you please provide the full gateway log?  One issue I see is that the ZIGBEE-LINUX-SENSOR-TO-CLOUD firmware does not include images for the LP-CC2652RB which is most likely why the gateway connection to the ZNP is failing.  You will either need to build the ZNP image for the CC2652RB device in CCSTUDIO using the README instructions provided or use a different LaunchPad which is supported by the hex files provided in the software release.

    Regards,
    Ryan

  • It looks like there were some errors during the setup build, you will need to determine the causes of these and check the existend of all *_SRVR_arm targets in your out/Precompiled/servers folder.  There are some different existing Raspberry Pi hardware builds which could be affecting your environment.  Here are the relevant E2E threads I could find:

    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/874019 
    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/872605 
    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/695887 
    https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz/f/156/t/933152 

    As mentioned before, you will not be able to use a LP-CC2652RB out-of-box.

    Regards,
    Ryan

  • Hi Ryan,

    Please check the error.

    log:

    Platform type selected automatically as bbb.
    To override this selection, please stop this script, and then run it again,
    specifying the desired platform type at the command line:
    ./zigbeeHAgw [help | bbb | x86 ]

    running ./zigbeeHAgw on an ARM
    done processing arguments, board type bbb, 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'
    Starting the ZigBee gateway subsystem
    making sure there are no lingering servers...
    there are 0 NPI servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are 0 OTA servers
    (total 0)
    done
    Executing reset from external scripts
    ===================================================
    starting NPI, cmd ' ./NPI_lnx_arm_server NPI_Gateway.cfg -v 0x0000010E ' on Thu 19 Nov 11:50:20 GMT 2020
    [11:50:20.881,653] [NPISRVR/MAIN] UNMSKBL:
    [11:50:20.882,192] [NPISRVR/MAIN] UNMSKBL: ************************************************
    [11:50:20.882,225] [NPISRVR/MAIN] UNMSKBL: * NPI Server v1.0.2d *
    [11:50:20.882,254] [NPISRVR/MAIN] UNMSKBL: ************************************************
    [11:50:20.882,287] [NPISRVR/MAIN] UNMSKBL:
    Startup phase 1 completed successfully, server started (NPI_PID=1960) on Thu 19 Nov 11:50:20 GMT 2020
    ===================================================
    starting ZLSZNP, cmd ' ./ZLSZNP_arm 127.0.0.1:2533 config.ini -v 0x0000460E ' on Thu 19 Nov 11:50:21 GMT 2020
    [11:50:21.011,867] [Z_STACK/MAIN] UNMSKBL:
    [11:50:21.012,106] [Z_STACK/MAIN] UNMSKBL: ************************************************
    [11:50:21.012,135] [Z_STACK/MAIN] UNMSKBL: * ZStack Server for ZNP v1.0.2d *
    [11:50:21.012,161] [Z_STACK/MAIN] UNMSKBL: ************************************************
    [11:50:21.012,185] [Z_STACK/MAIN] UNMSKBL:
    [11:50:21.013,225] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [AREQ] 08:5F:00:02:5A:5F:53: 54:41:43:4B
    [11:50:21.013,446] [NPISRVR/MAIN] PKT_HEX: New incoming connection from client Z_STACK (connection # 5)
    [11:50:21.014,360] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 02:25:3E:FF:FF
    [11:50:21.014,674] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 02:25:3E:FF:FF
    [11:50:23.015,344] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:23.015,453] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:23.015,585] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 01:2F:09:00
    [11:50:25.016,004] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:25.016,097] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:25.016,202] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 01:2F:06:00
    Synchronous Request Timeout...
    [11:50:27.015,700] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 01:2F:09:00
    [11:50:27.016,692] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:27.016,750] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:27.016,837] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 01:2F:02:08
    [11:50:29.017,138] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:29.017,250] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:29.017,353] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 05:2F:08:00:00:00:00: 00
    [11:50:31.017,691] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:31.017,778] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:31.017,859] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 05:2F:08:01:00:20:00: 00
    Synchronous Request Timeout...
    [11:50:33.016,429] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 01:2F:06:00
    [11:50:33.018,137] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:33.018,208] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:33.018,285] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 06:21:09:83:00:00:02: FF:FF
    [11:50:35.018,593] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:35.018,712] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:35.018,832] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 05:21:09:87:00:00:01: 00
    [11:50:37.019,205] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:37.019,292] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:37.019,402] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 07:21:15:96:00:C4:64: 00:00:00
    Synchronous Request Timeout...
    [11:50:39.017,196] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 01:2F:02:08
    [11:50:39.019,788] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:39.019,850] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:39.021,820] [Z_STACK/MAIN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 01:2F:05:04
    Startup phase 2 completed successfully, server started (ZLSZNP_PID=1966) on Thu 19 Nov 11:50:39 GMT 2020
    ===================================================
    starting NETWORK_MGR, cmd ' ./NWKMGR_SRVR_arm 127.0.0.1:2536 -v 0x0000460E ' on Thu 19 Nov 11:50:39 GMT 2020
    [11:50:39.047,907] [Z_STACK/LSTN] CONNECT: Connected to new client, connection # 5
    [11:50:39.048,747] [NWK_MGR/MAIN] UNMSKBL:
    [11:50:39.049,072] [NWK_MGR/MAIN] UNMSKBL: ************************************************
    [11:50:39.049,101] [NWK_MGR/MAIN] UNMSKBL: * Network Manager Server v1.0.2d *
    [11:50:39.049,127] [NWK_MGR/MAIN] UNMSKBL: ************************************************
    [11:50:39.049,958] [NWK_MGR/MAIN] UNMSKBL:
    [11:50:39.050,398] [NWK_MGR/MAIN] PKTTYPE: [ Z_STACK<<NWK_MGR ] [AREQ] 08:00:5F:00:03:4E:57: 4B:5F:4D:47:52
    [11:50:39.050,612] [Z_STACK/LSTN] CONNECT: Client at connection # 5 identified itself as NWK_MGR
    [11:50:39.051,245] [NWK_MGR/MAIN] PKTTYPE: [ Z_STACK<<NWK_MGR ] devZDOCBReq
    [11:50:39.051,311] [NWK_MGR/MAIN] PKTBODY: cmdID = DEV_ZDO_CBS_REQ
    [11:50:39.051,753] [NWK_MGR/MAIN] PKTBODY: srcRtgIndCB = 1
    [11:50:39.051,793] [NWK_MGR/MAIN] PKTBODY: concentratorIndCb = 1
    [11:50:39.051,826] [NWK_MGR/MAIN] PKTBODY: nwkDiscCnfCB = 1
    [11:50:39.052,235] [NWK_MGR/MAIN] PKTBODY: beaconNotIndCB = 1
    [11:50:39.052,269] [NWK_MGR/MAIN] PKTBODY: joinCnfCB = 1
    [11:50:39.052,674] [NWK_MGR/MAIN] PKTBODY: leaveCnfCB = 1
    [11:50:39.052,708] [NWK_MGR/MAIN] PKTBODY: leaveIndCB = 1
    [11:50:39.053,075] [NWK_MGR/MAIN] PKTBODY: nwkAddrRsp = 1
    [11:50:39.053,109] [NWK_MGR/MAIN] PKTBODY: ieeeAddrRsp = 1
    [11:50:39.053,465] [NWK_MGR/MAIN] PKTBODY: nodeDescRsp = 1
    [11:50:39.053,500] [NWK_MGR/MAIN] PKTBODY: powerDescRsp = 1
    [11:50:39.053,855] [NWK_MGR/MAIN] PKTBODY: simpleDescRsp = 1
    [11:50:39.053,890] [NWK_MGR/MAIN] PKTBODY: activeEndpointRsp = 1
    [11:50:39.054,335] [NWK_MGR/MAIN] PKTBODY: matchDescRsp = 1
    [11:50:39.054,374] [NWK_MGR/MAIN] PKTBODY: complexDescRsp = 1
    [11:50:39.054,406] [NWK_MGR/MAIN] PKTBODY: userDescRsp = 1
    [11:50:39.054,438] [NWK_MGR/MAIN] PKTBODY: discoveryCacheRsp = 1
    [11:50:39.054,469] [NWK_MGR/MAIN] PKTBODY: userDescCnf = 1
    [11:50:39.055,272] [NWK_MGR/MAIN] PKTBODY: serverDiscoveryRsp = 1
    [11:50:39.055,308] [NWK_MGR/MAIN] PKTBODY: endDeviceTimeoutRsp = 1
    [11:50:39.055,708] [NWK_MGR/MAIN] PKTBODY: bindRsp = 1
    [11:50:39.055,742] [NWK_MGR/MAIN] PKTBODY: endDeviceBindRsp = 1
    [11:50:39.056,115] [NWK_MGR/MAIN] PKTBODY: unbindRsp = 1
    [11:50:39.056,149] [NWK_MGR/MAIN] PKTBODY: mgmtNwkDiscRsp = 1
    [11:50:39.056,507] [NWK_MGR/MAIN] PKTBODY: mgmtLqiRsp = 1
    [11:50:39.056,542] [NWK_MGR/MAIN] PKTBODY: mgmtRtgRsp = 1
    [11:50:39.056,900] [NWK_MGR/MAIN] PKTBODY: mgmtBindRsp = 1
    [11:50:39.056,933] [NWK_MGR/MAIN] PKTBODY: mgmtLeaveRsp = 1
    [11:50:39.057,281] [NWK_MGR/MAIN] PKTBODY: mgmtDirectJoinRsp = 1
    [11:50:39.057,315] [NWK_MGR/MAIN] PKTBODY: mgmtPermitJoinRsp = 1
    [11:50:39.057,680] [NWK_MGR/MAIN] PKTBODY: mgmtNwkUpdateNotify = 1
    [11:50:39.057,715] [NWK_MGR/MAIN] PKTBODY: deviceAnnounce = 1
    [11:50:39.058,089] [NWK_MGR/MAIN] PKTBODY: devStateChange = 1
    [11:50:39.058,125] [NWK_MGR/MAIN] PKTBODY: tcDeviceInd = 1
    [11:50:39.058,758] [Z_STACK/LSTN] PKTTYPE: [ Z_STACK>>NWK_MGR ] zstackDefaultRsp
    [11:50:39.058,910] [Z_STACK/LSTN] PKTBODY: cmdID = DEV_ZDO_CBS_REQ
    [11:50:39.059,055] [Z_STACK/LSTN] PKTBODY: status = ZSuccess
    [11:50:39.059,541] [NWK_MGR/MAIN] PKTTYPE: [ Z_STACK<<NWK_MGR ] sysNwkInfoReadReq
    [11:50:39.059,653] [NWK_MGR/MAIN] PKTBODY: cmdID = SYS_NWK_INFO_READ_ REQ
    [11:50:41.022,249] [Z_STACK/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:41.022,367] [Z_STACK/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:41.022,661] [Z_STACK/LSTN] PKTTYPE: [ NPISRVR<<Z_STACK ] [SREQ] 00:25:50
    [11:50:41.060,339] [NWK_MGR/MAIN] ERROR : SRSP Cond Wait timed out!
    [11:50:41.060,420] [NWK_MGR/MAIN] ERROR : apicSendSynchData() failed getting response
    [11:50:41.062,450] [NWK_MGR/MAIN] ERROR : Reading Local Network Information Failed
    [11:50:41.062,511] [NWK_MGR/MAIN] UNMSKBL: Initialization failed. Quitting now.

    Startup phase 3 failed
    waiting for Zstack linux to exit
    NPI_lnx_arm_server: no process found
    waiting for NPI to exit
    Synchronous Request Timeout...
    [11:50:45.018,003] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 05:2F:08:00:00:00:00: 00
    Synchronous Request Timeout...
    [11:50:51.018,650] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 05:2F:08:01:00:20:00: 00
    Synchronous Request Timeout...
    [11:50:57.019,345] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 06:21:09:83:00:00:02: FF:FF
    Synchronous Request Timeout...
    [11:51:03.019,965] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 05:21:09:87:00:00:01: 00
    Synchronous Request Timeout...
    [11:51:09.020,654] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 07:21:15:96:00:C4:64: 00:00:00
    Synchronous Request Timeout...
    [11:51:15.021,305] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 01:2F:05:04
    Synchronous Request Timeout...
    [11:51:21.021,974] [NPISRVR/MAIN] PKT_HEX: [SOCZIGB<<NPISRVR ] [send] 00:25:50
    ^Ccaught SIGTERM, killing all the servers and cleaning up
    NPI_lnx_arm_server: no process found
    waiting for NPI to exit

    ^Cmaking sure there are no lingering servers...
    there are 1 NPI servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are 0 OTA servers
    (total 1)
    there are 1 NPI servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are 0 OTA servers
    (total 1)

  • If you cannot successfully startup the ZNP device from the Linux gateway then please confirm that the correct ZNP firmware has been loaded and you are using a compatible LaunchPad with XDS110 backchannel UART jumpers connected.  It also sometimes helps to press the reset button on the LaunchPad during this process.

    Regards,
    Ryan

  • Hi Ryan,

    Problem is solved.Problem is in znp_CC2652RB_LAUNCHXL_tirtos_ccs.hex file. I have built the new ZNP project in CCS 10 tool and create the hex file.

    Thank you for your help.