Using the Manufacturing Library in an EmberZNet Application#

The Manufacturing Library is provided as a component that can be optionally included in the application code. It must be enabled at build time in order to use the library functions in the Command Line Interface (CLI). The Manufacturing Library CLI component uses the Manufacturing Library API functions for testing RF performance and is accessed via serial UART.

For testing unattended devices, the Manufacturing Library Ota component is used where the test commands are sent over-the-air to the device under test (DUT). This is useful in evaluating the radiated RF performance (TRP/TIS) where connecting communication wires to the DUT is not preferred as it could provide interference and affect the RF performance. The Ota component is enabled with a procedure similar to the following. Use of this component is not described in this document.

The following instructions assume you have installed Simplicity Studio and the EmberZNet SDK (software development kit), and that you have a SoC Zigbee project open in the Simplicity IDE (integrated development environment). Note that, in case of host/NCP (and Zigbeed/RCP in SDK 7.1.1 and above), the manufacturing library should be enabled on the NCP/Zigbeed side, while the Manufacturing Library CLI component should be enabled on the host application. For guidance on how to build a Zigbee application, refer to the Zigbee EmberZNet PRO Quick-Start Guide.

In SDK 7.0 and higher:

  1. If the <project>.slcp file is not open, double-click it in the Project Explorer view to open it. Go to the Software Components tab and enter the keyword ‘manufacturing’ to search for the Manufacturing Library and Manufacturing CLI components. Install both components.

    image1image1

  2. Ensure that the I/O Stream USART and associated components are installed as shown below.

    image2image2

In SDK 6.10.x and lower:

  1. In the Plugins tab, search for Manufacturing Library. Check (enable) the Manufacturing Library plugin in the Stack Libraries group and the Manufacturing CLI plugin in the utilities group. Note that if you only check the Manufacturing CLI plugin you will see an error when you generate the project files.

    image3image3

  2. Ensure that the Serial plugin is enabled.

    image4image4

Command Line Interface#

Gecko SDK 2.6.0 and above uses the serial interface to start the manufacturing test mode and test RF parameters, sleep current, and other peripherals using the Manufacturing Library CLI plugin. The Manufacturing Library CLI commands are provided in the table below.

Command (1)DescriptionAPI FunctionArguments
NameTypeDescription

start

Starts mfglib test mode

emAfMfglibStartCommand

useCallback

BOOLEAN

Use the Rx callback.

stop

Stops mfglib test mode

emAfMfglibStopCommand

N/A

N/A

tone start

Starts a tone test

emAfMfglibToneStartCommand

N/A

N/A

tone stop

Stops the tone test

emAfMfglibToneStopCommand

N/A

N/A

status

Prints the current status of the manufacturing library

emAfMfglibStatusCommand

N/A

N/A

set-channel

Sets the channel used by the manufacturing library for testing.

emAfMfglibSetChannelCommand

channel

INT8U

The 802.15.4 channel number

set-power

Set the power for manufacturing test

emAfMfglibSetPowerAndModeCommand

powerLevel

INT8S

The power level

set-power

Set the power for manufacturing test

emAfMfglibSetPowerAndModeCommand (2)

powerMode (2)

INT16U

The power mode

stream start

Starts the stream test

emAfMfglibStreamStartCommand

N/A

N/A

stream stop

Stop the stream test

emAfMfglibStreamStopCommand

N/A

N/A

programEui

Program a custom EUI

emAfMfglibProgramEuiCommand

duration

IEEE_ADDRESS

IEEE address to program

set-options

Sets transmission options in the manufacturing library for testing

emAfMfglibSetOptions

options

INT8U

The options bitmask (0 = normal transmit, 1 = CSMA transmit)

sleep

Sleep

emAfMfglibSleepCommand

duration

INT16U

Sleep duration (mS).

send random

Send a series of test packets with random data

emAfMfglibSendCommand

numPackets

INT16U

The number of packets to send

send random

Send a series of test packets with random data

emAfMfglibSendCommand

length

INT8U

The length of the packet to send

send test

Send a series of test packets with fixed data

emAfMfglibSendCommand

numPackets

INT16U

The number of packets to send

send test

Send a series of test packets with fixed data

emAfMfglibSendCommand

length

INT8U

The length of the packet to send

send message

Send a test message with the specified data in it.

emAfMfglibSendMessageCommand

data

OCTET_STRING

The hex data to send, up to 16 bytes

send message

Send a test message with the specified data in it.

emAfMfglibSendMessageCommand

numPackets

INT16U

The number of packets to send.

Notes:

  1. All commands in the table are prepended with plugin mfglib in the actual implementation of the command in the CLI.

  2. The powerMode argument is ignored in the manufacturing test mode for EFR32. Enter 1 when setting the power level using the set-power command.