BLE PER Mode#

SiWx91x RCP Driver Supports BLE PER Mode Transmit and Receive functionality. Follow the steps below to verify both functionalities.

  1. Follow the Compilation Steps in the above section and compile the driver as follows.

    # make clean; make
  2. Navigate to the release folder and run the following command to set the driver to PER mode:

    # cd release
    # insmod rsi_91x.ko dev_oper_mode=8 driver_mode_value=2 rsi_zone_enabled=0x601 
    # insmod rsi_sdio.ko sdio_clock=50

BLE PER Transmit#

  • Run the following command to check the BLE PER transmit:

    # ./ble_transmit <Access_Addr> <pkt_length> <ble_rate> <rx_channel_index><tx_channel_index> <scrambler_seed> <no_of_packets> <payload_type><le_channel_type> <tx_power_index> <tx_mode> <hopping_type> <ant_sel><inter_pkt_gap> <pll_mode> <rf_type> <rf_chain>

Description of each field:

SI No

Parameters

Description

Values

1

Access Address

It is a 32-bit address in hexadecimal format

00112233

2

pkt_length

Length of the packet, in bytes, to be transmitted.

3

ble_rate

1Mbps - 1 ,2Mbps - 2 , 125Kbps - 4, 500Kbps - 8

4

rx_channel_index

Receive channel index, as per the Bluetooth standard

0 to 39

5

tx_channel_index

Transmit channel index, as per the Bluetooth standard.

0 to 39

6

scrambler_seed

Initial seed to be used for whitening. It should be set to ‘0’ in order to disable whitening. In order toenable the whitening scrambler seed should be given, which is used on the receive side.

7

no_of_packets

Number of packets to be transmitted

It is valid only when the is set to Burst mode.

8

payload_type

Type of payload to be transmitted

‘0’ – Payload consists of all zeros

‘1’ – Payload consists of all 0xFF’s

‘2’ – Payload consists of all 0x55’s

‘3’ – Payload consists of all 0xF0’s

9

le_channel_type

advertising channel - 0

data channel - 1

10

tx_power_index

This field corresponds to the transmit power index,The range for tx_power_index is 1 to 63(0 and 32 are invalid)

- If rf_chain is BT_HP_CHAIN

 o 1 -12 BLE HP Mode

 o 127 magic number for selecting maximum possible power output

- If rf_chain is BT_LP_CHAIN

 o 1 - 31 BLE- 0 dBm mode

 o 33 - 63 BLE- 10 dBm Mode

11

tx_mode

Burst mode - 0

Continuous mode - 1

12

hopping_type

no hopping -0

fixed hopping - 1

random hopping - 2

13

ant_sel

onchip antenna - 2

u.f.l - 3

14

inter_pkt_gap

Number of slots to be skipped between two packets - Each slot will be 1250usec

15

pll_mode

PLL_MODE0 – 0

PLL_MODE1 – 1

PLL_MODE2 – 2

16

rf_chain

WLAN_HP_CHAIN - 0

BT_HP_CHAIN - 2

BT_LP_CHAIN - 3

Example

Continuous Mode :

#./ble_transmit 71764129 250 1 38 38 2 0 0 1 10 1 0 3 0 0 1 3
Transmit a BLE-1Mbps advertising packet with access address of 0x71764129 and packet length of 250 bytes on 2478 MHz with the following parameters.

Access_Addr - 71764129
pkt_length - 250
ble_rate -1
rx_channel_index -38
tx_channel_index -38
scrambler_seed - 2
no_of_packets - 0
payload_type - 0
le_channel_type -1
tx_power_index -10
tx_mode - 1
hopping_type - 0
ant_sel -3
inter_pkt_gap -0
pll_mode -0
rf_type - 1
rf_chain - 3

Burst Mode:

#./ble_transmit 71764129 250 1 38 38 0 0 0 1 10 0 0 3 0 0 1 3
Transmit a BLE-1Mbps advertising packet with access address of 0x71764129 and packet length of 250 bytes on 247 8MHz with the following parameters.

Access_Addr - 71764129
pkt_length - 250
ble_rate - 1
rx_channel_index -38
tx_channel_index -38
scrambler_seed - 0
no_of_packets - 0
payload_type - 0
le_channel_type -1
tx_power_index - 10
tx_mode - 0
hopping_type - 0
ant_sel -3
inter_pkt_gap -0
pll_mode -0
rf_type - 1
rf_chain - 3
  • Run the following command to stop BLE PER transmit:

#./ble_transmit 0

BLE PER Receive#

  • Run the following command to keep the device in BLE PER receive mode:

#./ble_receive <access_addr> <data_legth_indication> <scrambler_seed> <ble_rate> <rx_channel_index> <tx_channel_index> <le_channel_type> <hopping_type> <ant_sel> <loop_back_mode><pwrsave_options> <pll_mode> <rf_type> <rf_chain>

Description of each field:

SI No

Parameters

Description

Values

1

Access Address

It is a 32-bit address in hexadecimal format

00112233

2

data_length_ind ication

0 – Disable(37 Bytes)

1 –Enable(255 Bytes)

3

scrambler_seed

Initial seed to be used for whitening. It should be set to ‘0’ in order to disable whitening.

4

ble_rate

1Mbps - 1 ,

2Mbps - 2 ,

Long Range(LR) - 4

5

rx_channel_index

Receive channel index, as per the Bluetooth standard

0 to 39

6

tx_channel_index

Transmit channel index, as per the Bluetooth standard

0 to 39

7

le_channel_type

advertising channel – 0

data channel – 1

8

hopping_type

no hopping -0

fixed hopping - 1

random hopping - 2

9

ant_sel

onchip antenna - 2

u.f.l – 3

10

oop_back_mode

Disable – 0 Enable – 1

11

pwrsave_options

Disable – 0 Enable – 1

12

pll_mode

PLL_MODE0 – 0

PLL_MODE1 – 1

PLL_MODE2 – 2

13

rf_type

External RF – 0

Internal RF – 1

14

rf_chain

WLAN_HP_CHAIN - 0

WLAN_LP_CHAIN - 1

BT_HP_CHAIN - 2

BT_LP_CHAIN - 3

Example

#./ble_receive 71764129 0 0 1 37 37 0 0 3 0 0 0 1 3
Receive a BLE-1 Mbps advertising packet with 0x71764129 access address and 250byte packet length on 2478 MHz with the following parameters.

scrambler_seed : 0
hopping_type: disable
ant_sel : u.f.l
loop_back_mode : Disabled
pwrsave_options : Disabled
pll_mode : PLL_MODE0
rf_type : Internal RF
rf_chain: BT_LP_CHAIN
  • To get the receive stats, run the following command:

#./bt_util bt_stats <file name > < Number of Pkt>
Ex: #./bt_util bt_stats aa 0
  • The following command can be given to stop the reception.

#./ble_receive 0