Setting up WLAN and Bluetooth

 

WLAN

Here you can either connect a WLAN rod antenna directly or an external antenna via an appropriate antenna cable. When selecting the antenna, note that the antenna connection is implemented as an RP-SMA socket (“reverse polarity”).
The WLAN interface operates at 2.4 and 5 GHz and complies with the IEEE802.11a/b/g/n/ac specification. It is connected to the Compute Module via the SDIO interface (GPIO34-GPIO39). A Cypress CYW43455 (formerly Broadcom BCM43455) WLAN/BT chip is used.

Under Linux you can address the interface as “wlan0” (by default, without other WLAN devices).

Configuring WLAN

You can configure the WLAN interface via the command line as follows.

  • Enter the following command to search for networks in the vicinity:

sudo iw wlan0 scan

  • Use the following command to connect to an unencrypted network:

sudo iw dev wlan0 connect <YOUR ESSID>

  • Enter the following command if you want to display the link status:

sudo iw dev wlan0 link

Setting up WLAN via the Command Line

The “wpa_supplicant” tool can configure network interfaces and establish a connection to wireless networks. You can read how to set up WLAN on the RevPi Flat via the following link in the section “Adding the network details to the Raspberry Pi”.

https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

Bluetooth

A Bluetooth interface is also available via the same SMA socket as for the WLAN interface. This complies with Bluetooth standard 5.0 and is connected to the Compute Module via an FTDI USB-to-RS232 converter.

Configuring Bluetooth

  • Enter the following commands to connect a serial UART to the Bluetooth stack as an HCI transport interface:

sudo hciattach /dev/ttyUSB0 any
sudo hciconfig hci0 up

  • Start the Bluetooth daemon with:

sudo systemctl start bluetooth

BlueZ is the Bluetooth system for Linux that allows a RevPi Flat (Raspberry Pi) to communicate with classic and low-energy Bluetooth devices.

You can find more information about BlueZ on the official site: http://www.bluez.org/

“bluetoothctl” is the command line interface to BlueZ.

  • Enter bluetoothctl -v.

If you want to configure Bluetooth devices with “bluetoothctl”, you can find more information here:

https://www.linux-magazine.com/Issues/2017/197/Command-Line-bluetoothctl