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.

CC2650: Zigbee network based on CC2650/2630 module

Part Number: CC2650
Other Parts Discussed in Thread: CC2630, , Z-STACK

Dear All,

I'm new to zigbee network, I plan to create zigbee network using only CC2650/CC2630 module as an end device, coordinator, router.

after searching here and there i cannot found on how to do this. is it possible to create entire network using only CC2650/CC2630 ?

if not possible using Zstack, do you know any other option ? contiki maybe ? or any other RTOS for mesh network that is using only CC26xx module to form complete mesh network

Thx for your help

Regards

Tonny

  • CC26XX doesn't have enough Flash and it can only run Zigbee end device when it runs SOC mode. If you want to use CC26XX acts as coordinator/router, you have to use ZNP-ZAP architecture.
  • Hi YK,

    yes i read about ZNP-ZAP architecture, but it always end with use of Ztool as an extra application to support CC26xx module.
    do you have document on how to setup the ZNP-ZAP architecture without the use of Ztool ?

    I want to have the coordinator/router with CC26xx + ESP01 that automatically send the data from end node to the cloud.

    thx for your help
    regards
    Tonny
  • You can refer to Z-Stack ZNP interface specification.pdf in Z-Stack document folder.
  • Hi YK,

    after reading the document, it mention that it need an application processor.
    do you have example what is this ? something like MCU ?
    I still don't get it regarding the ZAP, do you have sample on creating ZAP ?

    thx for your help
    regards
    Tonny S
  • There are MSP430EXP5438 ZAP examples in Z-Stack installation folder.
  • Hi YK,

    you mean \ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\HA-SampleLight ?

    If i use Contiki 6LoWPAN instead of zigbee is it possible to run the coordinator in CC26xx module without any external processor ?

    thx for your reply
    regards
    Tonny
  • Yes, I mean \ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\HA-SampleLight. Contiki 6LowPAN is not based on Zigbee protocol. You will need a edge router instead of coordinator when you run Contiki 6LOWPAN.
  • Hi YK,

    I'l try to check again on this then.

    thx for your reply
    regards
    Tonny
  • You are welcome.
  • Hi YK,

    if i put the ZAP inside MSP430EXP5438, how it is connected to cc26xx ?
    and the "\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\HA-SampleLight" is it i need to load it with ZStack Core too inside MSP430EXP5438 ? because I see a lot of header but no link anywhere.

    thx for your reply
    regards
    Tonny
  • ZAP inside MSP430EXP5438 connects to CC26xx using UART and yes, you have to download "\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\HA-SampleLight" to MSP430EXP5438. There's no need to download ZStackcore to MSP430EXP5438
  • Hi YK,

    when I try to load the HA-SampleLight project to IAR i get this warning :
    "Unable to create configuration 'ZAP Coordinator' using tool chain 'MSP430' "
    do you know why ?

    Thx for your help
    Regards
    Tonny
  • Which IAR version do you use?
  • Hi YK,

    IAR v7.80

    Thx for your help
    Regards
    Tonny
  • To build and download ZAP program for MSP430EXP5438 in Z-Stack Home 1.2.2a, you should use IAR EW430 6.20.1.
  • Hi YK,

    currently I already get quite a bit understanding regarding ZNP-ZAP architechture, I can simulate the ZTool using Hercules Setup Utility, sending the command to serial port and get the reply from ZNP.

    now the problem is I want to remove the PC as a ZAP and using serial device (ESP8266) as a ZAP, after some reading in the forum, I see the P412 have UART connection, can i use this one as a connection to my ZAP ?

    do i need to modified the ZNP so i can use this port ? or it is ready to be used like i used ZTool in PC

    later on if i remove the Development Board, what is the pin source for P412 in the CC2630 chip ?

    for the ZNP I'm using C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\ZNP-HexFiles\CC26xx\znp_coordinator_pro_secure_linkkeyjoin.hex from the sample

    Thx for your help
    Regards
    Tonny
  • Yes, you can use P412 for UART communication which use IOID_2 as RX and IOID_3 as TX.
  • Hi YK,

    so the P412 is already ready for UART communication in the ZNP sample ?

    and when i see in device manager in the PC i see the smartrf06 have 2 port, 1 is the auxiliary port which currently the VCP is active , second one is Debug port. is P412 is the Debug port ? and so, can i see the UART communication thru this port in the PC ?

    Thx for your help
    Regards
    Tonny
  • I am not sure what you mean P412 is debug port. If you connect ZAP to P412, it should work.

  • Hi YK,

    ah ok, Thx.

    Thx for your help
    Regards
    Tonny
  • You are welcome.
  • Hi YK,

    currently I have successfully use P412 for my ZAP connection.
    now i want to connect my ZAP directly from the CC2630 module, not using SmartRF06 board.

    I have searching the forum and you said that we can use any DIO pin in CC2630 for uart pin.
    for my ZNP, I'm using znp_coordinator_pro_secure_linkkeyjoin.hex from C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\ZNP-HexFiles\CC26xx

    is it that i can just plug my device TX/RX to any of the DIO and it will work ?
    or do i need to config it first ?

    or if I need to config the ZNP, I plan use C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZNP\CC26xx

    Thx for your help
    Regards
    Tonny
  • UART RX is DIO_2 and TX is DIO_3 when you use znp_coordinator_pro_secure_linkkeyjoin.hex
  • Hi YK,

    Thx for the info,
    when i open the ZNP source from C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZNP\CC26xx.
    i see this line below. is it this one where to define the pin for UART ?

    // UART Board
    #define Board_UART_RX IOID_2
    #define Board_UART_TX IOID_3

    Thx for your help
    Regards
    Tonny
  • Hi YK,

    currently I'm missing something in the network, I have ZED and coordinator/router, but i don't have router only device.

    for the router only device, i see in the C:\ti\simplelink\zstack_home_1_02_02a_44539\Projects\zstack\ZAP\ZNP-HexFiles\CC26xx there is a hex file for router "znp_router_pro_secure_linkkeyjoin.hex" is this for ZNP-ZAP system, or SOC ?

    thx for your help
    regards
    Tonny S
  • znp_router_pro_secure_linkkeyjoin.hex is for ZNP-ZAP.
  • Hi YK,

    I try to create a router using "znp_router_pro_secure_linkkeyjoin.hex" with znp-bringup.zjs and ztool but it not connected to the coordinator

    when i run UTIL_GET_DEVICE_INFO i got below value as a return
    <RX>07:45:57.86 COM4 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)
    IEEEAddr: 0x00124B00068B4E07
    ShortAddress: 0xFFFE
    DeviceType: ROUTER (0x2)
    DeviceState: DEV_NWK_DISC (0x2)
    NumAssocDevices: 0x00
    AssocDevicesList

    if i see the sample in your blog, the deviceState should be 07, but i cannot found the command to change that value.
    what do i miss from the bringup configuration ?

    it always return this value, never change to 0x07 as it shown in your blog
    <RX>08:05:35.54 COM4 ZDO_STATE_CHANGE_IND (0x45C0)
    State: INVALID_PARAMETER (0x2)

    thx for your help
    regards
    Tonny S
  • Your router is under network discover state (DEV_NWK_DISC) which means it cannot find a Zigbee network to join. Make sure you have Zigbee network in the same channel and enable permit join.
  • Hi YK,

    I already have the coordinator ready, and the zed can join, is it has different configuration between join permissions by zed or by router?

    Thx for your help

    Regards

    Tonny

  • No, there is no different configuration between zed and router. I suggest you to use sniffer to check what happens over the air.
  • Hi YK,

    In the sniffer i see that the router running in channel 19, while my coordinator run in channel 13,
    but the strange thing is, using ztool, i cannot change my router channel to channel 13, it always stuck with 19

    do you ever had this experience ?
    is it because the channel in the hex file already fixed ?

    thx for your reply
    regards
    Tonny
  • I don't know why you can't change router channel to 13 but you can try to change coordinator channel to 19.
  • Hi YK,

    after I change the value for channel to 0x00 0x08 0x00 0x00 then the router running in channel 13..... don't know why, maybe bug in the bringup script.
    Regarding the value of endpoint in the intermediary router, can it be the same with destination router ?
    can I put any value for Endpoint in the intermediary router ?

    thx for your help
    regards
    Tonny
  • You should clear NV to set new channel. Endpoint can be in range of 1 to 240.
  • Hi YK,

    ah, noted.

    i mean if i have R1 connected to R2 connected to R3 connected to R4 and my packet destination is R4, and my ZED is attached to R1 and if R1-R4 using same EndPoint value, will the message reach R4 ? or it will stop at R1 ?

    thx for your help
    regards
    Tonny
  • If you assign correct destination address and endpoint, the message would be delivered correctly.
  • Hi YK,

    after testing, I only see this message below from the sniffer transmitting by my intermediary router to my destination router, but no payload is being transmitted, what is wrong with my intermediary router ?

    note : below this message is the coordinator realignment message.

    Frame 2669: 28 bytes on wire (224 bits), 26 bytes captured (208 bits) on interface 0
    Interface id: 0 (\\.\pipe\ws_socket)
    Encapsulation type: IEEE 802.15.4 Wireless PAN (104)
    Arrival Time: Jun 11, 2017 12:39:23.000840000 SE Asia Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1497159563.000840000 seconds
    [Time delta from previous captured frame: 1.000370000 seconds]
    [Time delta from previous displayed frame: 1.000370000 seconds]
    [Time since reference or first frame: 964.000373000 seconds]
    Frame Number: 2669
    Frame Length: 28 bytes (224 bits)
    Capture Length: 26 bytes (208 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: wpan:zbee_beacon]
    IEEE 802.15.4 Beacon, Src: 0xd6a4
    Frame Control Field: 0x8000, Frame Type: Beacon, Destination Addressing Mode: None, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Short/16-bit
    .... .... .... .000 = Frame Type: Beacon (0x0)
    .... .... .... 0... = Security Enabled: False
    .... .... ...0 .... = Frame Pending: False
    .... .... ..0. .... = Acknowledge Request: False
    .... .... .0.. .... = PAN ID Compression: False
    .... ...0 .... .... = Sequence Number Suppression: False
    .... ..0. .... .... = Information Elements Present: False
    .... 00.. .... .... = Destination Addressing Mode: None (0x0)
    ..00 .... .... .... = Frame Version: IEEE Std 802.15.4-2003 (0)
    10.. .... .... .... = Source Addressing Mode: Short/16-bit (0x2)
    Sequence Number: 214
    Source PAN: 0xb4d9
    Source: 0xd6a4
    Superframe Specification: Association Permit
    .... .... .... 1111 = Beacon Interval: 15
    .... .... 1111 .... = Superframe Interval: 15
    .... 1111 .... .... = Final CAP Slot: 15
    ...0 .... .... .... = Battery Extension: False
    .0.. .... .... .... = PAN Coordinator: False
    1... .... .... .... = Association Permit: True
    GTS
    GTS Descriptor Count: 0
    GTS Permit: False
    Pending Addresses: 0 Short and 0 Long
    ZigBee Beacon, ZigBee PRO, EPID: TexasIns_00:07:f7:91:77
    Protocol ID: 0
    Beacon: Stack Profile: ZigBee PRO, Router Capacity, End Device Capacity
    Extended PAN ID: TexasIns_00:07:f7:91:77 (00:12:4b:00:07:f7:91:77)
    Tx Offset: 16777215
    Update ID: 0


    this is the Coordinator realignment, this is show up after i move from directly connected to destination router, to connected to intermediary router

    Frame 2548: 33 bytes on wire (264 bits), 31 bytes captured (248 bits) on interface 0
    Interface id: 0 (\\.\pipe\ws_socket)
    Encapsulation type: IEEE 802.15.4 Wireless PAN (104)
    Arrival Time: Jun 11, 2017 12:36:30.000005000 SE Asia Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1497159390.000005000 seconds
    [Time delta from previous captured frame: 0.999010000 seconds]
    [Time delta from previous displayed frame: 0.999010000 seconds]
    [Time since reference or first frame: 790.999538000 seconds]
    Frame Number: 2548
    Frame Length: 33 bytes (264 bits)
    Capture Length: 31 bytes (248 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: wpan]
    IEEE 802.15.4 Command, Dst: TexasIns_00:07:f7:93:3a, Src: TexasIns_00:06:8b:4e:07
    Frame Control Field: 0xcc23, Frame Type: Command, Acknowledge Request, Destination Addressing Mode: Long/64-bit, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Long/64-bit
    .... .... .... .011 = Frame Type: Command (0x3)
    .... .... .... 0... = Security Enabled: False
    .... .... ...0 .... = Frame Pending: False
    .... .... ..1. .... = Acknowledge Request: True
    .... .... .0.. .... = PAN ID Compression: False
    .... ...0 .... .... = Sequence Number Suppression: False
    .... ..0. .... .... = Information Elements Present: False
    .... 11.. .... .... = Destination Addressing Mode: Long/64-bit (0x3)
    ..00 .... .... .... = Frame Version: IEEE Std 802.15.4-2003 (0)
    11.. .... .... .... = Source Addressing Mode: Long/64-bit (0x3)
    Sequence Number: 73
    Destination PAN: 0xffff
    Destination: TexasIns_00:07:f7:93:3a (00:12:4b:00:07:f7:93:3a)
    Source PAN: 0xb4d9
    Extended Source: TexasIns_00:06:8b:4e:07 (00:12:4b:00:06:8b:4e:07)
    Command Identifier: Coordinator Realignment (0x08)
    Coordinator Realignment
    PAN ID: 0xb4d9
    Coordinator Short Address: 0xd6a4
    Logical Channel: 11
    Short Address: 0xbb69
  • Can you attach sniffer log and specify which Packet you want me to check?
  • Hi YK,

    in the attachment is the message the i expected to sent :

    it is on wireshark pcapng extension

    Frame 46: 68 bytes on wire (544 bits), 66 bytes captured (528 bits) on interface 0
    Interface id: 0 (\\.\pipe\ws_socket)
    Encapsulation type: IEEE 802.15.4 Wireless PAN (104)
    Arrival Time: Jun 11, 2017 12:23:48.000106000 SE Asia Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1497158628.000106000 seconds
    [Time delta from previous captured frame: 0.000001000 seconds]
    [Time delta from previous displayed frame: 0.000001000 seconds]
    [Time since reference or first frame: 28.999639000 seconds]
    Frame Number: 46
    Frame Length: 68 bytes (544 bits)
    Capture Length: 66 bytes (528 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: wpan:zbee_nwk:zbee_aps:zbee_zcl:zbee_zcl_general.identify]
    IEEE 802.15.4 Data, Dst: Broadcast, Src: 0x0000
    Frame Control Field: 0x8841, Frame Type: Data, PAN ID Compression, Destination Addressing Mode: Short/16-bit, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Short/16-bit
    Sequence Number: 101
    Destination PAN: 0x9346
    Destination: 0xffff
    Source: 0x0000
    [Extended Source: TexasIns_00:07:f7:91:77 (00:12:4b:00:07:f7:91:77)]
    [Origin: 1]
    ZigBee Network Layer Data, Dst: Broadcast, Src: 0xbb69
    Frame Control Field: 0x0208, Frame Type: Data, Discover Route: Suppress, Security Data
    Destination: 0xffff
    Source: 0xbb69
    Radius: 29
    Sequence Number: 252
    [Extended Source: TexasIns_00:07:f7:93:3a (00:12:4b:00:07:f7:93:3a)]
    [Origin: 24]
    ZigBee Security Header
    ZigBee Application Support Layer Data, Dst Endpt: 7, Src Endpt: 8
    Frame Control Field: Data (0x08)
    Destination Endpoint: 7
    Cluster: Identify (0x0003)
    Profile: Home Automation (0x0104)
    Source Endpoint: 8
    Counter: 8
    ZigBee Cluster Library Frame
    Frame Control Field: Cluster-specific (0x11)
    Sequence Number: 2
    Command: Identify Query (0x01)
    Payload

    the payload value : 

    FDFC8 05A70055BB69  

    Thx for your help

    Regards

    Tonny

    10-Router_Test.zip

  • Can you specify which line (time field) in wireshark log to check your problem?
  • By the way, I see your device 0xbb69 keeps broadcasting Identify Query. Do you intend to do this?

  • Hi YK,

    sorry for the late reply,
    the issue that i mention is
    message number 2556-2561 or in time is 792-803 is when my ZED connected to intermediary Router
    message number 2534-2540 or in time is 789-790 is when my ZED connected to destination Router

    when connected to intermediary Router i cannot see my COMMAND_IDENTIFY_QUERY send thru destination router

    regarding Identify Query, I use it as a command to send my message, i put the data in the payload of Identifiy query message
    zcl_SendCommand( ezModeData.endpoint, &afDstAddr, ZCL_CLUSTER_ID_GEN_IDENTIFY, COMMAND_IDENTIFY_QUERY, TRUE, ZCL_FRAME_CLIENT_SERVER_DIR, TRUE, 0, iCounter++, /*0*/20, &sData[0]/*NULL*/ );

    is that a problem ?

    thx for your reply
    regards
    Tonny S
  • Since your device is ZED, why don't I see it doing polling in your sniffer log?
  • Hi YK,

    I only have this as a message, after joining the network, then send the message using COMMAND_IDENTIFY_QUERY.
    maybe because my message is send using COMMAND_IDENTIFY_QUERY. is it will become an issue ?

    please advice the proper way

    thx for your reply
    regards
    Tonny S
  • No matter if you send the message using COMMAND_IDENTIFY_QUERY, the ZED should do polling to its parent but I don't see this. I suggest you to check this first.
  • Hi YK,

    I attached the sniffer log, is the messaging in the attached log is already correct ?

    is this below is this polling msg ?

    Frame 80: 12 bytes on wire (96 bits), 10 bytes captured (80 bits) on interface 0

       Interface id: 0 (\\.\pipe\ws_socket)

       Encapsulation type: IEEE 802.15.4 Wireless PAN (104)

       Arrival Time: Jun 20, 2017 06:37:13.000960000 SE Asia Standard Time

       [Time shift for this packet: 0.000000000 seconds]

       Epoch Time: 1497915433.000960000 seconds

       [Time delta from previous captured frame: 1.000004000 seconds]

       [Time delta from previous displayed frame: 1.000004000 seconds]

       [Time since reference or first frame: 31.000226000 seconds]

       Frame Number: 80

       Frame Length: 12 bytes (96 bits)

       Capture Length: 10 bytes (80 bits)

       [Frame is marked: False]

       [Frame is ignored: False]

       [Protocols in frame: wpan]

    IEEE 802.15.4 Command, Dst: 0x0000, Src: 0xbb69

       Frame Control Field: 0x8863, Frame Type: Command, Acknowledge Request, PAN ID Compression, Destination Addressing Mode: Short/16-bit, Frame Version: IEEE Std 802.15.4-2003, Source Addressing Mode: Short/16-bit

           .... .... .... .011 = Frame Type: Command (0x3)

           .... .... .... 0... = Security Enabled: False

           .... .... ...0 .... = Frame Pending: False

           .... .... ..1. .... = Acknowledge Request: True

           .... .... .1.. .... = PAN ID Compression: True

           .... ...0 .... .... = Sequence Number Suppression: False

           .... ..0. .... .... = Information Elements Present: False

           .... 10.. .... .... = Destination Addressing Mode: Short/16-bit (0x2)

           ..00 .... .... .... = Frame Version: IEEE Std 802.15.4-2003 (0)

           10.. .... .... .... = Source Addressing Mode: Short/16-bit (0x2)

       Sequence Number: 148

       Destination PAN: 0x4a63

       Destination: 0x0000

       Source: 0xbb69

       Command Identifier: Data Request (0x04)

    11-Router_Test.zip

    thx for your reply

    regards

    Tonny S

  • Yes, this one is polling message. In sniffer log, Data Request means polling.

  • Hi YK,

    I still cannot send the data to destination thru router

    attached is the sniffer log

    message number 15543-15576 or in time is 4050-4055 is when my ZED connected to destination Router/Coordinator

    message number 15600-15650 or in time is 4056-4107 is when my ZED connected to intermediary Router

    if i see in the log I already have polling message. and i see a coordinator realignment... but no message coming thru.

    i send the payload inside ZCL identifiy command, please advice on this

    also from your web, i see below command, but cannot find an equal command in the bringup script, what is the equal command for this in the bringup ?

    10:44:16.54 COM1 APP_CNF_BDB_START_COMMISSIONING (0x2F05) --> Start commissioning using network steering as parameter to be ready for device to join
        CommissioningMode: (0x02) Network Steering (0x2)

    12-Router_Test.zip

    thx for your reply

    Regards

    Tonny

  • I don't see ZED connected to intermediary Router during your message number 15600-15650 or in time is 4056-4107 in sniffer log. What's the short address of your intermediary Router?