|
Setting TX Power |
Top Previous Next |
The output power of the Wi-Fi hardware can be adjusted in 256 steps. The wln.settxpower method is provided for that purpose. The power is expressed in arbitrary units and does not correspond directly to mW or db. The lowest output power is set with wln.settxpower(0) and the highest power is set with wln.settxpower(255). Lower power reduces the current consumption of the Wi-Fi module, but not by much. For most cases you can just set the power to maximum right after the boot and "forget about it":
'set output power to maximum If wln.settxpower(255)<>OK Then 'the task was rejected for some reason ... End If 'wait for the task to be completed While wln.task<>PL_WLN_TASK_IDLE Wend
|
Please, note that setting TX power is a wln task, and your application should wait for this task to complete before issuing another task.