Setting up WLAN and Bluetooth RevPi Connect 4

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 included on the Compute Module 4. 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).

Note: In order to use WLAN and Bluetooth, you have to activate it once in the web status.

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 Connect 4 via the following link in the section “Adding the network details to the Raspberry Pi”.

https://www.raspberrypi.com/documentation/computers/configuration.html#wireless-networking-command-line

Setting up WLAN via the Command Line Tool nmtui

Starting with the image version Bullseye you can also use the command line tool nmtui. This manages the network connections via the NetworkManager.

Bluetooth

A Bluetooth interface is also available via the same SMA socket as for the WLAN interface. It complies with the Bluetooth 5.0 standard and is connected to the Compute Module 4.

Configuring Bluetooth

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

sudo systemctl enable hciuart

sudo systemctl start hciuart

  • Start the Bluetooth Daemon with:

sudo systemctl start bluetooth

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

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

„bluetoothctl“ is the command line interface to BlueZ.

  • Gib bluetoothctl -v ein.

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