forked from idor/ti-utils
-
Notifications
You must be signed in to change notification settings - Fork 13
/
README
209 lines (149 loc) · 6.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
The calibrator and other useful utilities for TI wireless solution,
based on wl12xx driver.
Calibration is a process in which specific radio configuration parameters are
generated and saved into the NVS file, later to be used by the wl12xx driver
upon initialization.
These configuration parameters are specific to the chip on the specific design
and therefore are sent back to the driver to store in non-volatile memory for
later use. Upon initialization, the wl12xx driver will load an NVS file where
it expects to read those parameters and send them to the chip.
The NVS file contains 2 main parts - one stores the calibration parameters and
the other one stores initialization information required for the wl12xx driver.
--- Build procedure
Kernel configuration.
Make sure your kernel is configured to support nl80211 testmode commands
(NL80211_TESTMODE=y). Also enable following configurations:
CRC7=m
FW_LOADER=m
In userspace there is dependent on libnl v2.x package. It can be downloaded
from http://www.infradead.org/~tgr/libnl/files/libnl-2.0.tar.gz
Set follow environment variables:
export NFSROOT=<path to roofs of a target where installed libnl library>
export CROSS_COMPILE=arm-none-linux-gnueabi-
make
make install
--- How to calibrate
Automatic calibration procedure.
* Make sure all modules up to wl12xx.ko are loaded. wl12xx_sdio.ko should NOT be loaded.
* The firmware directory must be writeable.
* A "plt firmware" must be present in the firmware directory.
calibrator plt autocalibrate <dev> <kernel mod> <ini> <nvs> <mac>
dev Device name. Probably wlan0
kernel mod Full path to wl12xx_sdio.ko kernel module
ini Full path to Radio param ini file
nvs Full path of nvs file. Must be the real path as wl12xx will load it
This command will perform the following steps:
* Parse the ini and create an nvs without calibration data.
* Load kernel module.
* Perform TxBip and update nvs with calibration data.
* Unload kernel module.
Android example:
./calibrator plt autocalibrate wlan0 /system/lib/modules/wl12xx_sdio.ko TQS_D_1.7.ini /etc/firmware/ti-connectivity/wl1271-nvs.bin 00:01:02:03:04:05
Native Linux example:
./calibrator plt autocalibrate wlan0 /lib/modules/wl12xx_sdio.ko TQS_D_1.7.ini /lib/firmware/ti-connectivity/wl1271-nvs.bin 00:01:02:03:04:05
--- How to choose INI file
For Beagle board and Panda board use ini_files/127x/TQS_S_2.6.ini
For Blaze board with ES2.1 or ES2.1 use ini_files/128x/TQS_D_1.7.ini
--- How to change MAC address in calibrated NVS
./calibrator set nvs_mac <nvs file> [<mac addr xx:xx:xx:xx:xx:xx>]
If the MAC address missing, the random valid value will be added.
--- How to dump NVS file
calibrator get dump_nvs [<nvs filename>]
--- Detailed instructions for calibrator procedures
Normally you should use the autocalibrate command but it's also possible to
run each step manually.
TxBip procedure (calibration)
It is important to set MAC address to an interface before the procedure.
For example, `ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx'
calibrator wlan0 plt power_mode on
calibrator wlan0 plt tx_bip <0|1> <0|1> <0|1> <0|1> <0|1> <0|1> <0|1> <0|1>
calibrator wlan0 plt power_mode off
Result of this procedure is new NVS file created locally ./new-nvs.bin
In order to use it, copy the file to /lib/firmware/wl1271-nvs.bin and reload.
TxCont procedure
calibrator wlan0 plt power_mode on
calibrator wlan0 plt tune_channel <band> <channel>
calibrator wlan0 plt tx_cont <delay> <rate> <size> <amount> <power> <seed> <pkt mode> <DC on/off> <gi> <preamble> <type> <scramble> <clpc> <seq nbr mode> <dest mac>
calibrator wlan0 plt tx_stop
calibrator wlan0 plt power_mode off
Description: This test sends packets of data directly to air. It receives
several parameters as described bellow, to enable diversity of
operational modes.
It is mostly used to see Energy and radio impact on Air.
Content of Packet can be Random, or Zero, One, Zero, one...
Packets send are configurable with following parameters:
Delay between packets in microseconds
Rate
1 Mbps - 0x00000001 MCS_0 - 0x00002000
2 Mbps - 0x00000002 MCS_1 - 0x00004000
5.5 Mbps - 0x00000004 MCS_2 - 0x00008000
6 Mbps - 0x00000008 MCS_3 - 0x00010000
9 Mbps - 0x00000010 MCS_4 - 0x00020000
11 Mbps - 0x00000020 MCS_5 - 0x00040000
12 Mbps - 0x00000040 MCS_6 - 0x00080000
18 Mbps - 0x00000080 MCS_7 - 0x00100000
24 Mbps - 0x00000200
36 Mbps - 0x00000400
48 Mbps - 0x00000800
54 Mbps - 0x00001000
Size of data field in MPDU (in bytes, 0 - 2284)
Amount - number of packets in case of using series mode
Power - output power in dBm*1000
Seed - value for the scrambler
Packet mode - 0-single, 1-multipile, 3-continuous, 4-FCC
DC on/off - activate DCF
gi - guard interval on/off for 11n rates
Preamble
1 Mbps - long preamble mode=0
2, 5.5, 11 Mbps - long preamble mode=0, short preamble mode=1
6, 9, 12, 18, 24, 36, 48, 54 Mbps - ofdm preamble mode=4
from MCS_0 to MCS_7 - n mixed mode preamble mode=6, greenfield preamble mode=7
Type is 0-data packet, 1-ack, 2-probe req, 3-random data, 4-user data
Scrambler - on/off
CLPC
range 0-100 is disable calibration
Sequence number mode (incremented or fixed)
Destination Mac address
RxStat procedure
There are 2 ways to do it - short where all parameters has default values and
full where you have to set all parameters manually.
Short way:
calibrator plt rx_statistics
In the short way each time the statistics will be reseted.
Full way:
calibrator wlan0 plt power_mode on
calibrator wlan0 plt start_rx_statcs
calibrator wlan0 plt get_rx_statcs
calibrator wlan0 plt stop_rx_statcs
calibrator wlan0 plt power_mode off
While willing to reset the statistic run:
calibrator wlan0 plt reset_rx_statcs
Update NVS file procedure
This is procedure changes ini part of NVS file. It helps when there is need
to change ini part of NVS which already calibrated.
calibrator set upd_nvs <ini file> [<old nvs file> [<new nvs file>]]
If NVS filename parameter not provided the current NVS file will be used from
destination directory (usually /lib/firmware).
--- Miscellaneous procedures
Read MAC address from NVS file
calibrator get nvs_mac [<nvs filename>]
Set NVS to use auto FEM detection
calibrator set autofem 1
Set FEM manufacturer
calibrator set fem_manuf 0|1
Tone transmission testing
Get in PLT mode
calibrator wlan0 plt power_mode on
Run TxTone transmission
calibrator wlan0 plt tx_tone <tone type> <power>
Tone type
1 - Carrier FeedThrough
2 - Single tone
Power [0 - 10000] mdB
Stop transmission
calibrator wlan0 plt tx_stop
Get out from PLT mode
calibrator wlan0 plt power_mode off
-------------------------------------------------------------------------------
The project can be accessed from git repository:
git clone git://github.com/TI-OpenLink/ti-utils.git