{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
{{ImportantMessage|text=Regarding the Molex antenna used in this AN. It is valid only for '''No EU''' countries - see [https://www.lairdconnect.com/documentation/regulatory-information-tiwi-ble link]}}
== History ==
{| class="wikitable" border="1"
!Notes
|-
|{{oldid|6665|1.0.0}}
|August 2016
|1.0.0
|1.0.0
|August 2016
|First public release
|-
|{{oldid|6756|1.2.0}}
|May 2017
|1.2.0
|Update for new XUELK release
|-
|2.0.0
|September 2017
|2.0.0
|Validated on latest XUELK release
|}
==Introduction==
[[:Category:SBC_Lynx|SBC Lynx]] can be populated with [[Wireless_Module_(DWM)|DWM WiFi/Bluetooth combo plugin]] to easily add wireless connectivity.
This application note describes how to enable these interfaces when working with [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_software_components|XUELK 1.0.0]]
[[File:SBCLynx-DWM-antenna.png|thumb|center|600px|SBC Lynx equipped with WiFi-Bluetooth combo plugin (DWM) and antenna]]
===Limitations===
DWM wireless module shares some signals with mezzanine board connector J53. Thus, when DWM module is used, the following signals must be left floating:
==Usage==
Software delivered along with Starting from version [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_software_components|XUELK 1.0.0]], the software delivered along with [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK]] provides all the required stuff - specifically stuff—specifically device drivers and user space tools - to tools—to enable and use wireless interfaces. The following sections describe this in more detail. ===Calibration===As known, the radio chipset integrated in the plugin requires a [[Wireless_Module_(DWM)#Calibration_process|calibration file (NVS)]] to set radio parameters.
The root file system delivered along with XUELK contains a calibration file (<code>wl1271-nvs.bin</code>) that was produced under the following conditions:
*Initialization data: The following file was used "''WLAN INI: ETSI all certified antennas''", provided by LS Research. For more details please refer to [https://www.lairdconnect.com/documentation/wlan-ini-etsi-all-certified-antennas this page].
{{ImportantMessage|text=For [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_software_components|XUELK releases]] 1.1.3 and older, please replace the calibration file in the target's root file system (<code>/lib/firmware/ti-connectivity/wl1271-nvs.bin</code>) with this one:
The following example shows a throughput performance test, carried out with the well-known [https://iperf.fr/ <code>iperf</code> tool]:
<pre>
</pre>
===Bluetooth=== It is possible to attach the physical device to [http://www.bluez.org/ BlueZ stack] and start using it via HCI tools: <pre>root@sbc-lynx:~# hciattach -t 60 /dev/ttymxc1 texas 115200Found a Texas Instruments' chip!Firmware file : /lib/firmware/ti-connectivity/TIInit_7.6.15.btsLoaded BTS script version 1texas: changing baud rate to 3000000, flow control to 1Device setup completeroot@sbc-lynx:~# hciconfig hci0 uproot@sbc-lynx:~# hcitool scanScanning ... 00:02:72:C6:40:16 virt</pre> {{ImportantMessage|text=For XUELK 1.1.3 and below, to enable Bluetoothinterface, <code>gpio135</code> must be set to 1 first <pre>root@sbc-lynx:~# echo 135 > /sys/class/gpio/exportroot@sbc-lynx:~# echo out > /sys/class/gpio/gpio135/directionroot@sbc-lynx:~# echo 1 > /sys/class/gpio/gpio135/value</pre> }} ====Performance tests====The following examples show two throughput performance tests, run at L2CAP layer. The connection has been established with a PC equipped with Bluetooth USB dongle Asus BT400. In the first test data originates at the SBC Lynx and is sent to the host PC that is configured as follows:<pre>[ 4012.910755] Bluetooth: RFCOMM TTY layer initialized[ 4012.910760] Bluetooth: RFCOMM socket layer initialized[ 4012.910765] Bluetooth: RFCOMM ver 1.11devel@devel-VirtualBox:~$ sudo modprobe -v btusbdevel@devel-VirtualBox:~$ sudo suroot@devel-VirtualBox:/home/devel# echo "0b05 17cb" >> /sys/bus/usb/drivers/btusb/new_idroot@devel-VirtualBox:/home/devel# hciconfighci0: Type: BR/EDR Bus: USB BD Address: 00:02:72:C6:40:16 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING PSCAN RX bytes:1194 acl:0 sco:0 events:69 errors:0 TX bytes:1556 acl:0 sco:0 commands:69 errors:0 root@devel-VirtualBox:/home/devel# hciconfig hci0 uproot@devel-VirtualBox:/home/devel# hciconfig hci0 name virtroot@devel-VirtualBox:/home/devel# hciconfig hci0 class 0x6e0100root@devel-VirtualBox:/home/devel# hcitool devDevices: hci0 00:02:72:C6:40:16root@devel-VirtualBox:/home/devel# hciconfig hci0 piscanroot@devel-VirtualBox:/home/devel# l2test -r -b 10000 -O 10000 -I 10000l2test[1795]: Waiting for connection on psm 4113 ...</pre>Configuration of SBC Lynx: