Raspberry Pi 4 B not detecting certain wifi channels

Hi there, this is my first time using OpenWrt. I am trying to set up a raspberry Pi 4 B as a wireless extender router using OpenWrt. I need to be able to connect to public wifi to be able to demo some IoT software on a router for a uni assignment.

TLDR
I was following a tutorial and all was going well up until scanning for nearby wifi networks on radio0. I couldn't find my home wifi to connect to the internet. I suspect the issue is to do with channels.

Steps I took:

  1. Flashed SDcard with latest 32bit default raspberry Pi image
  2. Set the time to my local country code using raspi config and then setting it to Australia (where I live)
  3. Flashed SD card with recommended firmware for rPi4B (openwrt-22.03.5-bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz)
  4. Changed the /etc/config/ files as follows:

/etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd53:462d:0857::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '10.71.71.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option force_link '1'

config interface 'wwan'
        option proto 'dhcp'
        option peerdns '0'
        option dns '1.1.1.1 8.8.8.8'

/etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'wwan'
...

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option cell_density '0'
        option country 'AU'
        option band '2g'
        option channel '4'
        option short_gi_40 '0'
        option channel '4'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'wan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

The wireless file is based on this github issue's solution to rPi4 wireless issues.

  1. I run commands from /etc/config/ directory
    uci commit wireless
    wifi
    reboot
    Log back in and back to the directory.
    wifi status
{
        "radio0": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": false,
                "config": {
                        "path": "platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1",
                        "cell_density": 0,
                        "country": "AU",
                        "band": "2g",
                        "channel": "4",
                        "short_gi_40": false
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "ifname": "wlan0",
                                "config": {
                                        "mode": "ap",
                                        "ssid": "OpenWrt",
                                        "encryption": "none",
                                        "network": [
                                                "wan"
                                        ],
                                        "mode": "ap"
                                },
                                "vlans": [

                                ],
                                "stations": [

                                ]
                        }
                ]
        }
}

HOWEVER. When I scan radio0 in luci I only see my neighbours networks. When I compare it with a wifi scan I did on my phone my wifi router is using channels 12, 104 for 2.4G and 5G respectively with higher signal than all of my neighbour's. The scan does however detect channels 1, 6, 11 on my neighbours devices. I don't think encryption is the issue as my neighbours use the same as mine; WPA2.

Additionally, I can see and connect to OpenWrt from my phone's available wifi networks. In the reverse direction I am also able to connect to my phone's hotspot through a radio0 scan in the GUI.

So I suspect I can't see my wifi because the channels are blocked / unsupported on rPi4 / some driver issue. But when I run iw list it doesn't look like those channels are disabled:

Wiphy phy0
        wiphy index: 0
        max # scan SSIDs: 10
        max scan IEs length: 2048 bytes
        max # sched scan SSIDs: 16
        max # match sets: 16
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * P2P-client
                 * P2P-GO
                 * P2P-device
        Band 1:
                Capabilities: 0x1022
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT TX/RX MCS rate indexes supported: 0-7
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
        Band 2:
                Capabilities: 0x1062
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT TX/RX MCS rate indexes supported: 0-7
                VHT Capabilities (0x00001020):
                        Max MPDU length: 3895
                        Supported Channel Width: neither 160 nor 80+80
                        short GI (80 MHz)
                        SU Beamformee
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: not supported
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: not supported
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                Frequencies:
                        * 5170 MHz [34] (20.0 dBm)
                        * 5180 MHz [36] (20.0 dBm)
                        * 5190 MHz [38] (20.0 dBm)
                        * 5200 MHz [40] (20.0 dBm)
                        * 5210 MHz [42] (20.0 dBm)
                        * 5220 MHz [44] (20.0 dBm)
                        * 5230 MHz [46] (20.0 dBm)
                        * 5240 MHz [48] (20.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                        * 5500 MHz [100] (20.0 dBm) (radar detection)
                        * 5520 MHz [104] (20.0 dBm) (radar detection)
                        * 5540 MHz [108] (20.0 dBm) (radar detection)
                        * 5560 MHz [112] (20.0 dBm) (radar detection)
                        * 5580 MHz [116] (20.0 dBm) (radar detection)
                        * 5600 MHz [120] (disabled)
                        * 5620 MHz [124] (disabled)
                        * 5640 MHz [128] (disabled)
                        * 5660 MHz [132] (20.0 dBm) (radar detection)
                        * 5680 MHz [136] (20.0 dBm) (radar detection)
                        * 5700 MHz [140] (20.0 dBm) (radar detection)
                        * 5720 MHz [144] (20.0 dBm) (radar detection)
                        * 5745 MHz [149] (20.0 dBm)
                        * 5765 MHz [153] (20.0 dBm)
                        * 5785 MHz [157] (20.0 dBm)
                        * 5805 MHz [161] (20.0 dBm)
                        * 5825 MHz [165] (20.0 dBm)

I have spent over a day trying to solve this problem so if anyone has any clues of how to see my wifi on rPi4B then that would be appreciated. If this can't be solved I will try to use ethernet to the internet and use the Pi as an access point. Thanks for your time.

friends don't let friends use Broadcom wifi.

1 Like

I didn't want to admit defeat here but looking back at other rPi4 videos I don't think anything on channels 12, 104 were ever displayed so there's no evidence they work even for the tutorial guy. Unlucky I guess. Thanks for the quick response.

not possible. Yes, Broadcom is already BOFH stuff, but on top of that, most (all?) Raspberrys can only be used either as AP or Wifi Client, but not as both client and AP at the same time (aka repeater).

you can though add 1 extra USB Wifi dongle, to actually make it a repeater (or 2 Wifi dongles or 2 non-Broadcom Wifi dongles, to work around the Broadcom issue. But keep in mind that some cheap dongles dont work as APs at all).

1 Like

@Pico do you have any recommendations of what to look for when choosing a dongle? e.g. has drivers compatible with OpenWrt. I haven't had to choose network components to work with OSS before

1 Like

More traditional wifi routers would a make much better repeater, for less money and providing better range and faster throughput.

That's true. I was recommended to use OpenWrt because our group's task is to develop software that will manage a network of devices, including any routers in the network.

and that's fine, the RPi is just a bad choice for wifi.

I’ve recently ordered a MT7601 USB Wifi from china for 4,50€ total (mt7601 is client-only in regular upstream Linux code). Should arrive in a few weeks. If it ever arrives, I might likely post around xmas, if it was of any use.

So you need a Wifi hub for IoT?
You could check the supported device list and order e.g. any MT7621 based router, for your IoT group project it could even be an even older Wifi „n“ router with 2.4ghz only. Could as well be used. Might be 5-30€. Maybe check eBay for a few days and check if any of the offered devices is supported by OpenWRT.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.