Sterling 60 on Ubuntu PC

This tutorial shows how to install drivers and firmware for a Sterling 60 module on a Ubuntu PC.

Required

  • Ubuntu PC
  • Any variant of the Sterling 60 that will interface to the PC

Setup

To install drivers and firmware for a Sterling 60 on Ubuntu, first check the kernel version of Ubuntu is compatible with the Sterling 60 driver. Check by going to the Sterling 60 release github and read the release notes CS-RN-ST60-laird-<version>.pdf.

Sterling 60 GitHub: https://github.com/LairdCP/Sterling-60-Release-Packages/releases

Depending on the version of Ubuntu the kernel may need downgraded.

Software

Update system and install tools:

# ensure your system is up to date
sudo apt update
sudo apt upgrade

# install software tools needed
sudo apt install make bison flex

Note: ensure any new kernel installed by updating is compatible with the Sterling 60 driver.

Hardware

This tutorial assumes hardware is interfaced to the PC correctly. Any of Laird’s Sterling 60 DVK’s with USB support work well due to the easy of the USB interface.

The hardware used will determine the firmware used in the next section.

Install

Backports and Firmware

Download backports and the firmware that is specific to the Sterling 60 hardware to be used.

https://github.com/LairdCP/Sterling-60-Release-Packages/releases

Backports file is labeled: backports-laird-<version>.tar.bz2

Firmware file will be based on hardware type used. For example a USB Wifi and USB Bluetooth variant will use file labeled: laird-sterling60-firmware-usb-usb-<version>.tar.bz2.

# Extract firmware 
sudo tar xvf laird-sterling60-firmware-usb-usb-<version>.tar.bz2 -C /

# Extract driver
tar xvf backports-laird-<version>.tar.bz2

cd laird-backport-<version>

make defconfig-sterling60

make

sudo make install

Blacklist

To prevent the Marvell driver from loading and interfering with the Sterling 60, black list the following by editing /etc/modprobe.d/blacklist.conf and adding the following lines:

$ sudo iv /etc/modprobe.d/blacklist.conf

# Prevent the Marvell driver from loading for the Laird ST60 module
blacklist mwifiex_pcie
blacklist mwifiex_usb
blacklist mwifiex_sdio

Reboot

Check dmesg for backports and firmware loading.

root@imx8mpevk:~# dmesg | grep -e backport -e "ieee80211 " -e Laird
[    5.529086] Loading modules backported from Summit Linux version LRD-REL-8.6.0.12-0-gd89840b36573
[    5.541965] Backport generated by backports.git v8.6.0.12
[    5.779436] <<Laird Connectivity 60 Series Wireless Network Driver version 8.6.0.12-P39-20190123>>
[    5.810138] ieee80211 phy0: card->iobase0 = 00000000170530df
[    5.810157] ieee80211 phy0: card->iobase1 = 00000000735a0c32
[    5.812962] ieee80211 phy0: priv->pcmd_buf = 000000005f25e08f  priv->pphys_cmd_buf = 00000000ebdb9fc9
[    5.812971] ieee80211 phy0: mwl_tx_init() called: ctype=3
[    5.824326] ieee80211 phy0: TX ring: allocating 640 bytes
[    5.835121] ieee80211 phy0: TX ring: - base: 0000000077ddae7e, pbase: 0x0:c4001000,len: 280
[    5.915996] ieee80211 phy0: lrdmwl: found firmware image <lrdmwl/88W8997_pcie.bin>
[    5.946685] ieee80211 phy0: Starting fw download
[    6.757759] ieee80211 phy0: FwSize = 367340 downloaded Size = 367340
[    8.876178] ieee80211 phy0: fw download complete
[    8.888190] ieee80211 phy0: lrdmwl_pcie: pci_enable_msi failed -22
[    8.897883] ieee80211 phy0: OTP data len = 0
[    8.902719] ieee80211 phy0: Adjusting combo 0's number of supported interfaces to 2
[    8.916466] ieee80211 phy0: mwl_reg_notifier set=0 core 00
[    8.917813] ieee80211 phy0: Sending regulatory hint for 00
[    8.917871] ieee80211 phy0: mwl_reg_notifier set=1 driver 00
[    8.917889] ieee80211 phy0: Radio Type ST60 (0x0)
[    8.940422] ieee80211 phy0: Num mac 2 : OTP Version (2)
[    8.958206] ieee80211 phy0: Firmware version: 5.4.41.5
[    8.968199] ieee80211 phy0: Firmware OTP region: ff, country: 00
[    8.974259] ieee80211 phy0: Deep Sleep is disabled
[    8.979114] ieee80211 phy0: 2G enabled, 5G enabled
[    8.983955] ieee80211 phy0: 2 TX antennas, 2 RX antennas. (00000003)/(00000003)
[    9.022264] ieee80211 phy0: WMM Turbo=1
[   13.684830] ieee80211 phy0: mwl_reg_notifier set=1 country element US

Check WiFi

$ iw dev
phy#1
	Interface wlxc0ee40503358
		ifindex 3
		wdev 0x1
		addr c0:ee:40:50:33:58
		type managed
		txpower 0.00 dBm

Check Bluetooth

$ bluetoothctl
[NEW] Controller C0:EE:40:50:33:5B nuc [default]
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller C0:EE:40:50:33:5B Discovering: yes
[NEW] Device 47:FE:1A:4A:AE:D3 47-FE-1A-4A-AE-D3
[NEW] Device 84:2A:FD:29:6F:FB 84-2A-FD-29-6F-FB
[NEW] Device 49:12:50:98:64:30 49-12-50-98-64-30
[NEW] Device 6A:20:51:3E:E6:37 6A-20-51-3E-E6-37
[NEW] Device 7E:97:4C:AC:BA:8A 7E-97-4C-AC-BA-8A
[NEW] Device 7F:2C:8C:7D:A2:64 7F-2C-8C-7D-A2-64

Kernel Lockdown

If the kernel module fails to load and the following “kernel_lockdown.7” shows up in dmesg then the kernel is in lockdown and easiest way around this is to disable secure boot in the PC BIOS.

[  839.299271] usb 1-4: new high-speed USB device number 15 using xhci_hcd
[  839.448101] usb 1-4: New USB device found, idVendor=1286, idProduct=2052, bcdDevice=40.00
[  839.448108] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  839.448113] usb 1-4: Product: Marvell Wireless Device
[  839.448116] usb 1-4: Manufacturer: Marvell
[  839.448120] usb 1-4: SerialNumber: 0000000000000000
[  839.460273] Lockdown: systemd-udevd: unsigned module loading is restricted; see man kernel_lockdown.7

For more info see: https://man7.org/linux/man-pages/man7/kernel_lockdown.7.html https://wiki.debian.org/SecureBoot#Secure_Boot_limitations