Changes

Jump to: navigation, search

Wireless Module (DWM)

10,849 bytes removed, 12:39, 17 October 2018
no edit summary
{{Applies To DWM}}
{{AppliesToSBCLynx}}
{{AppliesToAddOnSBCLynx}}
{{AppliesToSBCD}}
{{AppliesToSBCX}}
{{Applies To ADD-ON-SBC-AXEL}}
{{Applies To ADD-ON-SBC-DIVA}}
 
{{InfoBoxBottom}}
Please refer to the [http://www.lsr.com/downloads/products/330-0087.pdf TiWi-BLE Datasheet] for SDIO [WiFi] and UART [Bluetooth] interface timings.
 
===Power consumption===
 
===Reset===
==Pinout and detailed pin functions==
|
|}
 
==== Connector part number ====
 
* on module: Molex 501920-3001
* on Carrier board: for example Molex 52991-0308 (dependon on stand-off chosen)
==Antenna connector==
This section provides useful information and resources that let the system designer integrate the DWM module in the application very quickly.
=== Typical scenariosscenario===
The following picture shows the conceptual block diagram of the application where the host is an Embedded PC.
[[File:Dwm-epc-scenario.png|thumb|center|400px|Typical scenario]]
 
====Electrical guidelines====
*Keep SDIO lines as short as possible.
*5V and 3.3V rails can power up in any order
*Keep WIFI_EN asserted during power-up sequence
===Mechanical information===
[[File:Dwm-layout-top.png|thumbnail|center|300px|DWM dimensions]]
* DXF: httphttps://www.dave.eu/system/files/area-riservata/dwm.dxf_.zip
===Layout===
[[File:Dwm_04.png|thumbnail|center|200px|DWM Bottom View]]
The component view (top and bottom) is avalable available as PDF file:
* PDF: httphttps://www.dave.eu/system/files/area-riservata/CS061412B_all_view.pdf
===3D===
* IDF (3D): httphttps://www.dave.eu/system/files/area-riservata/dwm-3D.zip===Calibration process===The radio interface of the DWM module is configured by several parameters. These parameters are set through a calibration process, that is described in detail [http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Calibration_Process here].
===Qualification tests===The calibration process—that produces an NVS file—is not trivial. Apart from the chip itself (Texas Instruments WL1271L in this case), it depends on:*the antenna*the firmware version downloaded to the chip*the initialization data, typically stored in an INI file.
==How The following links refer to enable WiFi support on embedded linux platforms==specific use cases, where the resulting NVS file is provided along with DAVE Embedded Systems products integrating DWM module.*[[XUELK-AN-001:_Using_WiFi-Bluetooth_combo_plugin_with_SBC_Lynx|SBC Lynx (XUELK)]]=== References ===*[[XUELK-AN-002:_Running_Debian_distribution#Bluetooth_and_WiFi|SBC Lynx (Debian)]]
== References ==
* [http://processors.wiki.ti.com/index.php/WL127x WL127x Main page]
* [http://processors.wiki.ti.com/index.php/WL127x_WLAN_API_Information WL127x WLAN API]
* [http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Calibration_Proccess Calibration Process]
* [http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html Wifi Tools]
* [http://www.omappedia.com/wiki/Mac80211_based_open_source_architecture Info on mac80211 based WLAN driver]
* [http://www.lsr.com/products-wiki?topic=TiWi-BLE+Downloads TiWi-BLE Downloads]
* [http://www.lsr.com/downloads/products/330-0078.pdf INI Guide]
* [http://www.lsr.com/downloads/products/330-0053.pdf EMC Guide]
* [http://wireless.kernel.org/en/users/Drivers/wl12xx/calibrator Linux Calibrator]
 
=== Kernel setup ===
 
Edit kernel configuration adding support for MMC and WL1271L chipset. If needed, please '''apply the patches''' to enable support for DWM on the platform in use.
 
=== Make Wireless Tools ===
 
If the Wirleless Tools package is not included into your root file system, you need to build this component. Modification of the Makefile is required in order to cross-compile and install the tools:
 
* Check that the root file system path is correct
* Check the env CROSS_COMPILE and PATH variables
* make all
* sudo make install
 
Please note that this tools are included in some Linux Embedded distributions, so you could use the package manager to install them. See for example the [[Running Ubuntu Core]] page to learn how to run an Ubuntu-based root file system, so you can easily add the required tools using the '''apt''' package manager.
 
=== Module Firmware ===
 
Download the firmware binaries and copy them into <RFS>/lib/firmware:
 
* wl1271-fw.bin
 
=== Calibration ===
 
Calibration is a process of determining radio parameters specific for the chip on the specific design. Calibration is a mandatory one-time procedure, performed once after the board assembly and before any WLAN operation.
 
==== Prerequisites ====
 
* wifi kernel driver
* wifi device firmware
* wifi tools available into the root file system
* Linux kernel build with '''CONFIG_NL80211_TESTMODE=y''' option and WL12xx build as a module
* INI file downloaded from LSR website: [http://www.lsr.com/products-wiki?topic=TiWi-BLE+Downloads] (930-0056 - ETSI All certified antennas)
* The NVS file (wl127x-nvs.bin) must not be included into the root file system
 
N.B: When compiling the calibrator tool for an Ubuntu Core root file system (Ubuntu 12.04 LTS ARM HF), the following packages are required:
* libnl-3-dev
* libnl-gen1-3-dev
 
If the libnl-3 headers are not included into /usr/include/libnl-3, it is possible to download and uncompress the following deb file:
* http://ports.ubuntu.com/ubuntu-ports/ precise/main libnl-3-dev armhf 3.2.3-2ubuntu2 [37.0 kB]
 
==== How to do the calibration ====
For detailed information, please refer to the [http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Calibration_Proccess#Calibration_Getting_Started Calibration Getting Started Guide].
 
For the calibration commands, please refer to the following shell session:
 
<pre>
root@X-Poles:~/ti-utils# rm /lib/firmware/ti-connectivity/wl127x-nvs.bin
root@X-Poles:~/ti-utils# rmmod wl12xx_sdio.ko
root@X-Poles:~/ti-utils# ./calibrator plt autocalibrate wlan0 /lib/modules/$(uname -r)/kernel/drivers/net/wireless/wl12xx/wl12xx_sdio.ko
hw/ini_files/127x/TQS_S_2.6.ini /lib/firmware/ti-connectivity/wl127x-nvs.bin 00:00:00:00:00:00
 
[ 2106.815826] wl12xx: loaded
[ 2106.831756] wl12xx: power up
[ 2107.337219] wl12xx: firmware booted in PLT mode (PLT 6.3.5.0.98)
Using nvs version 2.1
Calibrate /lib/firmware/ti-connectivity/wl127x-nvs.bin
Writing calibration data to /lib/firmware/ti-connectivity/wl127x-nvs.bin
Writing mac address 00:00:00:00:00:00 to file /lib/firmware/ti-connectivity/wl127x-nvs.bin
[ 2107.438598] wl12xx: power down
Calibration done. FEM1 has 1 bands. AutoFEM is off. Resulting nvs is /lib/firmware/ti-connectivity/wl127x-nvs.bin
</pre>
 
=== User space basics ===
 
====Boot====
<pre>
[...cut...]
[ 0.980000] cfg80211: Calling CRDA to update world regulatory domain
[...cut...]
[ 12.950000] lib80211: common routines for IEEE802.11 drivers
[ 12.960000] lib80211_crypt: registered algorithm 'NULL'
[...cut...]
[ 13.190000] mmc1: card claims to support voltages below the defined range. These will be ignored.
[ 13.210000] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[ 13.220000] mmc1: new SDIO card at address 0001
[ 13.220000] PM: Adding info for mmc:mmc1:0001
[ 13.230000] PM: Adding info for sdio:mmc1:0001:1
[ 13.370000] PM: Adding info for sdio:mmc1:0001:2
[ 13.380000] PM: Adding info for platform:wl1271
[ 13.380000] PM: Adding info for No Bus:phy0
[ 13.390000] PM: Adding info for No Bus:wlan0
[ 13.390000] wl1271: loaded
[ 13.390000] wl1271: initialized
</pre>
 
====Dev Check====
 
Check module loading and device creation:
 
<pre>
ifconfig -a
[...cut...]
 
wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
</pre>
 
Set the wlan0 MAC address:
 
<pre>
ifconfig wlan0 hw ether xx:yy:zz:kk:ww:jj
</pre>
 
You can create a simple script: '''setwmac''' to set the MAC address:
 
Use:
<pre>
setwmac 00:01:02:03:04:05
</pre>
 
Example:
<pre>
root@dm814x-evm:~# setwmac 00:50:C2:B9:CF:87
Disable Wlan0...
Set Wlan MAC: 00:50:C2:B9:CF:87
Enable Wlan0...
[ 36.960000] PM: Adding info for No Bus:mmc1:0001:2
[ 37.020000] PM: Removing info for No Bus:mmc1:0001:2
[ 37.020000] PM: Adding info for No Bus:mmc1:0001:2
[ 37.060000] PM: Removing info for No Bus:mmc1:0001:2
[ 37.220000] wl1271: firmware booted (Rev 6.1.0.50.350)
Done!
</pre>
 
==== Scan to find wireless network ====
<pre>
iwlist wlan0 scan
</pre>
 
Output example:
<pre>
root@dm814x-evm:~# iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 - Address: 00:1F:1F:BD:24:30
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=54/70 Signal level=-56 dBm
Encryption key:on
ESSID:"INTELLINET_AP"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
18 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000000041e910e9
Extra: Last beacon: 10ms ago
IE: Unknown: 000D494E54454C4C494E45545F4150
IE: Unknown: 010882848B961224486C
IE: Unknown: 03010B
IE: Unknown: 2A0104
IE: Unknown: 32040C183060
IE: Unknown: 2D1AEE1117FF000000010000000000000000000000000C0000000000
IE: Unknown: 3D160B070700000000000000000000000000000000000000
IE: Unknown: 3E0100
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Preauthentication Supported
IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
IE: Unknown: 0B05010007127A
IE: Unknown: 7F0101
IE: Unknown: DD07000C4304000000
IE: Unknown: DD1E00904C33EE1117FF000000010000000000000000000000000C0000000000
IE: Unknown: DD1A00904C340B070700000000000000000000000000000000000000
</pre>
 
=== Example: connecting to an encrypted wireless network ===
 
To connect to a secured AP use wpa_supplicant
 
[http://hostap.epitest.fi/wpa_supplicant/ wpa_supplicant]
 
Configure wireless security editing /etc/wpa_supplicant.conf
 
Example:
<pre>
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=0
fast_reauth=1
# Only WPA-PSK is used. Any valid cipher combination is accepted.
network={
ssid="INTELLINET_AP"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="davedavedave"
priority=2
}
</pre>
 
Start with the following options:
<pre>
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf -d -P/var/run/wpa_supplicant -B
</pre>
 
Associate to AP
<pre>
iwconfig wlan0 essid INTELLINET_AP
</pre>
 
Log
<pre>
[ 5102.560000] wlan0: authenticate with 00:1f:1f:bd:24:30 (try 1)
[ 5102.560000] wlan0: authenticated
[ 5102.610000] wlan0: associate with 00:1f:1f:bd:24:30 (try 1)
[ 5102.610000] wlan0: RX AssocResp from 00:1f:1f:bd:24:30 (capab=0x411 status=0 aid=1)
[ 5102.620000] wlan0: associated
[ 5103.300000] wl1271: Association completed.
</pre>
 
==How to enable Bluetooth support on embedded linux platforms==
 
===Kernel Config===
 
Edit kernel configuration adding support for Bluetooth and HCI protocol:
 
<pre>
Networking Support
 
--- Bluetooth subsystem support
<*> L2CAP protocol support
<*> SCO links support
<*> RFCOMM protocol support
[*] RFCOMM TTY support
<*> BNEP protocol support
[*] Multicast filter support
[*] Protocol filter support
<*> HIDP protocol support
Bluetooth device drivers --->
</pre>
<pre>
<*> HCI USB driver
< > HCI SDIO driver
<*> HCI UART driver
[*] UART (H4) protocol support
[ ] BCSP protocol support
[ ] Atheros AR300x serial support
[*] HCILL protocol support
</pre>
 
 
=== Module Firmware===
 
Download the firmware binaries and copy them into <RFS>/lib/firmware:
 
* TIInit_7.2.31.bts
 
=== User space basics===
 
====Boot====
<pre>
[ 1.000000] Bluetooth: Core ver 2.15
[ 1.010000] Bluetooth: HCI device and connection manager initialized
[ 1.020000] Bluetooth: HCI socket layer initialized
[...cut...]
[ 12.900000] Bluetooth: HCI UART driver ver 2.2
[ 12.900000] Bluetooth: HCI H4 protocol initialized
[ 12.900000] Bluetooth: HCILL protocol initialized
[ 12.910000] Bluetooth: Generic Bluetooth USB driver ver 0.6
[...cut...]
[ 13.080000] Bluetooth: L2CAP ver 2.15
[ 13.080000] Bluetooth: L2CAP socket layer initialized
[ 13.080000] Bluetooth: SCO (Voice Link) ver 0.6
[ 13.090000] Bluetooth: SCO socket layer initialized
[ 13.090000] Bluetooth: RFCOMM TTY layer initialized
[ 13.100000] Bluetooth: RFCOMM socket layer initialized
[ 13.110000] Bluetooth: RFCOMM ver 1.11
[ 13.110000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 13.110000] Bluetooth: BNEP filters: protocol multicast
[ 13.120000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
</pre>
 
==== Install Bluez & Obex tools ====
 
From target, with opkg package manager (usually on Angstrom or other OpenEmbedded derived distributions):
<pre>
opkg install bluez4
opkg install obex-data-server
opkg install obexd
opkg install obexftp
</pre>
 
=== Manual startup===
 
BT module Enable via GPIO 81
<pre>
# export GPIO=/sys/class/gpio
# echo 81 > $GPIO/export
# echo out > $GPIO/gpio81/direction
# echo 1 > $GPIO/gpio81/value
[ 58.810000] PM: Adding info for No Bus:gpio81
</pre>
 
===BT Services===
<pre>
# bluetoothd
# hciattach /dev/ttyO2 texas 3000000 flow
 
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_7.2.31.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
[ 63.120000] PM: Adding info for No Bus:hci0
Device setup complete
 
</pre>
 
===Scan devices===
 
<pre>
hcitool scan
 
Scanning ...
9C:4A:7B:F0:xx:xx device 1
00:07:AB:6F:xx:xx device 2
 
</pre>
 
===Add Services===
 
To set the BT module '''name'''
<pre>
hciconfig hci0 name <NOME>
</pre>
 
To set the '''visibile services'''
<pre>
sdptool add <SERVICE>
</pre>
 
The available services are the following:
<pre>
Services:
DID SP DUN LAN FAX OPUSH FTP PRINT HS HSAG HF HFAG SAP PBAP NAP
GN PANU HCRP HID KEYB WIIMOTE CIP CTP A2SRC A2SNK AVRCT AVRTG
UDIUE UDITE SEMCHLA SR1 SYNCML SYNCMLSERV ACTIVESYNC HOTSYNC
PALMOS NOKID PCSUITE NFTP NSYNCML NGAGE APPLE ISYNC GATT
</pre>
 
==== Example 1 : Obex FTP server====
For each visible service, the associated daemon should be launched. As an example, for the FTP service, you need to launch:
 
<pre>
obexftpd -b
</pre>
 
To send a file using FTP on Bluetooth:
 
<pre>
obexftp -b MAC-BT-DESTINO -p FILE
</pre>
 
==== Example 2 : Obex push server====
 
http://packages.debian.org/squeeze/obexpushd
8,154
edits

Navigation menu