Getting Started with the SPB228 on PCIe-UART

Introduction

This guide will help you to set-up and use the HDA228-PCIe (evaluation board to the SPB228 module) for first time experience. A prerequesit to this guide is to register an account to be able to access the driver source code in the Downloads section.

Scope of the Demonstration

  1. Wifi connection to an access point and perform a throughput test using two Linux computers.
  2. BT connection using the bluez tools.

Requirements

Things you need to have:
  • The HDA228-PCIe and its two antennas connected.
  • A Linux computer or Linux development platform with a free PCIe slot. Note that the HDA228-PCIe is a M.2 2230 key E, you might need an adaptor for your PCIe slot.
  • Linux kernel version 2.6.34 or later installed. Note that not all the newest kernel versions are supported, please refer to the file wlan_src/README of the driver release to know what kernel version is supported.
  • iperf3 installed.
  • SPB228 Linux driver package (see the Download Section).
  • An 802.11 access point connected with Ethernet to a second Linux computer with iperf3 installed.
  • The bluez Bluetooth stack installed, see https://help.ubuntu.com/community/BluetoothSetup for help.
  • Hardware UART flow control (RTS/CTS) are connected to host.

Driver installation

  • Power up the first Linux computer
  • Start a terminal window
  • Unzip the driver package in a local directory
  • Compile the driver by running the helper script provided (some commands need to be run as root, you will be prompted for your password):
    $ ./install-driver.sh
    ...preparing installation for antenna config version v1
    [sudo] password for <your_user_name>: 
    blacklist mwifiex
    blacklist mwifiex_sdio
    blacklist mwifiex_usb
    blacklist mwifiex_pcie
    blacklist btmrvl
    blacklist btmrvl_sdio
    blacklist btmrvl_usb
    ...done!
    
    Unloading mwifiex, mwifiex_sdio, btmrvl and btmrvl_sdio legacy drivers...
    -------Don't panic if you see some error printouts here. Quite normal.
    rmmod: ERROR: Module mwifiex_pcie is not currently loaded
    rmmod: ERROR: Module mwifiex is not currently loaded
    rmmod: ERROR: Module btmrvl_pcie is not currently loaded
    rmmod: ERROR: Module btmrvl is not currently loaded
    ...done!
    
    Copy fw image...
    cp FwImage/pcieuart8997_combo_v4.bin /lib/firmware/mrvl/.
    Copy fw image...done!
    
    Install Power tables...
    cp config/txpower_WW_v1.bin /lib/firmware/mrvl/txpower_WW.bin
    Install Power tables...done!
    
    Build wifi drivers...
    make -C /lib/modules/4.4.9/build M=/home/hdwireless/dev/builds/linux-pcie-uart-driver-228-1.0/wlan_src modules
    make[1]: Entering directory '/usr/lib/modules/4.4.9/build'
    CC [M]  /home/hdwireless/dev/builds/linux-pcie-uart-driver-228-1.0/wlan_src/mlan/mlan_module.o 
      [...] 
    
    cp wlan_src/mlan.ko wlan_src/pcie8xxx.ko .
    cp muart_src/hci_uart.ko .

The firmware and calibration files needed by the SPB228 to operate are installed on your system (in /lib/firmware/mrvl) during this operation.
  • Load the Wifi and BT driver with the helper script:
    $ ./load-driver.sh 
    Loading Wifi driver
    Loading Bluetoth driver
  • The evaluation board connected to the PC PCIe slot will be probed, a new WLAN network interface should now be listed:
    $ iwconfig
    [...]
    mlan0     IEEE 802.11-DS  ESSID:""  
              Mode:Managed  Access Point: Not-Associated   Bit Rate:1 Mb/s   
              Tx-Power=24 dBm   
              Retry limit:9   RTS thr=2347 B   Fragment thr=2346 B   
              Power Management:on
              Link Quality=0/5  Signal level=0 dBm  Noise level=0 dBm
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:18
              Tx excessive retries:0  Invalid misc:0   Missed beacon:0
    [...]

  • Attaching BT UART to bluez stack:
    $ sudo hciattach /dev/ttyUSB0 any 115200 flow 
    $ sudo hciconfig hci0 up

  • A new Bluetooth interface should now be listed:
     
    $ hciconfig
    hci0:   Type: Primary  Bus: UART
            BD Address: 78:C4:0E:A0:0C:D9  ACL MTU: 1021:7  SCO MTU: 240:3
            UP RUNNING 
            RX bytes:664 acl:0 sco:0 events:39 errors:0
            TX bytes:411 acl:0 sco:0 commands:39 errors:0

Wifi demonstration example

In this example an iperf3 client resides on the SPB228 Linux computer and a remote iperf3 server running on a computer connected to the Ethernet port of an 802.11 AP.

Running the IPerf Server Side via 802.11 AP

  • Power up the 802.11 AP (follow AP installation and configuration guide)
  • Power up the second Linux host computer
  • Open up a terminal window
  • Enter ifconfig command to get IP address to be used below in the IPerf client session
  • Start IPerf Server as per below:
    $ iperf3 -s

Running iperf3 on the Client Side

  • Start a WLAN connection to the access point by using your Network Manager. If your computer also has an internal Wifi card, make sure you are selecting the mlan0 interface when setting up the connection.
  • Run the ifconfig command to check that an IP address has been successfully assigned to the mlan0 interface.
  • Then start a iperf3 client as per below:
    $ iperf3 -c <ip-address> -t 30
    -c means you are running in client mode, connecting to a "host" which is the IP address following the -c.
    -t 30 means the time in seconds to perform the IPerf test the default is set to 10 seconds.
  • Tx TCP throughput data speed is presented continuously in the Terminal window for given time -t 30

Bluetooth demonstration example

In this demonstration, we will connect to a XooparBoy Bluetooth audio device.
  • Start the bluetoothctl command line interface:
    $ bluetoothctl 
    Agent registered
    [bluetooth]#
  • List the Bluetooth controllers and make sure the SPB228 is the selected default, this is important if there is already an internal controller on your PC:
    [bluetooth]# list
    Controller 00:28:F8:60:D8:F2 hdwireless #1 [default]
    Controller 78:C4:0E:A0:0C:D9 hdwireless 
    [bluetooth]# select 78:C4:0E:A0:0C:D9
  • Start and stop scanning:
    [bluetooth]# scan on
    Discovery started
    [CHG] Controller 78:C4:0E:A0:0C:D9 Discovering: yes
    [...]
    [NEW] Device FC:58:FA:8D:8A:B3 XooparBoy
    [...]
    [bluetooth]# scan off
  • Pair and connect to the device:
    [bluetooth]# pair FC:58:FA:8D:8A:B3
    Attempting to pair with FC:58:FA:8D:8A:B3
    [CHG] Device FC:58:FA:8D:8A:B3 Connected: yes
    [CHG] Device FC:58:FA:8D:8A:B3 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
    [CHG] Device FC:58:FA:8D:8A:B3 ServicesResolved: yes
    [CHG] Device FC:58:FA:8D:8A:B3 Paired: yes
    Pairing successful
    [XooparBoy]# connect FC:58:FA:8D:8A:B3
    Attempting to connect to FC:58:FA:8D:8A:B3
    Connection successful
    [CHG] Device FC:58:FA:8D:8A:B3 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
This site is powered by Foswiki
Copyright © 2017-2020 H&D Wireless AB.