NCP API

Zigbee Network Co-Processor (NCP) related APIs for ESP Zigbee SDK.

API Reference

Header File

Functions

esp_err_t esp_ncp_init(esp_ncp_host_connection_mode_t mode)

Initialize with the host for NCP.

Parameters

mode[in] - The mode for connection with the host esp_ncp_host_connection_mode_t

Returns

  • ESP_OK on success

  • others: refer to esp_err.h

esp_err_t esp_ncp_deinit(void)

De-initialize with the host for NCP.

Note

This currently does not do anything

Returns

  • ESP_OK on success

  • others: refer to esp_err.h

esp_err_t esp_ncp_start(void)

Start communicate with the Host for NCP.

Returns

  • ESP_OK on success

  • others: refer to esp_err.h

esp_err_t esp_ncp_stop(void)

Stop communicate with the Host for NCP.

Note

This currently does not do anything

Returns

  • ESP_OK on success

  • others: refer to esp_err.h

Enumerations

enum esp_ncp_host_connection_mode_t

Enum of the mode for connection with the host.

Values:

enumerator NCP_HOST_CONNECTION_MODE_UART

NCP UART connection with the host

enumerator NCP_HOST_CONNECTION_MODE_SPI

NCP SPI connection with the host

enum esp_ncp_status_t

Enum of the status.

Values:

enumerator ESP_NCP_SUCCESS

The generic ‘no error’

enumerator ESP_NCP_ERR_FATAL

The generic ‘fatal error’

enumerator ESP_NCP_BAD_ARGUMENT

An invalid value was passed as an argument

enumerator ESP_NCP_ERR_NO_MEM

Out of memory

enum esp_ncp_states_t

Enum of the network state.

Values:

enumerator ESP_NCP_OFFLINES

The network is offline

enumerator ESP_NCP_JOINING

Joinging the network

enumerator ESP_NCP_CONNECTED

Conneted with the network

enumerator ESP_NCP_LEAVING

Leaving the network

enumerator ESP_NCP_CONFIRM

Confirm the APS

enumerator ESP_NCP_INDICATION

Indication the APS

enum esp_ncp_secur_t

Enum of the network security mode.

Values:

enumerator ESP_NCP_NO_SECURITY

The network is no security mode

enumerator ESP_NCP_PRECONFIGURED_NETWORK_KEY

Pre-configured the network key