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.

CC2530 as ZNP Examples

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

Hi everyone, Francisco over here, I've been looking for examples on using the CC2530 as a ZNP, but beyond the Texas documentation, I haven't found anything to get an idea of communicating the CC2530 over UART with another microcontroller.
Does anyone have something that could be of use?

Greetings
Francisco

  • Do you try to use ZTool to test ZNP, which you can refer to sunmaysky.blogspot.com/.../use-ztool-z-stack-30-znp-to-set-up.html

  • Hi Francisco,

    You can refer to the ZIGBEE-LINUX-SENSOR-TO-CLOUD solution for a BeagleBone Black or Ubuntu OS host, or the community-based zigbee2mqtt project may be able to fit your needs.

    Regards,
    Ryan

  • Dear Yikai,I am confused, on sunmaysky blog, I don't see anything about the connections, I tried with P0.2 and P0.3 as UART pins, in addition to P1.6 and P1.7 but I see no response on any of those pins, is there any ztool connection and use manual ?, load the CC2530ZNP-with-SBL.hex program, which compiles with the options left below.

    BDB_FINDING_BINDING_CAPABILITY_ENABLED = 0
    TC_LINKKEY_JOIN
    HAL_UART_DMA_RX_MAX = 128
    MAXMEMHEAP = 2765
    NWK_MAX_DEVICE_LIST = 10
    ZDSECMGR_TC_DEVICE_MAX = 30
    DISABLE_GREENPOWER_BASIC_PROXY
    POWER_SAVING
    FEATURE_SYSTEM_STATS
    MT_GP_CB_FUNC
    ASSERT_RESET
    FAKE_CRC_SHDW

    Greetings
    Francisco

  • Dear Ryan,I hope I am not wrong, but zigbee2mqtt does not have an end device profile, for use on ultra low power equipment, which is critical in my solution.

    Greetings
    Francisco

  • Hi Francisco,

    Please refer to the Z-Stack ZNP Interface Specification from Z-Stack 3.0.2\Documents\API and change the Z-Tool -> Tools -> Settings -> Serial Devices -> COM Port to 115200 baud and RTS/CTS handshake.  Be aware that a SBL build will wait 1 minute before forcing the application code to run.  Serial Boot Loader for CC2530 from Z-Stack 3.0.2\Documents\CC2530 provides more information on this operation.

    You are correct, zigbee2mgqtt is not intended for end device use cases.

    Regards,
    Ryan

  • Dear Ryan, I compiled the project with the following compiler options:

    BDB_FINDING_BINDING_CAPABILITY_ENABLED = 0
    TC_LINKKEY_JOIN
    HAL_UART_DMA_RX_MAX = 128
    MAXMEMHEAP = 2765
    NWK_MAX_DEVICE_LIST = 10
    ZDSECMGR_TC_DEVICE_MAX = 30
    DISABLE_GREENPOWER_BASIC_PROXY
    POWER_SAVING
    FEATURE_SYSTEM_STATS
    MT_GP_CB_FUNC
    ASSERT_RESET
    FAKE_CRC_SHDW

    Also deactivate the Flow Control commenting the following line
         uartConfig.flowControl = FALSE; in znp_app.c
    I am using the following connection:

    CC2530         FTDI
    TX P0.3  ->    RX
    RX P0.2 ->     TX
    GND       ->     GND

    Nothing happens when I connect to a serial terminal, not even using ZTool.

    The module I use is:

    http://www.gban.cn/en/product_show.asp?id=37

    Regards

    Francisco

  • Try to add ZTOOL_P1 into your predefined symbols and I also suggest you to use scope to check UART signals.

  • Dear Yikai,I managed to see the device through ZTool, but when I want to set the device as end device, it looks like this:

    <TX> 09: 50: 09.63 COM4 SYS_OSAL_NV_WRITE (0x2109)
    Id: 0x0088
    Offset: 0x00
    Len: 0x01
    Value:. (0x02)

    <RX> 09: 50: 09.65 COM4 SYS_OSAL_NV_WRITE_SRSP (0x6109)
    Status: SUCCESS (0x0)

    <TX> 09: 50: 48.95 COM4 APP_CNF_BDB_SET_CHANNEL (0x2F08)
    isPrimary: TRUE (0x1)
    Channel: CHNL_0x00002000 (0x2000)

    <RX> 09: 50: 48.97 COM4 APP_CNF_BDB_SET_CHANNEL_SRSP (0x6F08)
    Status: SUCCESS (0x0)

    <TX> 09: 51: 06.24 COM4 APP_CNF_BDB_SET_CHANNEL (0x2F08)
    isPrimary: FALSE (0x0)
    Channel: NONE (0x0)

    <RX> 09: 51: 06.25 COM4 APP_CNF_BDB_SET_CHANNEL_SRSP (0x6F08)
    Status: SUCCESS (0x0)

    <TX> 09: 51: 17.5 COM4 UTIL_GET_DEVICE_INFO (0x2700)

    <RX> 09: 51: 17.51 ​​COM4 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)
    IEEEAddr: 0x00124B0001454757
    ShortAddress: 0xFFFE
    DeviceType: COORDINATOR, ROUTER, END_DEVICE (0x7)
    DeviceState: DEV_HOLD (0x0)
    NumAssocDevices: 0x00
    AssocDevicesList
    I am using a different ID for Coordinator and Node
    Coordinator ID 0x87
    Router ID 0x87

    Greetings
    Francisco

  • I am following the steps in this blog, could there be a problem with the OSC32K_CRYSTAL_INSTALLED ?, I saw the following post:
    e2e.ti.com/.../compiler-cc2530-z-stack-working-with-z-tool
    There was a problem similar to mine, if so, where should I define the
    OSC32K_CRYSTAL_INSTALLED = FALSE.
    I put it in the precompiler options but it throws an error.

    Greetings
    Francisco

  • This is the router LOG:

    Start Time: 15-04-2021 12:11:34

    <TX>12:12:20.47 COM4 SYS_OSAL_NV_WRITE (0x2109)
        Id: 0x0087
        Offset: 0x00
        Len: 0x01
        Value: . (0x01)

    <RX>12:12:20.5 COM4 SYS_OSAL_NV_WRITE_SRSP (0x6109)
        Status: SUCCESS (0x0)

    <TX>12:12:51.94 COM4 APP_CNF_BDB_SET_CHANNEL (0x2F08)
        isPrimary: TRUE (0x1)
        Channel: CHNL_0x00002000 (0x2000)

    <RX>12:12:51.95 COM4 APP_CNF_BDB_SET_CHANNEL_SRSP (0x6F08)
        Status: SUCCESS (0x0)

    <TX>12:13:02.92 COM4 APP_CNF_BDB_SET_CHANNEL (0x2F08)
        isPrimary: FALSE (0x0)
        Channel: NONE (0x0)

    <RX>12:13:02.94 COM4 APP_CNF_BDB_SET_CHANNEL_SRSP (0x6F08)
        Status: SUCCESS (0x0)

    <TX>12:13:25.8 COM4 APP_CNF_BDB_START_COMMISSIONING (0x2F05)
        CommissioningMode: (0x02) Network Steering (0x2)

    <RX>12:13:27.07 COM4 APP_CNF_BDB_START_COMMISSIONING_SRSP (0x6F05)
        Status: SUCCESS (0x0)

    <RX>12:13:27.09 COM4 ZDO_STATE_CHANGE_IND (0x45C0)
        State: INVALID_PARAMETER (0x2)

    <RX>12:13:27.09 COM4 APP_CNF_BDB_COMMISSIONING_NOTIFICATION (0x4F80)
        Status: 1 (0x1)
        Commissioning Mode: 0x01 (Network Steering) (0x1)
        Commissioning Mode: 0x02 (Network Steering) (0x2)

    <RX>12:13:27.39 COM4 APP_CNF_BDB_COMMISSIONING_NOTIFICATION (0x4F80)
        Status: 0x02 (No Network) (0x2)
        Commissioning Mode: 0x01 (Network Steering) (0x1)
        Commissioning Mode: 0 (0x0)

    <RX>12:13:27.39 COM4 ZDO_STATE_CHANGE_IND (0x45C0)
        State: SUCCESS (0x0)

    <TX>12:14:36.3 COM4 UTIL_GET_DEVICE_INFO (0x2700)

    <RX>12:14:36.33 COM4 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
        Status: SUCCESS (0x0)
        IEEEAddr: 0x00124B0001454757
        ShortAddress: 0xFFFE
        DeviceType: COORDINATOR, ROUTER, END_DEVICE (0x7)
        DeviceState: DEV_HOLD (0x0) why this append?googl
        NumAssocDevices: 0x00
        AssocDevicesList

    Dear Yikai   :   DeviceState: DEV_HOLD (0x0)  -> Why is this happening?

    CFG1 and CFG1 are grounded.

    Regards

    Francisco

  • According to your log, the device cannot find an open Zigbee network to join. Do you enable permit join on your coordinator?

  • Dear Yikai, following the example of :
    sunmaysky.blogspot.com/.../use-ztool-z-stack-30-znp-to-set-up.html
    when I send the command (on coordinator) :
    APP_CNF_BDB_START_COMMISSIONING
    I get:
    ZDO_MGMT_PERMIT_JOIN_RSP
    ZDP_SUCCES

  • I suggest you to use sniffer to check what happens over the air.

  • YK has the right idea with using the sniffer log, please see this E2E post to get started.  I am not familiar with your hardware but if it is not configured properly then the Zigbee packets may not be transmitting properly.

    Regards,
    Ryan