Difference between revisions of "Wireless Module (DWM)"

From DAVE Developer's Wiki
Jump to: navigation, search
(References)
(How to enable WiFi support)
(57 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{InfoBoxTop}}
 
{{InfoBoxTop}}
 
{{Applies To DWM}}
 
{{Applies To DWM}}
{{AppliesToSBCLynx}}
+
{{InfoBoxBottom}}
{{AppliesToAddOnSBCLynx}}
+
 
{{AppliesToSBCD}}
+
==Introduction==
{{AppliesToSBCX}}
+
 
{{Applies To ADD-ON-SBC-AXEL}}
+
Wireless Module (DWM) is one of DAVE's Add-On Modules. These devices are conceived and designed to be easily included in embedded system, in order to ease the use from the system integrator's standpoint, in terms of hardware issues and software compatibility. These characteristics make them suitable for use in combination with a wide range of host devices, from low-cost microcontrollers to high-end embedded processors.
{{Applies To ADD-ON-SBC-DIVA}}
 
  
{{InfoBoxBottom}}
+
[[File:Dwm_02.png|300px|frameless|border]]
  
 +
DWM belongs to the Connectivity Modules subfamily and provides support for WiFi (802.11 b/g/n) and Bluetooth (2.1 + EDR) throgh, respectively, a SDIO interface and a UART interface.
  
 
==Specification==
 
==Specification==
  
The module is built around an LS Research TiWi-BLE Integrated Transceiver Modules for WLAN 802.11 b/g/n and Bluetooth. The module implements the necessary PHY/MAC layers to support WLAN applications in conjunction with a host processor over a SDIO interface. The module also provides a Bluetooth platform through the HCI transport layer. Both WLAN and Bluetooth share the same antenna port.
+
The module is built around a LS Research TiWi-R2 Integrated Transceiver Modules for WLAN 802.11 b/g/n and Bluetooth. The module realizes the necessary PHY/MAC layers to support WLAN applications in conjunction with a host processor over a SDIO interface. The module also provides a Bluetooth platform through the HCI transport layer. Both WLAN and Bluetooth share the same antenna port.
  
 
=== Features ===
 
=== Features ===
  
* Based on Texas Instruments WL1271L Transceiver
+
* Based on Texas Instruments WL1271 Transceiver
 
* IEEE 802.11 b,g,n,d,e,i, compliant
 
* IEEE 802.11 b,g,n,d,e,i, compliant
 
* Bluetooth 2.1+EDR, Power Class 1.5
 
* Bluetooth 2.1+EDR, Power Class 1.5
* Full support for BT4.0 BLE and ANT
 
 
* Reduced footprint: 25 mm x 38 mm  
 
* Reduced footprint: 25 mm x 38 mm  
 
* Low height profile
 
* Low height profile
Line 29: Line 28:
 
=== Interface timings ===
 
=== Interface timings ===
  
Please refer to the [http://www.lsr.com/downloads/products/330-0087.pdf TiWi-BLE Datasheet] for SDIO [WiFi] and UART [Bluetooth] interface timings.
+
Please refer to the [http://www.lsr.com/downloads/products/330-0045.pdf TiWi-R2 Datasheet] for SDIO [WiFi] and UART [Bluetooth] interface timings.
 +
 
 +
===Power consumption===
 +
 
 +
===Reset===
 +
 
  
 
==Pinout and detailed pin functions==
 
==Pinout and detailed pin functions==
Line 46: Line 50:
  
 
{| class="wikitable" | {{table}}
 
{| class="wikitable" | {{table}}
| style="background:#f0f0f0;" align="center" |'''Pin number'''
+
| align="center" style="background:#f0f0f0;"|'''Pin number'''
| style="background:#f0f0f0;" align="center" |'''Name'''
+
| align="center" style="background:#f0f0f0;"|'''Name'''
| style="background:#f0f0f0;" align="center" |'''Type'''
+
| align="center" style="background:#f0f0f0;"|'''Type'''
| style="background:#f0f0f0;" align="center" |'''Description'''
+
| align="center" style="background:#f0f0f0;"|'''Description'''
| style="background:#f0f0f0;" align="center" |'''Voltage'''
+
| align="center" style="background:#f0f0f0;"|'''Voltage'''
| style="background:#f0f0f0;" align="center" |'''Note'''
+
| align="center" style="background:#f0f0f0;"|'''Note'''
 
|-
 
|-
 
| 1||BT_EN||Input||Bluetooth Enable||3.3V||
 
| 1||BT_EN||Input||Bluetooth Enable||3.3V||
Line 57: Line 61:
 
| 2||WIFI_EN||Input||WLAN Enable||3.3V||
 
| 2||WIFI_EN||Input||WLAN Enable||3.3V||
 
|-
 
|-
| 3||BT_CTS||Input||Bluetooth HCI UART CTS||3.3V||
+
| 3||UART2_RTSn||Output||Bluetooth HCI UART RTS||3.3V||
 
|-
 
|-
 
| 4||WIFI_IRQ||Output||WLAN Interrupt Request||3.3V||
 
| 4||WIFI_IRQ||Output||WLAN Interrupt Request||3.3V||
 
|-
 
|-
| 5||BT_RX||Input||Bluetooth HCI UART RX||3.3V||
+
| 5||UART2_TXD||Input/Output||Bluetooth HCI UART TX||3.3V||
 
|-
 
|-
| 6||BT_F2||Input||Bluetooth Wakeup ||3.3V|| Please leave unconnected if not used
+
| 6||BT_F2||Output||Bluetooth Wakeup / DC2DC Mode||3.3V||
 
|-
 
|-
| 7||BT_RTS||Output||Bluetooth HCI UART RTS||3.3V||
+
| 7||UART2_CTSn||Input||Bluetooth HCI UART CTS||3.3V||
 
|-
 
|-
| 8||WIFI_CLK_REQ(A)||Output||HOST_WakeUp||3.3V|| Please leave unconnected if not used
+
| 8||WIFI_CLK_REQ(A)||Output||HOST_WakeUp||3.3V||
 
|-
 
|-
| 9||BT_TX||Output||Bluetooth HCI UART TX||3.3V||
+
| 9||UART2_RXD||Input||Bluetooth HCI UART RX||3.3V||
 
|-
 
|-
 
| 10||NC||||Reserved for future use||-||Please leave unconnected.
 
| 10||NC||||Reserved for future use||-||Please leave unconnected.
Line 115: Line 119:
 
|  
 
|  
 
|}
 
|}
 
==== Connector part number  ====
 
 
* on module: Molex 501920-3001
 
* on Carrier board: for example Molex 52991-0308 (dependon on stand-off chosen)
 
  
 
==Antenna connector==
 
==Antenna connector==
Line 129: Line 128:
  
 
==Integration guide==
 
==Integration guide==
This section provides useful information and resources that let the system designer integrate the DWM module in the application very quickly.
+
This section provides useful information and resources that allow the system designer to integrate DWM module in his/her application very quickly.
 
 
=== Typical scenario===
 
  
The following picture shows the conceptual block diagram of the application where the host is an Embedded PC.
+
=== Typical scenarios===
  
 +
The following pictures shows conceptual block diagram of application where the role of the host is played by an Embedded PC.
 
[[File:Dwm-epc-scenario.png|thumb|center|400px|Typical scenario]]
 
[[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===
 
===Mechanical information===
Line 148: Line 141:
 
[[File:Dwm-layout-top.png|thumbnail|center|300px|DWM dimensions]]
 
[[File:Dwm-layout-top.png|thumbnail|center|300px|DWM dimensions]]
  
* DXF: https://www.dave.eu/system/files/area-riservata/dwm.dxf_.zip
+
* DXF: http://www.dave.eu/download/restricted/add-on-modules/dwm/CS061412.dxf
  
 
===Layout===
 
===Layout===
Line 158: Line 151:
 
[[File:Dwm_04.png|thumbnail|center|200px|DWM Bottom View]]
 
[[File:Dwm_04.png|thumbnail|center|200px|DWM Bottom View]]
  
The component view (top and bottom) is available as PDF file:
+
The component view (top and bottom) is avalable as PDF file:
  
* PDF: https://www.dave.eu/system/files/area-riservata/CS061412B_all_view.pdf
+
* PDF: http://www.dave.eu/download/restricted/add-on-modules/dwm/CS061412_component_view.pdf
  
 
===3D===
 
===3D===
 +
* IDF (3D): http://www.dave.eu/download/restricted/add-on-modules/dwm/CS061412-3D.zip
 +
 +
===Qualification tests===
 +
 +
==How to enable WiFi support==
 +
 +
=== Kernel setup ===
 +
 +
Edit kernel configuration adding support for MMC and WL1271 chipset
 +
 +
=== Make Wireless Tools ===
 +
 +
[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html Wifi Tools]
 +
 +
[http://www.omappedia.com/wiki/Mac80211_based_open_source_architecture FW DWL]
 +
 +
To build Wireless tools you need to modify the Makefile in order to cross-compile and install the tools:
 +
 +
Make:
 +
* Check that the root file system path is correct
 +
* Check the env CROSS_COMPILE and PATH variables
 +
* make all
 +
* sudo make install
 +
 +
== Module Firmware ==
 +
 +
Download the firmware binaries and copy them into <RFS>/lib/firmware:
 +
 +
* wl1271-fw.bin
 +
* wl1271-nvs.bin
 +
 +
 +
== User Space ==
 +
 +
===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>
  
* IDF (3D): https://www.dave.eu/system/files/area-riservata/dwm-3D.zip
+
Set the wlan0 MAC address:
===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].
 
  
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:
+
<pre>
*the antenna - a list of [https://www.lairdconnect.com/wireless-modules/wifi-modules-bluetooth/tiwi-ble#certified-antennas certified antennas] and cables can be found in the TiWi Module device datasheet. Use of these antennas does not require additional FCC/IC/ETSI certifications.
+
ifconfig wlan0 hw ether xx:yy:zz:kk:ww:jj
*the firmware version downloaded to the chip: please refer to the proper firmware available on your Linux distribution for matching the kernel driver and run properly the calibration process
+
</pre>
*the initialization data, typically stored in an INI file: please refer to the [https://www.lairdconnect.com/wireless-modules/wifi-modules-bluetooth/tiwi-ble#documentation Laird Connectivity TiWi documentation] for checking the proper INI file configuration
 
*the Calibrator source code [https://github.com/TI-OpenLink/ti-utils/tree/ol_R5.SP8.01 here]
 
More information about kernel driver and calibration on the [https://www.lairdconnect.com/forum/tiwi-ble/online-documentation/support-and-tools Laird Support and Tools] web page.
 
  
==== MAC address ====
+
You can create a simple script: '''setwmac''' to set the MAC address:
The MAC address is set at calibration time for WLAN. To use the built in MAC address for WLAN be sure to pass a MAC address of <code>00:00:00:00:00:00</code> as a parameter to the auto-calibrate function. To set a custom MAC address for WLAN just pass the desired value into the auto-calibrate function.
 
  
==== NVS ready-to-use calibration files ====
+
Use:
The following links refer to specific use cases, where the resulting NVS file is provided along with DAVE Embedded Systems products integrating DWM module.
+
<pre>
*[[XUELK-AN-001:_Using_WiFi-Bluetooth_combo_plugin_with_SBC_Lynx|SBC Lynx (XUELK)]]
+
setwmac 00:01:02:03:04:05
*[[XUELK-AN-002:_Running_Debian_distribution#Bluetooth_and_WiFi|SBC Lynx (Debian)]]
+
</pre>
The <code>nvs.bin</code> file has been created using the certified antenna [http://www.molex.com/molex/products/datasheet.jsp?part=active/0479500011_ANTENNAS.xml Molex 47950-0011]
 
  
Please refer to the below Laird Connectivity TiWi-BLE documentation for more information.
+
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>
  
== References ==
+
==How to enable Bluetooth support==
* [https://www.lairdconnect.com/wireless-modules/wifi-modules-bluetooth/tiwi-ble#documentation Laird Connectivity TiWi-BLE documentation]
 
* [https://www.lairdconnect.com/documentation/tiwi-ble-datasheet TiWi-BLE datasheet]
 
* [https://www.lairdconnect.com/documentation/tiwi-antenna-design-guide Antenna Design Guide]
 
* [https://www.lairdconnect.com/documentation/tiwi-emc-compliance-guide EMC Compliance Guide]
 
* [https://www.lairdconnect.com/documentation/wlan-ini-etsi-all-certified-antennas WLAN INI all certified antennas]
 
* [http://linuxwireless.sipsolutions.net/en/users/Drivers/wl12xx/ WL127x Linux Calibrator]
 
Since January 15, 2021, TI's processors wiki site has been shut down. The following original documentation is available only as cached pages.
 
* [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]
 

Revision as of 15:21, 5 November 2012

Info Box
Dwm 01.png Applies to DWM

Introduction[edit | edit source]

Wireless Module (DWM) is one of DAVE's Add-On Modules. These devices are conceived and designed to be easily included in embedded system, in order to ease the use from the system integrator's standpoint, in terms of hardware issues and software compatibility. These characteristics make them suitable for use in combination with a wide range of host devices, from low-cost microcontrollers to high-end embedded processors.

Dwm 02.png

DWM belongs to the Connectivity Modules subfamily and provides support for WiFi (802.11 b/g/n) and Bluetooth (2.1 + EDR) throgh, respectively, a SDIO interface and a UART interface.

Specification[edit | edit source]

The module is built around a LS Research TiWi-R2 Integrated Transceiver Modules for WLAN 802.11 b/g/n and Bluetooth. The module realizes the necessary PHY/MAC layers to support WLAN applications in conjunction with a host processor over a SDIO interface. The module also provides a Bluetooth platform through the HCI transport layer. Both WLAN and Bluetooth share the same antenna port.

Features[edit | edit source]

  • Based on Texas Instruments WL1271 Transceiver
  • IEEE 802.11 b,g,n,d,e,i, compliant
  • Bluetooth 2.1+EDR, Power Class 1.5
  • Reduced footprint: 25 mm x 38 mm
  • Low height profile
  • U.FL connector for external antenna
  • Integrated band-pass filter
  • Industrial operating temperature range: -40 / +85 °C

Interface timings[edit | edit source]

Please refer to the TiWi-R2 Datasheet for SDIO [WiFi] and UART [Bluetooth] interface timings.

Power consumption[edit | edit source]

Reset[edit | edit source]

Pinout and detailed pin functions[edit | edit source]

DWM can be connected to the host board through the J1 connector.

Pinout reference[edit | edit source]

The following picture shows the reference pins of the J1 connector (placed on the bottom side of the DWM module):

Dwm 05.png

J1 connector pinout table[edit | edit source]

The following table reports the connector pinout:

Pin number Name Type Description Voltage Note
1 BT_EN Input Bluetooth Enable 3.3V
2 WIFI_EN Input WLAN Enable 3.3V
3 UART2_RTSn Output Bluetooth HCI UART RTS 3.3V
4 WIFI_IRQ Output WLAN Interrupt Request 3.3V
5 UART2_TXD Input/Output Bluetooth HCI UART TX 3.3V
6 BT_F2 Output Bluetooth Wakeup / DC2DC Mode 3.3V
7 UART2_CTSn Input Bluetooth HCI UART CTS 3.3V
8 WIFI_CLK_REQ(A) Output HOST_WakeUp 3.3V
9 UART2_RXD Input Bluetooth HCI UART RX 3.3V
10 NC Reserved for future use - Please leave unconnected.
11 DGND Ground -
12 NC Reserved for future use - Please leave unconnected.
13 DAT3 Input/Output SDIO Data Bit 3 3.3V
14 NC Reserved for future use - Please leave unconnected.
15 DAT2 Input/Output SDIO Data Bit 2 3.3V
16 NC Reserved for future use - Please leave unconnected.
17 DAT1 Input/Output SDIO Data Bit 1 3.3V
18 NC Reserved for future use - Please leave unconnected.
19 DAT0 Input/Output SDIO Data Bit 0 3.3V
20 NC Reserved for future use - Please leave unconnected.
21 DGND Ground -
22 DGND Ground -
23 SDO_CMD Input/Output SDIO Command Line 3.3V
24 SDO_CLK Input SDIO Clock 3.3V
25 DGND Ground -
26 DGND Ground -
27 3.3V Power Input +3.3V Input Voltage 3.3V
28 3.3V Power Input +3.3V Input Voltage 3.3V
29 5V Power Input +5V Input Voltage 5V
30 5V Power Input +5V Input Voltage 5V

Antenna connector[edit | edit source]

The following picture shows the position of the WiFi/Bluetooth antenna connector:


Dwm 06.png

Integration guide[edit | edit source]

This section provides useful information and resources that allow the system designer to integrate DWM module in his/her application very quickly.

Typical scenarios[edit | edit source]

The following pictures shows conceptual block diagram of application where the role of the host is played by an Embedded PC.

Typical scenario

Mechanical information[edit | edit source]

The following image shows the module dimensions:

DWM dimensions

Layout[edit | edit source]

The following images show the module layout:

DWM Top View
DWM Bottom View

The component view (top and bottom) is avalable as PDF file:

3D[edit | edit source]

Qualification tests[edit | edit source]

How to enable WiFi support[edit | edit source]

Kernel setup[edit | edit source]

Edit kernel configuration adding support for MMC and WL1271 chipset

Make Wireless Tools[edit | edit source]

Wifi Tools

FW DWL

To build Wireless tools you need to modify the Makefile in order to cross-compile and install the tools:

Make:

  • Check that the root file system path is correct
  • Check the env CROSS_COMPILE and PATH variables
  • make all
  • sudo make install

Module Firmware[edit | edit source]

Download the firmware binaries and copy them into <RFS>/lib/firmware:

  • wl1271-fw.bin
  • wl1271-nvs.bin


User Space[edit | edit source]

Boot[edit | edit source]

[...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

Dev Check[edit | edit source]

Check module loading and device creation:

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)

Set the wlan0 MAC address:

ifconfig wlan0 hw ether xx:yy:zz:kk:ww:jj

You can create a simple script: setwmac to set the MAC address:

Use:

setwmac 00:01:02:03:04:05

Example:

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!

How to enable Bluetooth support[edit | edit source]