gokrazy / wifi

WiFi daemon for connecting to WiFi networks (encrypted or unencrypted) with gokrazy
https://gokrazy.org/
Other
36 stars 4 forks source link

no connection on raspberry pi 3 b+ (no interfaces found) #3

Closed cweagans closed 1 year ago

cweagans commented 1 year ago

If I run /user/wifi, I get 1969/12/31 17:20:50 no interfaces found. I noticed that it was complaining about a missing brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin but https://github.com/raspberrypi/linux/issues/4248#issuecomment-1266751443 suggests that this warning is expected (for some reason)?

Any ideas about where to start debugging?

config.json:

{
    "Hostname": "rpi-dashboard",
    "Update": {
        "HTTPPassword": "RY9iSPmp4bO6S9Mjp3uX"
    },
    "Packages": [
        "github.com/gokrazy/fbstatus",
        "github.com/gokrazy/hello",
        "github.com/gokrazy/serial-busybox",
        "github.com/gokrazy/breakglass",
        "github.com/gokrazy/wifi"
    ],
    "PackageConfig": {
        "github.com/gokrazy/breakglass": {
            "CommandLineFlags": [
                "-authorized_keys=/etc/breakglass.authorized_keys"
            ],
            "ExtraFilePaths": {
                "/etc/breakglass.authorized_keys": "rpi-dashboard/breakglass.authorized_keys"
            }
        },
        "github.com/gokrazy/gokrazy/cmd/randomd": {
            "ExtraFileContents": {
                "/etc/machine-id": "7ae78864567d499bb881bddfb405837b\n"
            }
        },
        "github.com/gokrazy/wifi": {
            "ExtraFilePaths": {
                "/etc/wifi.json": "wifi.json"
            }
        }
    },
    "SerialConsole": "serial0,115200",
    "InternalCompatibilityFlags": {}
}

dmesg:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.2.0 (gokrazy@docker) (aarch64-linux-gnu-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT Wed Mar  1 20:57:29 UTC 2017
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000037400000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] NUMA: NODE_DATA [mem 0x3720da00-0x3720ffff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] On node 0, zone DMA: 19456 pages in unavailable ranges
[    0.000000] percpu: Embedded 21 pages/cpu s46184 r8192 d31640 u86016
[    0.000000] pcpu-alloc: s46184 r8192 d31640 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Fallback order for Node 0: 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: video=Composite-1:720x480@60i,margin_left=32,margin_right=32,margin_top=32,margin_bottom=32 dma.dmachans=0x7ff5 bcm2709.boardrev=0xa020d3 bcm2709.serial=0xab5aa80e bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=29 bcm2709.disk_led_active_low=0 smsc95xx.macaddr=B8:27:EB:5A:A8:0E vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 console=ttyS0,115200 root=PARTUUID=60c24cc1-f3f9-427a-8199-f25cbb230001/PARTNROFF=1 init=/gokrazy/init rootwait panic=10 oops=panic
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 837328K/970752K available (20416K kernel code, 4504K rwdata, 12472K rodata, 9408K init, 629K bss, 67888K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: bcm2836_arm_irqchip_handle_irq
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000396] Console: colour dummy device 80x25
[    0.000412] printk: console [tty1] enabled
[    0.001330] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[    0.001377] pid_max: default: 32768 minimum: 301
[    0.001499] LSM: initializing lsm=capability,landlock,integrity
[    0.001584] landlock: Up and running.
[    0.001717] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001767] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.004140] cblist_init_generic: Setting adjustable number of callback queues.
[    0.004191] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.004327] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.004652] rcu: Hierarchical SRCU implementation.
[    0.004678] rcu:     Max phase no-delay instances is 1000.
[    0.008408] EFI services will not be available.
[    0.008831] smp: Bringing up secondary CPUs ...
[    0.009558] Detected VIPT I-cache on CPU1
[    0.009722] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.010540] Detected VIPT I-cache on CPU2
[    0.010668] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.011409] Detected VIPT I-cache on CPU3
[    0.011534] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.011681] smp: Brought up 1 node, 4 CPUs
[    0.011801] SMP: Total of 4 processors activated.
[    0.011824] CPU features: detected: 32-bit EL0 Support
[    0.011845] CPU features: detected: 32-bit EL1 Support
[    0.011869] CPU features: detected: CRC32 instructions
[    0.011989] CPU: All CPU(s) started at EL2
[    0.012097] alternatives: applying system-wide alternatives
[    0.014853] devtmpfs: initialized
[    0.025720] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.025797] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.028941] pinctrl core: initialized pinctrl subsystem
[    0.031699] DMI not present or invalid.
[    0.032659] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.037882] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.038221] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.038431] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.038536] audit: initializing netlink subsys (disabled)
[    0.038759] audit: type=2000 audit(0.036:1): state=initialized audit_enabled=0 res=1
[    0.040471] thermal_sys: Registered thermal governor 'step_wise'
[    0.040483] thermal_sys: Registered thermal governor 'power_allocator'
[    0.040606] cpuidle: using governor menu
[    0.041936] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.042108] ASID allocator initialised with 32768 entries
[    0.045136] Serial: AMBA PL011 UART driver
[    0.071663] KASLR enabled
[    0.072787] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.072828] HugeTLB: 16380 KiB vmemmap can be freed for a 1.00 GiB page
[    0.072858] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.072883] HugeTLB: 508 KiB vmemmap can be freed for a 32.0 MiB page
[    0.072910] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.072934] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[    0.072961] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.072986] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.075373] ACPI: Interpreter disabled.
[    0.078788] iommu: Default domain type: Translated
[    0.078820] iommu: DMA domain TLB invalidation policy: strict mode
[    0.079313] SCSI subsystem initialized
[    0.079534] libata version 3.00 loaded.
[    0.079848] usbcore: registered new interface driver usbfs
[    0.079913] usbcore: registered new interface driver hub
[    0.079985] usbcore: registered new device driver usb
[    0.080254] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.081691] pps_core: LinuxPPS API ver. 1 registered
[    0.081719] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.081771] PTP clock support registered
[    0.081986] EDAC MC: Ver: 3.0.0
[    0.084157] FPGA manager framework
[    0.084339] Advanced Linux Sound Architecture Driver Initialized.
[    0.086302] vgaarb: loaded
[    0.087772] clocksource: Switched to clocksource arch_sys_counter
[    0.088120] VFS: Disk quotas dquot_6.6.0
[    0.088190] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.088642] pnp: PnP ACPI: disabled
[    0.099052] NET: Registered PF_INET protocol family
[    0.099342] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.101181] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.101300] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.101348] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.101488] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.101865] TCP: Hash tables configured (established 8192 bind 8192)
[    0.102074] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.102146] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.102346] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.102901] RPC: Registered named UNIX socket transport module.
[    0.102931] RPC: Registered udp transport module.
[    0.102953] RPC: Registered tcp transport module.
[    0.102974] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.105358] PCI: CLS 0 bytes, default 64
[    0.107701] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.107984] kvm [1]: IPA Size Limit: 40 bits
[    0.112599] kvm [1]: Hyp mode initialized successfully
[    0.114512] Initialise system trusted keyrings
[    0.114819] workingset: timestamp_bits=42 max_order=18 bucket_order=0
[    0.115386] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.115820] NFS: Registering the id_resolver key type
[    0.115868] Key type id_resolver registered
[    0.115892] Key type id_legacy registered
[    0.115942] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.115972] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.116227] fuse: init (API version 7.38)
[    0.116434] 9p: Installing v9fs 9p2000 file system support
[    0.189720] Key type asymmetric registered
[    0.189748] Asymmetric key parser 'x509' registered
[    0.189843] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.189876] io scheduler mq-deadline registered
[    0.189900] io scheduler kyber registered
[    0.211012] simple-framebuffer 3eaf0000.framebuffer: framebuffer at 0x3eaf0000, 0x10a800 bytes
[    0.211076] simple-framebuffer 3eaf0000.framebuffer: format=a8r8g8b8, mode=656x416x32, linelength=2624
[    0.214106] Console: switching to colour frame buffer device 82x26
[    0.216830] simple-framebuffer 3eaf0000.framebuffer: fb0: simplefb registered!
[    0.218535] IPMI message handler: version 39.2
[    0.220179] ipmi device interface
[    0.221957] ipmi_ssif: IPMI SSIF Interface driver
[    0.224037] EINJ: ACPI disabled.
[    0.264216] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.267850] printk: console [ttyS0] disabled
[    0.269466] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 71, base_baud = 50000000) is a 16550
[    0.272613] printk: console [ttyS0] enabled
[    1.292925] Serial: AMBA driver
[    1.298063] SuperH (H)SCI(F) driver initialized
[    1.305052] msm_serial: driver initialized
[    1.332647] loop: module loaded
[    1.339604] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.350124] megasas: 07.719.03.00-rc1
[    1.358980] SPI driver spidev has no spi_device_id for brcm,bcm2835-spi
[    1.374018] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    1.384986] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    1.405416] tun: Universal TUN/TAP device driver, 1.6
[    1.413951] thunder_xcv, ver 1.0
[    1.418795] thunder_bgx, ver 1.0
[    1.423572] nicpf, ver 1.0
[    1.427804] nicvf, ver 1.0
[    1.432077] tulip: tulip: unknown CPU architecture, using default csr0
[    1.442444] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[    1.451236] hns3: Copyright (c) 2017 Huawei Corporation.
[    1.458092] hclge is initializing
[    1.463055] e100: Intel(R) PRO/100 Network Driver
[    1.469227] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.476262] e1000: Intel(R) PRO/1000 Network Driver
[    1.482627] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    1.489936] e1000e: Intel(R) PRO/1000 Network Driver
[    1.496389] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.503845] igb: Intel(R) Gigabit Ethernet Network Driver
[    1.510703] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.517759] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[    1.525458] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.533365] sky2: driver version 1.30
[    1.542339] usbcore: registered new interface driver r8152
[    1.549235] usbcore: registered new interface driver lan78xx
[    1.556276] usbcore: registered new interface driver asix
[    1.563025] usbcore: registered new interface driver ax88179_178a
[    1.570476] usbcore: registered new interface driver cdc_ether
[    1.577677] usbcore: registered new interface driver smsc95xx
[    1.584749] usbcore: registered new interface driver net1080
[    1.591661] usbcore: registered new interface driver cdc_subset
[    1.598777] usbcore: registered new interface driver zaurus
[    1.605499] usbcore: registered new interface driver cdc_ncm
[    1.612286] usbcore: registered new interface driver lg-vl600
[    1.619111] usbcore: registered new interface driver r8153_ecm
[    1.626513] VFIO - User Level meta-driver version: 0.3
[    1.637556] usbcore: registered new interface driver cdc_acm
[    1.644293] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.654325] usbcore: registered new interface driver usblp
[    1.660932] usbcore: registered new interface driver usb-storage
[    1.668115] usbcore: registered new interface driver cp210x
[    1.674713] usbserial: USB Serial support registered for cp210x
[    1.681670] usbcore: registered new interface driver ftdi_sio
[    1.688448] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.702212] i2c_dev: i2c /dev entries driver
[    1.709519] i2c-bcm2835 3f805000.i2c: Could not read clock-frequency property
[    1.729369] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.738764] ghes_edac: GHES probing device list is empty
[    1.742014] sdhci: Secure Digital Host Controller Interface driver
[    1.756224] sdhci: Copyright(c) Pierre Ossman
[    1.763239] Synopsys Designware Multimedia Card Interface Driver
[    1.772531] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.783717] ledtrig-cpu: registered to indicate activity on CPUs
[    1.795615] usbcore: registered new interface driver usbhid
[    1.802798] usbhid: USB HID core driver
[    1.810029] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    1.830850] Initializing XFRM netlink socket
[    1.836826] NET: Registered PF_INET6 protocol family
[    1.844360] Segment Routing with IPv6
[    1.849509] In-situ OAM (IOAM) with IPv6
[    1.853439] sdhost-bcm2835 3f202000.mmc: loaded - DMA enabled (>1)
[    1.853649] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.870816] NET: Registered PF_PACKET protocol family
[    1.877537] 9pnet: Installing 9P2000 support
[    1.883382] Key type dns_resolver registered
[    1.910623] registered taskstats version 1
[    1.916363] Loading compiled-in X.509 certificates
[    1.943299] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 99, base_baud = 0) is a PL011 rev2
[    1.949606] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.952589] serial serial0: tty port ttyAMA0 registered
[    1.962219] mmc0: Problem switching card into high-speed mode!
[    1.969868] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-02-10T12:15:20
[    1.971792] mmc0: new SDHC card at address 0001
[    1.998426] mmcblk0: mmc0:0001 SD16G 14.9 GiB
[    2.003690] Console: switching to colour dummy device 80x25
[    2.018327]  mmcblk0: p1 p2 p3 p4
[    2.019215] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops)
[    2.031954] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops)
[    2.038476] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops)
[    2.044803] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops)
[    2.051076] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops)
[    2.058045] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops)
[    2.065000] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops)
[    2.071940] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops)
[    2.079594] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    2.124188] Console: switching to colour frame buffer device 90x30
[    2.147853] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[    2.685792] dwc2 3f980000.usb: supply vusb_d not found, using dummy regulator
[    2.694136] dwc2 3f980000.usb: supply vusb_a not found, using dummy regulator
[    2.753178] dwc2 3f980000.usb: DWC OTG Controller
[    2.759308] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    2.767868] dwc2 3f980000.usb: irq 51, io mem 0x3f980000
[    2.775621] hub 1-0:1.0: USB hub found
[    2.780902] hub 1-0:1.0: 1 port detected
[    2.797990] sdhci-iproc 3f300000.mmc: allocated mmc-pwrseq
[    2.801763] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.816179] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.823565] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.833795] cfg80211: failed to load regulatory.db
[    2.833949] ALSA device list:
[    2.835740] mmc1: SDHCI controller on 3f300000.mmc [3f300000.mmc] using PIO
[    2.850964]   #0: vc4-hdmi
[    2.861956] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    2.872140] devtmpfs: mounted
[    2.882585] Freeing unused kernel memory: 9408K
[    2.899824] Run /gokrazy/init as init process
[    2.905254]   with arguments:
[    2.905263]     /gokrazy/init
[    2.905270]   with environment:
[    2.905275]     HOME=/
[    2.905282]     TERM=linux
[    2.939700] mmc1: new high speed SDIO card at address 0001
[    3.083810] usb 1-1: new high-speed USB device number 2 using dwc2
[    3.300830] hub 1-1:1.0: USB hub found
[    3.306510] hub 1-1:1.0: 4 ports detected
[    3.513373] EXT4-fs (mmcblk0p4): recovery complete
[    3.521541] EXT4-fs (mmcblk0p4): mounted filesystem f0c945d3-543f-46fd-a921-66d156c127fe with ordered data mode. Quota mode: none.
[    3.603798] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    3.708982] hub 1-1.1:1.0: USB hub found
[    3.714933] hub 1-1.1:1.0: 3 ports detected
[    4.419805] usb 1-1.1.1: new high-speed USB device number 4 using dwc2
[    4.795320] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
[    5.612519] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    5.621638] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[    5.836680] brcmfmac: brcmf_fwvid_request_module: mod=wcc: failed -2
[    5.843205] ieee80211 phy0: brcmf_attach: brcmf_fwvid_attach failed
[    5.888177] brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed
stapelberg commented 1 year ago

You can find the expected dmesg boot output of the Pi 3 B+ at https://gist.github.com/gokrazy-bot/5bab202a89e1623f192292b9080d18a9

Notably, the brcmfmac lines should read:

[Raspberry Pi 3 B+] [    9.262669] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[Raspberry Pi 3 B+] [    9.273447] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[Raspberry Pi 3 B+] [    9.495633] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
[Raspberry Pi 3 B+] [   13.209249] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

If you boot Raspbian from an SD card, can you check the dmesg log messages? Does it load the firmware correctly on your device, and if so, which version?

Maybe we just need to pull in new firmware files, but I’m not sure why it works on my Pi 3 B+ but not on yours… :-/

stapelberg commented 1 year ago

Hmm, https://github.com/gokrazy/firmware/pull/299 is failing with a similar error message to yours, but I thought that would be triggered by the new firmware version (which isn’t merged yet).

Perhaps you could try reverting to an older kernel and/or firmware version? The easiest way would probably be to check out both the kernel and firmware repository locally, use a replace directive, then use git reset --hard to go back to an earlier revision. See also https://gokrazy.org/development/modules/

stapelberg commented 1 year ago

Given that also a new kernel version update is failing with a similar error, my guess would be that Linux 6.2 made loading firmware flaky (hence it passed CI once, but doesn’t pass any more). I’ll try to take a look some time next week.

cweagans commented 1 year ago

I'll give those ideas a try, thanks!

I'm not sure how much activity there normally is on the related kernel modules, but it seems that there has been a fair amount of change in the last month: https://github.com/search?q=repo%3Atorvalds%2Flinux+brcmfmac&type=commits&s=author-date&o=desc

stapelberg commented 1 year ago

I can reproduce the issue.

With kernel 6.1.12:

[    5.717560] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    5.726623] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[    5.891060] Bluetooth: Core ver 2.22
[    5.894848] NET: Registered PF_BLUETOOTH protocol family
[    5.901401] Bluetooth: HCI device and connection manager initialized
[    5.908049] Bluetooth: HCI socket layer initialized
[    5.914489] Bluetooth: L2CAP socket layer initialized
[    5.919746] Bluetooth: SCO socket layer initialized
[    6.010086] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
[    6.040081] Bluetooth: HCI UART driver ver 2.3
[    6.046692] Bluetooth: HCI UART protocol H4 registered
[    6.052683] Bluetooth: HCI UART protocol Broadcom registered
[    6.058534] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
[    6.069264] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
[    6.183520] uart-pl011 3f201000.serial: no DMA platform data
[    6.436680] Bluetooth: hci0: BCM: chip id 107
[    6.441542] Bluetooth: hci0: BCM: features 0x2f
[    6.447789] Bluetooth: hci0: BCM4345C0
[    6.451676] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[    6.457912] Bluetooth: hci0: BCM: firmware Patch file not found, tried:
[    6.464728] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd'
[    6.472394] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.hcd'
[    6.477702] Bluetooth: hci0: BCM: 'brcm/BCM.raspberrypi,3-model-b-plus.hcd'
[    6.484892] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'
[    7.872845] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.692293] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
/tmp/breakglass501445588 # uname -a
Linux gokrazy 6.1.12 #1 SMP PREEMPT Wed Mar  1 20:57:29 UTC 2017 aarch64 GNU/Linux

But then, the most recent commit (kernel 6.2) broke it:

[    5.656470] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    5.665572] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[    5.817815] Bluetooth: Core ver 2.22
[    5.822534] NET: Registered PF_BLUETOOTH protocol family
[    5.828118] Bluetooth: HCI device and connection manager initialized
[    5.835832] Bluetooth: HCI socket layer initialized
[    5.841091] Bluetooth: L2CAP socket layer initialized
[    5.846532] Bluetooth: SCO socket layer initialized
[    5.929929] Bluetooth: HCI UART driver ver 2.3
[    5.934689] Bluetooth: HCI UART protocol H4 registered
[    5.940345] Bluetooth: HCI UART protocol Broadcom registered
[    5.941303] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
[    5.946438] brcmfmac: brcmf_fwvid_request_module: mod=wcc: failed -2
[    5.953953] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
[    5.960253] ieee80211 phy0: brcmf_attach: brcmf_fwvid_attach failed
[    6.007983] brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed
[    6.085724] uart-pl011 3f201000.serial: no DMA platform data
[    6.328510] Bluetooth: hci0: BCM: chip id 107
[    6.333404] Bluetooth: hci0: BCM: features 0x2f
[    6.339711] Bluetooth: hci0: BCM4345C0
[    6.343635] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[    6.349891] Bluetooth: hci0: BCM: firmware Patch file not found, tried:
[    6.356641] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd'
[    6.364303] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.hcd'
[    6.369580] Bluetooth: hci0: BCM: 'brcm/BCM.raspberrypi,3-model-b-plus.hcd'
[    6.376693] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'
[    7.862337] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
/tmp/breakglass3848229575 # uname -a
Linux gokrazy 6.2.0 #1 SMP PREEMPT Wed Mar  1 20:57:29 UTC 2017 aarch64 GNU/Linux
stapelberg commented 1 year ago

The kernel doesn’t pass CI, but there was a bug in the CI setup that incorrectly tested the live kernel version, not the version from the PR. This is now fixed with:

I haven’t found a report of the WiFi issue with Linux 6.2 yet.

Will try to bisect it to an individual 6.2 commit when I find some more time.

stapelberg commented 1 year ago

Now starting to bisect this issue. Let’s see if we can track it down.

damdo commented 1 year ago

Could be related to https://github.com/raspberrypi/linux/issues/5379

stapelberg commented 1 year ago

Could be related to raspberrypi/linux#5379

Thanks for the tip, but that issue is about kernel commit https://github.com/raspberrypi/linux/commit/22dfb21bf1cd876616d45cda1bc6daa89eec6747.

Our issue is caused by commit https://github.com/torvalds/linux/commit/d6a5c562214f26e442c8ec3ff1e28e16675d1bcf

I’ll send an email to the commit authors.

stapelberg commented 1 year ago

Informed the authors about the breakage in https://lore.kernel.org/linux-wireless/CANnVG6=a3etRagG+RaSEH-b4_nfzxpEKffQtuMWrttrbgjunZQ@mail.gmail.com/

damdo commented 1 year ago

Ah yeah 🤦 got confused sorry. I was debugging firmware issues with that one today, that's why I got mistaken :) Nevermind, glad you found the issue.

stapelberg commented 1 year ago

Turns out that commit splits up code into two kernel modules, and our wifi program didn’t load the new one!

With the fix https://github.com/gokrazy/wifi/commit/f611656338b68faa5f42bc2c8bbf1e0231a74a50, the new kernel version successfully passed CI: https://github.com/gokrazy/kernel/pull/500

cweagans commented 1 year ago

Hooray! That's exciting -- definitely going to give this another go in the near future. I got tied up with my job hunt, so never circled back to this 😅

damdo commented 1 year ago

Awesome! Thanks for finding and fixing ✨