BLE Gain Table#
To program region-based maximum power for the BLE device, follow the steps below.
See the Region-based Maximum Power section for more details.
Compile and insert the driver as described in the Compilation Steps and Installing the Driver sections.
Navigate to the rsi/release folder.
Run the following command:
# ./bt_ble_gain_table_update <protocol ID>
For example:
# ./bt_ble_gain_table_update 0
In this case, 0 is the Protocol ID value for BLE.
The commands above start the table programming and should display the following logs.
******************Successfully completed programming n gain tables*****************
In this case,
n
is the number of structures given in wlan_gain_table.txt file.Below is the reference Gain table structure format while updating the file
//!************************************************************ //! INSTRUCTIONS SHOULD BE FOLLOWED TO EDIT BELOW GAIN TABLES: //!************************************************************ //! 1. Each value should be seperated by ',' and space characters. //! 2. Multi-line comments not supported. (e.g. /* comment */) //! 3. A space before comment is needed, for inline comments. (e.g. <Data> //<Comment>) //! 4. Hexadecimal numbers not supported. //! 5. No space between value and ',' character. //! 6. Max power gain table with size more than 10 bytes is not supported. //! 6. Offset gain table with size more than 128 bytes is not supported. //! 7. Supported table names and their maximum supported size are //! For BLE Max Power Table --- RS9116_BLE_REGION_BASED_MAXPOWER_XX MAX_LENGTH = 10 //! For BLE Offset Table --- RS9116_BLE_REGION_BASED_MAXPOWER_VS_OFFSET_XX MAX_LENGTH = 128 //! NOTE: No support for other table names. //! 8. Update above mentioned respected generic tables with the required data //! 9. Supported Region names: //! FCC, ETSI, TELEC, WORLDWIDE, KCC //!
Following is the format of BLE Gain Tables:
BLE HP Chain Max Power Gain Table format:
//! <TABLE NAME>[] = { //<COMMENTS if any>
//! <REGION NAME 1>, <MAX POWER>,
//! <REGION NAME 2>, <MAX POWER>,
//! .
//! .
//! <REGION NAME N>, <MAX POWER>,
//! }; //<COMMENTS if any>
//!
Note:
The maximum size for the BLE Max Power Gain Table is 10 bytes
In each entry, list the max power value desired in dBm (that is, 1dB steps)
BLE HP Chain Offset Gain Table format:
//! <TABLE NAME>[] = { //<COMMENTS if any>
//! <NO.of Regions>,
//! <REGION NAME 1>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! <CH NUMBER 1>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! <CH NUMBER 2>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! .
//! .
//! <CH NUMBER m>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! <REGION NAME 2>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! <CH NUMBER 1>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! <CH NUMBER 2>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! .
//! .
//! <CH NUMBER m>, <POWER OFFSET FOR 1 M>, <POWER OFFSET FOR 2 M>, <POWER OFFSET FOR 125 kbps>, <POWER OFFSET FOR 500 kbps>,
//! .
//! .
//! <REGION NAME y>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! .
//! .
//! }; //<COMMENTS if any>
Note:
The maximum size for the BLE Offset Gain Table is 128 bytes
Each listed power offset value represents the desired additional power back off, that should be applied (on top of the absolute limits listed in the Max Power Gain Table), expressed in dB (that is 1 dB steps).
The offset value specified for channel number 255 represents all channels except those that are explicitly specified.
LP Chain 0 dBm and +8 dBm Gain Tables format:
//! <TABLE NAME>[] = { //<COMMENTS if any>
//! <NO.of Regions>,
//! <REGION NAME 1>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! <CH NUMBER 1>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! <CH NUMBER 2>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! .
//! .
//! <CH NUMBER m>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! <REGION NAME 2>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! <CH NUMBER 1>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! <CH NUMBER 2>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! .
//! .
//! <CH NUMBER m>, <POWER INDEX FOR 1 M>, <POWER INDEX FOR 2 M>, <POWER INDEX FOR 125 kbps>, <POWER INDEX FOR 500 kbps>,
//! .
//! .
//! <REGION NAME y>,
//! <NO.OF CHANNELS IN THIS REGION>,
//! .
//! .
//! }; //<COMMENTS if any>
Note:
The maximum size for the LP chain 0 dBm and +8 dBm gain tables is 128 bytes.
In each entry, the desired power indices is listed. The valid range is 1 to 31 for the 0 dBm table and 33 to 63 for the 8 dBm table.
The offset value specified for channel number 255 represents all channels except those that are explicitly specified.
Example BLE Gain Table structures:
HP Chain Max Power Gain Table structure:
RS9116_BLE_REGION_BASED_MAXPOWER_XX[] = {
// REGION_NAME MAX_POWER
FCC, 18,
ETSI, 8,
TELEC, 10,
WORLDWIDE, 18,
KCC, 10,
};
HP Chain Offset Gain Table structure:
RS9116_BLE_REGION_BASED_MAXPOWER_VS_OFFSET_XX[] = {
5, //NUM_OF_REGIONS
FCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 0, 0, 6, 0,
0, 0, 0, 6, 0,
37, 1, 3, 6, 0,
38, 2, 4, 6, 1,
39, 3, 18, 6, 2,
ETSI,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 0, 0, 0, 0,
0, 0, 0, 0, 0,
19, 0, 0, 0, 0,
39, 0, 0, 0, 0,
TELEC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 0, 0, 0, 0,
0, 0, 7, 0, 0,
1, 0, 7, 0, 0,
WORLDWIDE,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 0, 0, 0, 0,
0, 0, 0, 0, 0,
19, 0, 0, 0, 0,
39, 0, 0, 0, 0,
KCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 0, 0, 0, 0,
0, 0, 0, 0, 0,
19, 0, 0, 0, 0,
39, 0, 0, 0, 0,
};
The Max Power and Offset Gain Tables above set the maximum TX power limits for the BLE HP chain. Following are the max TX power limitations for the BLE HP chain:
FCC
1 M PHY:
Ch 37: +17 dBm
Ch 38: +16 dBm
Ch 39: +15 dBm
All other channels: +18 dBm
2 M PHY:
Ch 37: +15 dBm
Ch 38: +14 dBm
Ch39: 0 dBm
All other channels: +18 dBm
500 kbps PHY:
Ch 38: +17 dBm
Ch 39: +16 dBm
All other channels: +18 dBm
125 kbps PHY:
+12 dBm on all channels
ETSI
+8 dBm on all channels
TELEC/MIC:
Ch 0-1, 2 M PHY: +3 dBm
All other channel and PHY combinations: +10 dBm
KCC:
+10 dBm on all channels
LP Chain +8 dBm Gain Table structure:
RS9116_BLE_REGION_BASED_MAXPOWER_VS_OFFSET_XX[] = {
5, //NUM_OF_REGIONS
FCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 63, 63, 63, 63,
0, 63, 63, 63, 63,
19, 63, 63, 63, 63,
39, 63, 35, 63, 63,
ETSI,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 63, 63, 63, 63,
0, 63, 63, 63, 63,
19, 63, 63, 63, 63,
39, 63, 63, 63, 63,
TELEC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 63, 63, 63, 63,
0, 63, 63, 63, 63,
19, 63, 63, 63, 63,
39, 63, 63, 63, 63,
WORLDWIDE,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 63, 63, 63, 63,
0, 63, 63, 63, 63,
19, 63, 63, 63, 63,
39, 63, 63, 63, 63,
KCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 63, 63, 63, 63,
0, 63, 63, 63, 63,
19, 63, 63, 63, 63,
39, 63, 63, 63, 63,
};
LP Chain 0 dBm Gain Table structure:
RS9116_BLE_REGION_BASED_MAXPOWER_VS_OFFSET_XX[] = {
5, //NUM_OF_REGIONS
FCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 31, 31, 31, 31,
0, 31, 31, 31, 31,
19, 31, 31, 31, 31,
39, 31, 8, 31, 31,
ETSI,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 31, 31, 31, 31,
0, 31, 31, 31, 31,
19, 31, 31, 31, 31,
39, 31, 31, 31, 31,
TELEC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 31, 31, 31, 31,
0, 31, 31, 31, 31,
19, 31, 31, 31, 31,
39, 31, 31, 31, 31,
WORLDWIDE,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 31, 31, 31, 31,
0, 31, 31, 31, 31,
19, 31, 31, 31, 31,
39, 31, 31, 31, 31,
KCC,
4, //NUM_OF_CHANNELS
//chan_num 1 M 2 M 125 kbps 500 kbps
255, 31, 31, 31, 31,
0, 31, 31, 31, 31,
19, 31, 31, 31, 31,
39, 31, 31, 31, 31,
};
The reference Gain Table above allows the use of BLE LP chain with +8 dBm and 0 dBm mode max power settings. However, for FCC region, channel 39 (2480 MHz), and 2 Mbps PHY, the TX power is restricted to - 7 ~ - 5 dBm to comply with FCC band-edge regulations.