Quickstart Guide - PEB-WLBT-05 for phyBOARD-Pollux (LAN-101e.A0)

Table of Contents

Quickstart Guide - PEB-WLBT-05 for phyBOARD-Pollux (LAN-101e.A0)
Document TitleQuickstart Guide - PEB-WLBT-05 for phyBOARD-Pollux (LAN-101e.A0)
Article NumberLAN-101e.A0
Release Date10.10.2020
Is Branch ofQuickstart Guide - PEB-WLBT-05 for phyBOARD-Pollux (LAN-101e.Ax) Head

Introduction

PHYTEC's WLAN adapter, PEB-WLBT-05, is aimed to support your processor with WiFi and Bluetooth. In this guide, we will explain how to connect and install the WLAN adapter on the phyBOARD-Pollux.

For each kit, there are  4 variants depending on the frequency of WiFi and antenna type

There are two WiFi variants:

  • IEEE 802.11 b/g/n which supports 2.4 GHz
  • IEEE 802.11 b/g/n/ac which supports 2.5 and  5Ghz

There are two antenna variants:

  • Chip antenna
  • U.FL connector instead of an antenna (enables external antenna)

The Bluetooth is delivered via a UART interface, and it requires all 4 lines of UART (CTS, RTS, TX, RX). The WiFi is delivered via SDIO Interface, and it requires (SDIO-CLK, CMD, D0, D1, D2, D3).

Specifications

The WLAN Adapter supports the phyBOARD-Pollux kit with WiFi and Bluetooth and has the following variants depending on the frequency and antenna configuration:

  • PEB-WLBT-05-22C
    • IEEE 802.11 b/g/n which supports 2.4 GHz, via Sterling-LWB chip
    • Mounted Chip Antenna
    • Bluetooth v4.2 BR /DR/LE
  • PEB-WLBT-05-22E
    • IEEE 802.11 b/g/n which supports 2.4 GHz, via Sterling-LWB chip
    • Mounted U.FL connector instead of Antenna
    • Bluetooth v4.2 BR /DR/LE
  • PEB-WLBT-05-25C
    • IEEE 802.11 b/g/n/ac which supports 2.5GHz and 5 GHz, via Sterling-LWB5 chip
    • Mounted Chip Antenna
    • Bluetooth 2.1+EDR, Bluetooth 3.0, Bluetooth 4.2 (Bluetooth Low Energy)
  • PEB-WLBT-05-25E
    • IEEE 802.11 b/g/n/ac which supports 2.5GHz and 5 GHz, via Sterling-LWB5 chip
    • Mounted U.FL connector instead of Antenna
    • Bluetooth 2.1+EDR, Bluetooth 3.0, Bluetooth 4.2 (Bluetooth Low Energy)

WiFi: The WiFi is conveyed by the SD1 interface of the i.MX 8M Plus processor which is held internally from X6.

Bluetooth: The Bluetooth signal is conveyed to the processor using UART3 ( CTS, RTS, TX, RX) via X6 internally.

Hardware Installation

Step 1:  Attach the PEB-WLBT-05 to the phyBOARD-Pollux at the Expansion Connector (X6). Note the position of Pin 1 on both the PEB-WLBT-05 and phyBOARD-Pollux:

Connecting PEB-WLBT-05 to phyBOARD-Pollux

phyBOARD-Pollux with PEB-WLBT-05 (Outlined) (Top view)

phyBOARD-Pollux with PEB-WLBT-05 (connection outlined) (Side view)


Warning

Due to the size of the PEB-WLBT-05, not all of the Extension connector will be used. DO NOT attach any other devices or modules to the Extension Connector!

Warning

Make sure that the mounting holes of the PEB-WLBT-05 and the phyBOARD-Pollux are aligned with each other to avoid damage to the hardware!

Software Installation

Tip

In case of software failure, check the jumper setting.

Warning

With the BSP Version PD22.1 and newer, the PEB-WLBT-05 overlay needs to be activated first, otherwise, the PEB-WLBT-05 won't be recognized.
To activate the overlay, you need to edit the file "/boot/bootenv.txt" and append "imx8mp-phyboard-pollux-peb-wlbt-05.dtbo" to the "overlays=" variable:

target$ vi /boot/bootenv.txt

Afterward, the bootenv.txt file should look like this (it can also contain other devicetree overlays!):

overlays=imx8mp-phyboard-pollux-peb-av-010.dtbo imx8mp-phyboard-pollux-peb-wlbt-05.dtbo

The changes will be applied after a reboot:

target$ reboot

For further information about devicetree overlays, read the Device Tree Overlay in the i.MX8M Plus BSP Manual.

WLAN

Changing the Wireless Network Configuration

Connecting to a WLAN Network

  • First set the correct regulatory domain for your country:
target$ iw reg set DE
target$ iw reg get

You will see:

country DE: DFS-ETSI
   (2400 - 2483 @ 40), (N/A, 20), (N/A)
   (5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR
   (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS
   (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
   (57000 - 66000 @ 2160), (N/A, 40), (N/A)
  • Set up the wireless interface:
target$ ip link    # list all interfaces. Search for wlan*
target$ ip link set up dev wlan0
  • Now you can scan for available networks:
target$ iw wlan0 scan | grep SSID

You can use a cross-platform supplicant with support for WEP, WPA, and WPA2 called wpa_supplicant for an encrypted connection.

  • To do so, add the network-credentials to the file /etc/wpa_supplicant.conf:
country=DE
network={
    ssid="<SSID>"
    proto=WPA2
    psk="<KEY>"
}
  • Now a connection can be established:
target$ wpa_supplicant -Dnl80211 -c/etc/wpa_supplicant.conf -iwlan0 -B

This should result in the following output:

...
ENT-CONNECTED - Connection to 88:33:14:5d:db:b1 completed [id=0 id_str=]

To finish the configuration you can configure DHCP to receive an IP address (supported by most WLAN access points). For other possible IP configurations, see section Changing the Network Configuration.

  • First, create the directory:
target$ mkdir -p /etc/systemd/network/
  • Then add the following configuration snippet in /etc/systemd/network/10-wlan0.network:
# file /etc/systemd/network/10-wlan0.network
[Match]
Name=wlan0

[Network]
DHCP=yes
  • Now, restart the network daemon so that the configuration takes effect:
target$ systemctl restart systemd-networkd

Bluetooth

Bluetooth is connected with UART2 interface. More information about the module can be found at https://connectivity-staging.s3.us-east-2.amazonaws.com/2019-09/CS-DS-SterlingLWB%20v7_2.pdf. The Bluetooth device needs to be set up manually:

target$ hciconfig hci0 up
 
target$ hciconfig 
hci0:   Type: Primary  Bus: UART
        BD Address: AA:AA:AA:AA:AA:AA  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING 
        RX bytes:1051 acl:0 sco:0 events:50 errors:0
        TX bytes:1291 acl:0 sco:0 commands:50 errors:0   

target$ hciconfig -a
hci0:   Type: Primary  Bus: UART
        BD Address: AA:AA:AA:AA:AA:AA  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING 
        RX bytes:1051 acl:0 sco:0 events:50 errors:0
        TX bytes:1291 acl:0 sco:0 commands:50 errors:0
        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'BlueZ 5.50'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous, 
        HCI Version: 4.1 (0x7)  Revision: 0x0
        LMP Version: 4.1 (0x7)  Subversion: 0x2209
        Manufacturer: Broadcom Corporation (15)

Now you can scan your environment for visible Bluetooth devices. Bluetooth is not visible during a default startup.

target$ hcitool scan
Scanning ...
       XX:XX:XX:XX:XX:XX       <SSID>

Visibility

To activate visibility:

target$ hciconfig hci0 piscan

To disable visibility:

target$ hciconfig hci0 noscan

Connecting via bluetoothd

target$ bluetoothctl
[bluetooth]# discoverable on
Changing discoverable on succeeded
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent 
Default agent request successful
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX <name>
[bluetooth]# connect XX:XX:XX:XX:XX:XX