16

I read in the post that RPi 3 could not manage to operate on both bands simultaneously. Can RPi4 do that? We are planning to create mesh network with Rpi nodes. With single band operation, the throughput drops drastically, as the node count increases.

tlfong01
  • 4,847
  • 3
  • 12
  • 24
vanangamudi
  • 271
  • 1
  • 2
  • 7

3 Answers3

18

Beforehand the answer:
Yes, it is possible to run a RPi 4B simultaneously on dual band (WiFi 2.4GHz / 5GHz), but only with predefined interface combinations given by the hardware. If one interface is used as access point (AP) you can only use one band.

First to clarify: you are talking about RPi 3B, the link you have given is talking about a RPi 3B+. This is an important difference. RPi 3B only supports the 2.4 GHz band so there is no question if it can also use a 5 GHz band. It can't. RPi 3B+ supports dual band. The RPi 4B uses the same on-board wifi chip than RPi 3B+ so it also supports dual band.

With iw list on RPi 4B you will find:

--- snip ---
valid interface combinations:
     * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
       total <= 3, #channels <= 2
     * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
       total <= 4, #channels <= 1
--- snip ---

This tells you what combinations are possible. For example you can make in total 3 connections, maybe managed, P2P-client and P2P-GO on two channels (one on 2.4 GHz and one on 5 GHz). But with an access point (AP) you can have 4 connections in total but only on one channel.

A channel is a frequency (range), for example channel 1 (2412 MHz on 2.4 GHz band) and channel 36 (5180 MHz on 5 GHz band). Because with an AP you can only use one channel it implies that you can only use one band. You may consider to create a peer-to-peer group owner (P2P-GO) instead of an access point. It behalves similar to it. Then according to the "valid interface combinations" it should be possible to create a second managed client connection on another band.

If you do not find a possible combination you always can use an additional USB/WiFi dongle.

UPDATE:
Because of the extended discussion about this issue I have made a test to get some facts. I tried to use the default dhcpcd networking environment but wasn't able to get a stable environment. Sometimes it works, sometimes not with a crashed wifi driver brcmfmac. I suppose dhcpcd has to much constraints with using its hooks in /lib/dhcpcd/dhcpcd-hooks/. So I used systemd-networkd that provides a clean environment. First I switched to systemd-networkd and setup a client connection to my internet router on the 2.4 GHz band, doing this on a Raspberry Pi 4B with the Raspberry Pi OS (32-bit) Buster Lite 2020-08-20 updated with sudo apt update && sudo apt full-upgrade && sudo reboot on 2020-09-24.

Just follow to Use systemd-networkd for general networking. You can use section "♦ Quick Step". Then come back here.

Create the managed client uplink connection:

rpi ~$ sudo -Es   # if not already done
rpi ~# cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<EOF
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE

freq_list=2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472

freq_list=5170 5180 5190 5200 5210 5220 5230 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700

network={ ssid="TestNet" psk="verySecretPassword" } EOF

rpi ~# chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf rpi ~# systemctl disable wpa_supplicant.service rpi ~# systemctl enable wpa_supplicant@wlan0.service rpi ~# rfkill unblock wlan

After a reboot then define the autonomous peer-to-peer group owner P2P-GO with wpa_cli:

rpi ~$ wpa_cli
--- snip ---
Selected interface 'p2p-dev-wlan0'
Interactive mode

> p2p_group_add freq=5 OK <3>P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-Vv" freq=5220 passphrase="i9rEDnPw" go_dev_addr=a6:78:e7:1f:37:2f > quit

If you want a frequency on the 2.4 band you can use parameter freq=2 instead. You should find now the GO with your cell phone as DIRECT-Vv (or what ssid p2p_group_add returned to you) like any other wifi hotspot. Look what setup you have with:

rpi ~$ iw dev
phy#0
        Interface p2p-wlan0-0
                ifindex 4
                wdev 0x3
                addr d2:3d:c9:4f:6b:fb
                type P2P-GO
                channel 36 (5180 MHz), width: 20 MHz, center1: 5180 MHz
                txpower 31.00 dBm
        Unnamed/non-netdev interface
                wdev 0x2
                addr d2:3d:c9:4f:eb:fb
                type P2P-device
                txpower 31.00 dBm
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr dc:a6:32:01:db:ed
                ssid wlan@hoeft-online.de
                type managed
                channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
                txpower 31.00 dBm

Here we have channel 1 (2412 MHz) on interface wlan0 and channel 36 (5180 MHz) on interface p2p-wlan0-0 that definitely answers the question.


**references:**

wpa_supplicant and Wi-Fi P2P
List of WLAN channels

Ingo
  • 42,961
  • 20
  • 87
  • 207
6

There are very few production Wifi chips that supports concurrent dual band operation. The only one I know is SF16A18, which seems not to be in a real mass production phase.

This is because if you put dual band in a single chip that work concurrently, there will be signal interference problems since the TX/RX radio circuits are in like 2mm to each other on a single chip, and thermal problems thanks to the dual band power amplifier working concurrently, so it is hard to design.

For access points(or wireless routers) that supports concurrent dual band, often there are at least two Wifi chips on board, such as MT7620(single band 2.4G)+MT7612(dual band like the chip in the question, but works only under 5G).

So basically every dual band Wifi module in the market cannot support current dual band except for special designed modules which will be much larger and cost more.

But with complex software you can use the Wifi chip in a TDM way as if there are more than one Wifi chips, here is an example from Realtek: https://github.com/CalielOfSeptem/rtl8188cus/blob/master/document/Realtek_WiFi_concurrent_mode_Introduction.pdf, but this can only get more feature, not more bandwidth since there is only one physical Wifi link at any time.

jw_
  • 169
  • 2
4

On the Raspberry Pi 4, wireless support is provided by the same Cypress CYW43455 chip as on the Pi 3 B+. A limitation of this chip is that it cannot do Real Simultaneous Dual Band (RSDB). You could add a USB wifi module, to have two devices, each on a different band.

Michael Harvey
  • 1,410
  • 8
  • 11