Command Line Options for Host Applications#
To test your Host-NCP interface Silicon Labs recommends that you build a Host application using Simplicity Studio. (If necessary, refer to QSG106: Zigbee EmberZNet PRO Quick-Start Guide for SDK v6.10.x and Lower or Zigbee EmberZNet Quick-Start Guide for SDK 7.0 and Higher for additional help.) <Z3GatewayHost> is the generic name for a Host application.
To build your application in EmberZNet Zigbee SDK 7.0 and higher, follow these steps:
Launch Simplicity Studio.
Change your perspective to the Simplicity IDE perspective.
Create a new Z3Gateway Host project:
a. Select File > New > Silicon Labs Project Wizard.
b. Configure the following:
1. Target Boards: Custom Board. 2. Target Device: Linux (32 bit or 64 bit). 3. SDK: Gecko SDK Suite 4.0.2. 4. IDE/Toolchain: Makefile IDE.c. Click Next.
d. Select Z3Gateway and click Next.
e. Enter a name for your project and click Finish.
Simplicity Studio will now display your Z3 Gateway slcp project file. The default settings are enough to test your EZSP settings. Select Generate. This will create the files for your project. The project is a POSIX-compliant Make project. You can transfer your project to your platform and build it using a standard
makecommand.Once your project is built, you can run it and use the command line options to test your interface. As long as your application properly interfaces the NCP and properly executes, you can be assured that your connections are working properly. You should see a message similar to this one:
./Z3GatewayHost -p /dev/tty.usbmodem0004402507811
Reset info: 11 (SOFTWARE)
ezsp ver 0x08 stack type 0x02 stack ver. [7.0.2 GA build 406]
Ezsp Config: set address table size to 0x0002:Success: setTo build your application in EmberZNet Zigbee SDK 6.10.x and lower, follow these steps:
Launch Simplicity Studio.
Change your perspective to the Simplicity IDE perspective.
Create a new AppBuilder Host project:
a. Select File > New > Project.
b. Select Silicon Labs AppBuilder Project and click Next.
c. Select Silicon Labs Zigbee and click Next.
d. Select EmberZNet <version> Host and click Next.
e. Select the Z3 Gateway application and click Next.
f. Enter a name for your project and click Next.
g. On the Project setup page, leave the board section blank. For the part, make sure None is selected. The toolchain should also reflect no toolchain as well (or None).
h. Click Finish.
Simplicity Studio will now be displaying your Z3 Gateway ISC project file. The default settings are enough to test your EZSP settings. Select Generate. This will create the files for your project. The project is a POSIX-compliant Make project. You can transfer your project to your platform and build it using a standard make command.
Once your project is built, you can run it and use the command line options to test your interface. As long as your application properly interfaces the NCP and properly executes, you can be assured that your connections are working properly. You should see a message similar to this one:
./Z3GatewayHost -p /dev/tty.usbmodem0004402507811
Reset info: 11 (SOFTWARE)
ezsp ver 0x08 stack type 0x02 stack ver. [7.0.2 GA build 406]
Ezsp Config: set address table size to 0x0002:Success: setThe following table summarizes the <Z3GatewayHost> command line options.
| Command Line Option | Optional values | Description |
|---|---|---|
| -n | 0,1 |
0=115200 bps (RTS/CTS), 1= 57600 bps (XON/XOFF) Note that, if present, this must be the first option. |
| -b | <baud rate> | Baud Rate: 9600, 19200, 38400, 57600, 115200, etc. |
| -f | r, x | Flow control: r=RST/CTS, x=XON/XOFF |
| -h | - | Display usage information. |
| -i | 0, 1 | Enable/disable input buffering. |
| -o | 0, 1 | Enable/disable output buffering. |
| -p | <port name> | Serial port name or number (for example, COM1, ttyS0, or 1) |
| -r | d, r, c | NCP reset method: d=DTR, r=RST frame, c=custom |
| -s | 1, 2 | Stop bits |
| -t | <trace flags> | Trace B0=frames, B1=verbose frames, B2=events, B3=EZSP |
| -x | 0,1 | Enable/disable data randomization. |
| -d | <OTA directory path> |
Sets the directory to search OTA files for Zigbee OTA cluster server role. Note that this option is only present when the Zigbee OTA POSIX Filesystem Storage Module is also present. |