7.5 Operating Modes

In this application developers guide, developers use TeraTerm to provide console inputs.

  • On the Menu bar of Tera Term, go to setup, select serial port and then set the baud rate to 115200 as illustrated in the following figure.
    Figure 7-34. Tera Term Settings
  • Flash the application to the WBZ351 Curiosity Board after the build is successful. See the Program/Flash the Firmware to Device figure of Creating a New P2P PHY MCC Harmony Project from Related Links. The P2P application requires two devices, where the source address of peer device 1 is the destination address of peer device 2 and vice versa. The source address and destination address can be modified in the app_p2p_phy_config.h file as well as via the MCC project graph configuration window. See Application Configuration File figure of Creating a New P2P PHY MCC Harmony Project from Related Links.
  • Once the firmware is flashed to the WBZ351 Curiosity Board, the following print appears in console window (Tera Term). The following section explains in detail how the user must give specific commands to switch between different application modes. For more details, see Command Table Description table of Command Table from Related Links.
  • The user must follow the additional Tera Term settings. The following figure illustrates the console settings.
    Figure 7-35. Console Settings
  • The following figure illustrates the simple flow diagram on the high level process flow from application level to PHY level.
    Figure 7-36. Application FlowChart
  • The P2P PHY application has two source files:
    • app_phy_cmd_processor.c, which is an interface between the console and the APP/PHY layer.
    • app_p2p_phy.c, which is an interface between user commands via the console and the PHY layer.
  • The application features five modes:
    • Data Mode – This basic chat feature displays bytes on the peer device console once the user enters them. The user can also specify a time period, starting the timer when they begin entering the first byte of data. If the user does not press enter, the system automatically sends the data when the timer expires.
      • Data format can be given in format xx :data, where xx is device index. For example, 01 :Microchip, 01 specifies device table index and Microchip specifies user data), and actual data comes after :.
        Figure 7-37. Data Mode Example
      • The data can also be sent without any index, in such scenario, the data will be sent to device details (address) stored in index 1 of the device table. If the info in index 1 of the device table is not valid, then the data will be broadcasted.
      • For Broadcasting data, format is ff :data. For example, ff :Microchip).
      • The device table can be updated with a short address and IEEE address as per user preference using the console updateDeviceTable command. For more details on the commands supported in the application, see Command Table from Related Links.
      • To enter data mode, the user must give +++,time (in microseconds) in the console.
        Note: The user can provide the input through console in the Data mode only. In all the test modes, the payload data is defined in the application. The application must perform data payload modifications, if required. The Data mode has a max payload limit of 232 bytes (due to the fragmentation of payload feature in the application). As per IEEE® 802.15.4 specification, the maximum payload size is 127 octets = 116 octets + maximum possible frame overhead. In application fragmentation, 116 x 2 = 232 octets + maximum possible frame overhead = 254 octets.
      • The following figure illustrates the operation of device in data mode, which is accessible using the +++, time (in microseconds) command.
      Figure 7-38. Data Mode
      • To exit Data mode, the user must give the &&& command in the console. Once the user exits from the Data mode, the system displays device performance parameters like packet error rate and the number of bytes sent.
        Figure 7-39. Exit Data Mode
    • Continuous Test Mode – Predefined payload of 116 bytes is set in application. Each packet with 116 bytes is sent one by one after the previously sent packets received ACK from the peer device. Maximum payload size of 116 is set as an example.
      • To enter Continuous Test Mode, the user must give contTestMode command in the console.
        Figure 7-40. Continuous Test Mode
    • Periodic Test Mode - User can provide a time as input. After periodic expiry of the user configured time, the predefined payload of 116 bytes will be sent to peer device. Once the Tx is done, without waiting for ACK, the next transmit starts once the timer expires after a configured time.
      • To enter Periodic Test Mode, the user must give periodTestMode,time (in microseconds) command in the console.
        Figure 7-41. Periodic Test Mode
      • Note: For all the above modes, the total number of packets sent, bytes sent, packets which received ack and PER value are displayed at the end.
    • Throughput Test Mode – Time period of 1 second is set as default in application. The max payload is predefined (116 bytes), which is sent once tx done cb is called. The packets are sent continuously until the timer expires. The total no. of packets sent, bytes sent, packets which received ack and PER value per second are displayed at the end.
      • To enter Throughput Test Mode, the user must give throughputTestMode command in the console.
        Figure 7-42. Throughput Test Mode
    • PER Test Mode – Packet limit is fixed to 100 for this mode. 100 packets are sent continuously. Each packet is of max payload limit. The total no. of packets sent, bytes sent, packets which received ack and PER value are displayed at the end.
      • To enter PER Test Mode, the user must give perTestMode command in the console.
        Figure 7-43. PER Test Mode
    • Each mode operates independently, only one mode can be enabled at a time.
    • To stop running Test modes, use the command stopTestMode. All the active running test modes will be stopped. This command can be applied to stop the test modes only.
      Figure 7-44. Stop Active Test Modes
Note:
  • For more details on the commands to navigate/switch to different modes in application, see Command Table from Related Links.
  • While the packets are being received, the Tera Term window displays the following information:
    • Link Quality Indicator (LQI)
    • Received Signal Strength (RSSI)
    • Received packet count
    • Length of received payload in bytes
  • For more details on peer device 2 terminal, see Data Mode figure.