Controlling the module from the command line

Install the drivers for the  Silicon Labs CP2104 USB-to-UART bridge

Install drivers for the evaluation board's CP2104 USB-to-UART bridge.

Getting started for Windows

Link Labs provides the following pre-packaged executables for download. These are command-line utilities to control the evaluation board's module over USB.

  • symphony_test.exe - a command-line utility to control the module in Symphony Link mode. This allows you to control the module while it participates in a Symphony Link network.
  • nomac_test.exe - a command-line utility to control the module in NoMac mode. This utility gives you control of the module's low-level radio parameters.

Alternatively, you can compile any of these applications from the host interface source code using MinGW with MSYS. Follow the MinGW installation instructions for Linux using an MSYS shell.

Attach the evaluation board and identify the serial port

  1. Connect the evaluation board to your PC using a mini-USB cable.
  2. Open the Windows device manager (using the command window, run devmgmt.msc).
  3. Serial ports are displayed under Ports (COM & LPT).
  4. Note which COM port is enumerated by the Silicon Labs CP2104x USB to UART Bridge.
Attach the evaluation board and identify the serial port

Getting started for OSX and Linux users

For OS X or Linux, create the symphony_test, ensemble_test, lorawan_test or nomac_test binary by compiling from source.

  • Download the host interface source code
  • Once the download is complete, extract the tar ball to a location of your choice, which we'll refer to as [source_path]
  • Open a terminal window
  • Change directory: cd [source_path].release_[release]/projects/symphony_test (or nomac_test). Replace [release] with the appropriate release number, e.g., "_1_3_0".
  • Make the binary by running make

Once made, the binary (either symphony_test, ensemble_test, lorawan_test or nomac_test) will reside in the exe subdirectory.

Attach the evaluation board and identify the serial port

  1. Connect the evaluation board to your Mac or Linux machine using a mini-USB cable.
  2. Open a terminal and run ls /dev/cu* (OSX) or ls /dev/tty* (Linux) to list all serial connections.
  3. The evaluation board will typically enumerate to a serial port named /dev/cu.SLAB_USBtoUART (OSX) or /dev.tty.SLAB_USBtoUART (Linux). Note the serial port enumerated by the evaluation board.

Changing the default serial port

By default, the "_test" applications talk to the COM3 serial port (Windows) or /dev/cu.SLAB_USBtoUART (OSX) or /dev.tty.SLAB_USBtoUART (Linux). If the evaluation board enumerates to a different serial port, the serial port must be specified with each terminal command.

To address a different serial port, use the -D command as follows:

Windows

Prefix any command with -D \\.\COMx, where x represents the number of the COM port. For example, to get the UUID of a module connected to COM21 using symphony_test, run the following:

symphony_test -D \\.\COM21 --uuid

(Note: lorawan_test does not require the "\\.\" before the COM port.)

Windows

OSX

Prefix any command with -D /dev/cu.SLAB_USBtoUARTx, where x represents the number of the COM port. For example, to get the UUID of a module connected to USBtoUART30, run the following:

./symphony_test -D /dev/cu.SLAB_USBtoUART30 --uuid
OSX

Linux

Prefix any command with -D /dev/tty.SLAB_USBtoUARTx, where x represents the number of the COM port. For example, to get the UUID of a module connected to USBtoUART30, run the following:

./symphony_test -D /dev/cu.SLAB_USBtoUART30 --uuid

symphony_test

This command-line utility is for controlling a module while it participates in a Symphony Link network. To generate a list of available commands, run

symphony_test --help
symphony_test

lorawan_test.exe

This command-line utility is for controlling a module using LoRaWAN mode. It exposes all of the LoRaWAN features in the ll_ifc library and turns the PC + module into a LoRaWAN node.  The PC can join a LoRaWAN network, send messages and receive messages.

Use the "-D" argument to provide the module's serial port to lorawan_test.  If the evaluation board enumerates to COM4, for example, you can query the module's information by sending the "info" command:

lorawan_test.exe -D COM4 info

(Remember to replace COM4 with your actual serial port.)  The output should look like:

I 00000000 src/main.c:992: ll_tty_open(COM4, 115200)
Open COM4 baud 115200
I 00000000 src/main.c:1000: Command "info" with 0 arguments
Link Labs Firmware Type: 0003.0001
Link Labs Hardware Type: LLRLP20 v3
Link Labs EUI-64: a0bb3e0030001419
Link Labs UUID: $301$0-0-0-a0bb3e0030001419 

You can display the application's help file by sending the "help" command:

lorawan_test.exe help

nomac_test.exe

This command-line utility is for controlling a module using NoMac mode. To generate a list of available commands, run

nomac_test --help
nomac_test.exe

0 Comments

Add your comment

E-Mail me when someone replies to this comment