LILY-W1 series - System integration manual
UBX-15027600 - R09
Software
Page 40 of 64
C1 - Public
3.10
Adaptivity configuration (Energy Detection)
The LILY-W1 series modules support the adaptivity requirements (energy detection) as per the EN
300 328 standard for Wi-Fi. The adaptivity or Energy Detect mechanism must be explicitly enabled
after the startup of the module, and correct detection threshold values must be configured. These
threshold values depend on the combined gain of the antenna and antenna trace used in the end
product.
☞
A configuration file to enable energy detection and configure the detection thresholds is
provided by u-blox for the reference designs (Appendix B and the approved antennas [3]).
The following command enables energy detection and configures the detection thresholds according
to the settings in the ed_mac_ctrl.conf configuration file:
The content of the ed_mac_ctrl.conf file is provided in the following excerpt:
☞
The offset value is determined for the u-blox reference design as mentioned in Appendix B.
The reference design complies with EN 300 328 standard for the offset of
0x1b
.
Changes to the antenna path of the reference design, such as introducing a higher attenuation on the
antenna path, have to be reflected into the energy detection configuration file. Thus, the offset can
be increased to compensate the additional attenuation of the antenna path; where increasing the
value of the offset would result in a more sensitive behavior. Increasing the offset value by 1 would
lower the sensitivity threshold for energy detection by 1 dB. An integrator is encouraged to optimize
the sensitivity threshold for energy detection.
3.11
Usage examples
3.11.1
Wi-Fi access point mode
The following example configures and starts an access point using hostapd.
Create a configuration file with the following network related settings:
Then start hostapd using the command:
mlanutl mlan0 hostcmd ed_mac_ctrl.conf ed_mac_ctrl
# File : ed_mac_ctrl.conf
#
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl.conf ed_mac_ctrl
#
## Set ED MAC control
ed_mac_ctrl={
CmdCode=0x0124 # do NOT change this line
Enable:2=0x1
# 0
- disable, use default
# 1
- enable
Offset:2=0x1b
# 0
- no offset
# 0xffff
- offset set to -1
# 0x1
- offset set to 1
}
interface=uap0
driver=nl80211
ssid=LILY-W1
channel=6
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
hostapd /etc/hostapd.conf
-B