Skip to content

Commit

Permalink
Merge pull request #93 from SiliconLabs/cli_wifi_ble_Demo
Browse files Browse the repository at this point in the history
updated the comments
  • Loading branch information
Silabs-Chandra authored Sep 4, 2024
2 parents b007e08 + 9aa3cf1 commit 1f8c63f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ sl_status_t rsi_ble_per_transmit_command_handler(console_args_t *arguments)
rsi_ble_per_tx.phy_rate = (uint8_t)GET_COMMAND_ARG(arguments, 2);
rsi_ble_per_tx.rx_chnl_num = (uint8_t)GET_COMMAND_ARG(arguments, 3);
rsi_ble_per_tx.tx_chnl_num = (uint8_t)GET_COMMAND_ARG(arguments, 3);
rsi_ble_per_tx.scrambler_seed = SCRAMBLER_SEED;
rsi_ble_per_tx.scrambler_seed = GET_OPTIONAL_COMMAND_ARG(arguments, 11, SCRAMBLER_SEED, const uint8_t);
rsi_ble_per_tx.payload_type = GET_OPTIONAL_COMMAND_ARG(arguments, 10, DATA_PRBS9, const uint8_t);//DATA_PRBS9;
rsi_ble_per_tx.le_chnl_type = LE_DATA_CHNL_TYPE;
rsi_ble_per_tx.tx_power = (uint8_t)GET_COMMAND_ARG(arguments, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ static const console_descriptive_command_t _ble_end_test_mode = {

extern sl_status_t rsi_ble_per_transmit_command_handler(console_args_t *arguments);
static const char *_ble_per_transmit_arg_help[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};

static const console_descriptive_command_t _ble_per_transmit_command = {
Expand All @@ -1467,6 +1467,7 @@ static const console_descriptive_command_t _ble_per_transmit_command = {
CONSOLE_OPTIONAL_ARG('c', CONSOLE_ARG_UINT),
CONSOLE_OPTIONAL_ARG('n', CONSOLE_ARG_UINT),
CONSOLE_OPTIONAL_ARG('p', CONSOLE_ARG_UINT),
CONSOLE_OPTIONAL_ARG('s', CONSOLE_ARG_UINT),
CONSOLE_ARG_END }
};

Expand Down
54 changes: 44 additions & 10 deletions SiWx917/wlan_ble/iot-pa-coex-cli_demo_wifi_ble/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,12 @@ The changes needs to be done in rsi_debug.c file and RTE_Device_917.h file


# **CLI Commands for BLE**

**Syntax:**
```perl
reset
```

## **BLE commands**
1. TEST Modes
2. USER Gain Table
3. Advertising Commands

# **TEST MODES:**
Used for the verification of BLE-RF performance.
1. ble_per_transmit
2. ble_per_receive
3. bt_per_stats
Expand All @@ -572,7 +566,7 @@ Enable/disable BLE PER (transmit test) mode transmission

**Syntax:**
```perl
ble_per_transmit <enable> <pkt_len> <phy_rate> <channel> <tx_power> <transmit_mode> [-a <ant_sel>] [-d <inter_pkt_gap>] [-c <rf_chain>] [-n <num_pkts>] [-p <payload_type>]
ble_per_transmit <enable> <pkt_len> <phy_rate> <channel> <tx_power> <transmit_mode> [-a <ant_sel>] [-d <inter_pkt_gap>] [-c <rf_chain>] [-n <num_pkts>] [-p <payload_type>] [-s scrambler_seed]
```

|Parameter |Description |
Expand All @@ -587,6 +581,7 @@ ble_per_transmit <enable> <pkt_len> <phy_rate> <channel> <tx_power> <transmit_mo
|*inter_pkt_gap* |Optional, Number of 1250 us slots to be skipped between two packets (Default 0) | |
|*rf_chain* |Optional, RF Chain (HP/LP) to be used: 2 → BT_HP_CHAIN (Default), 3 → BT_LP_CHAIN. |
|*num_pkts* |Optional, Number of packets to be transmitted, Use 0 (Default) for continuous transmission |
|*scrambler_seed*|Optional, Initial seed to be used for whitening, Use 5 for the continuous mode|
|payload_type | Optional, Type of payload data sequence, Refer to the "https://docs.silabs.com/wiseconnect/latest/wiseconnect-api-reference-guide-ble/rsi-ble-per-transmit-s#payload-type" |

**Example:**
Expand Down Expand Up @@ -621,6 +616,43 @@ Read BLE transmit & receive statistics
```perl
bt_per_stats
```
**Response Structure:**
```perl
// Packet count of CRC fails (Cyclic Redundancy Check (CRC))
uint16_t crc_fail_cnt;

// Packet count of CRC fails (Cyclic Redundancy Check (CRC))
uint16_t crc_pass_cnt;

// Packet count of aborted Tx
uint16_t tx_abort_cnt;

// Packet count of dropped Rx
uint16_t rx_drop_cnt;

// Packet count of CCA Idle (Clear Channel Assessment (CCA))
uint16_t rx_cca_idle_cnt;

// Packet count of Rx start
uint16_t rx_start_idle_cnt;

// Packet count of aborted Rx
uint16_t rx_abrt_cnt;

// Packet count of successful transmissions
uint16_t tx_dones;

// Received Signal Strength Indicator of the packet
int8_t rssi;

// Packet count of ID packets received
uint16_t id_pkts_rcvd;

// Dummy array of length 5
uint16_t dummy[5];
```

**Example:**
```perl
bt_per_stats
Expand All @@ -632,7 +664,7 @@ Start the TX test mode in controller

**Syntax:**
```perl
ble_tx_test_mode <TX_channel> <TX_PHY> [-p <payload_length>] [-t <payload_type>]
ble_tx_test_mode <TX_channel> <TX_PHY> [-a <payload_length>] [-b <payload_type>]
```

|Parameter |Description |
Expand Down Expand Up @@ -663,7 +695,7 @@ Start the RX test mode in controller
**Syntax:**
```perl
ble_tx_test_mode <RX_channel> <RX_PHY>
ble_rx_test_mode <RX_channel> <RX_PHY>
```
|Parameter |Description |
Expand Down Expand Up @@ -691,6 +723,7 @@ ble_end_test_mode
>```
## **USER Gain Table:**
Used to configure the maxmium power with respect to region.
1. ble_user_gain_max_power
2. ble_user_gain_max_power_offset
3. ble_user_gain_lp_chain_0dBm_offset
Expand Down Expand Up @@ -757,6 +790,7 @@ ble_user_gain_table_lp_chain_8dBm_offset
## **Commands**
Used to configure the SiWx917 device as a Peripheral device.
1. bt_set_local_name
2. bt_get_local_device_address
3. bt_get_local_name
Expand Down

0 comments on commit 1f8c63f

Please sign in to comment.