Testing #1099


Verify Media System and Player System properly support PiNet's web UI.

Added by Hammel about 2 months ago. Updated about 11 hours ago.

In Progress
09 - Testing
Target version:
Start date:
15 Jan 2024
Due date:
% Done:


Estimated time:
01 - Critical


This is to make sure that both provide the ability to configure the following.

  1. Eth0
  2. Wifi0
  3. AP only on Media System

Related issues

Related to PiBox - Bug #727: brcmfmac having problems in AP + station modeIn ProgressHammel27 Oct 2019

Blocked by pibox-network-config - Bug #904: wpa_supplicant.conf is not working with local routerIn ProgressHammel24 Sep 2022

Actions #1

Updated by Hammel about 1 month ago

The Media System failed because the AP cannot be seen by other devices.
This device is: Raspberry Pi 3 Model B Plus Rev 1.3
The following are running on the system with pinet active:

 6337 root      6680 S    hostapd -B /etc/network/hostapd.aponly
 6339 root      7108 S    dhcpd -cf /etc/network/dhcpd.conf.aponly wlan0
 6444 root      3400 S    udhcpc -R -n -p /var/run/ -i eth0

That suggests that the AP on a RPi3 doesn't work.

So I searched to see if that was the case and found this alternative configuration, which is similar but not equal to the current one:


Now my phone can see the AP but it won't connect to it because it says it offers no Internet. This seems to be because the phone attempts to get an IP address but the AP is not offering one (not logs in /var/log/messages) even though dhcpd is running on the wlan0 interface.

Watching the logs more closely I see the following when the phone tries to connect to the AP.

Jan 22 12:14:37 (none) hostapd: wlan0: STA b0:4a:b4:d3:e3:54 IEEE 802.11: associated
Jan 22 12:14:38 (none) hostapd: wlan0: STA b0:4a:b4:d3:e3:54 IEEE 802.11: disassociated
Jan 22 19:14:38 (none) kern.err kernel: [594092.794832] ieee80211 phy0: brcmf_vif_set_mgmt_ie: vndr ie set error : -52
Jan 22 12:14:38 (none) hostapd: wlan0: STA e1:01:e1:01:e0:01 IEEE 802.11: disassociated
Jan 22 19:14:40 (none) ntpd[757]: Deleting interface #57 wlan0,, interface stats: received=0, se
nt=0, dropped=0, active_time=9 secs
Jan 22 19:14:40 (none) ntpd[757]: Deleting interface #59 wlan0, fe80::ba27:ebff:fef7:94cf%3#123, interface stats:
 received=0, sent=0, dropped=0, active_time=9 secs

A raspberry pi linux references some testing that seems to show only firmware is working properly. Current firmware is

$ dmesg | grep "brcmfmac.*Firmware" 
[    5.073620] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) F
WID 01-2dbd9d2e

  2. (links to working firmware
Actions #2

Updated by Hammel about 1 month ago

Switched to older firmware but that didn't seem to help. The AP's can't be seen, or at least not for very long. Also tried it on a pistore, just so it was different physical hardware. Same story. Tried it with two different phones (Android and PPP) but same story.

This seems to be the best config so far for hostapd:

$ cat /etc/network/hostapd.aponly 
# auth_algs=3
# rsn_pairwise=TKIP
# wpa_pairwise=TKIP
# New

Also, adding the following to the wap() function in S40network might help.

        iwconfig wlan0 power off

Actions #3

Updated by Hammel about 1 month ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

I need to disable the brcm wireless and add a dongle, then retest and see if it works better.

Actions #4

Updated by Hammel 14 days ago

I might be missing files that could help make the wifi work correctly.
To summarize:

   cd  /lib/firmware/brcm/
   sudo ln -s ../cypress/cyfmac43455-sdio.bin brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin
   sudo ln -s ../cypress/cyfmac43455-sdio.clm_blob brcmfmac43455-sdio.raspberrypi,3-model-b-plus.clm_blob

The cypress files are NOT on the current distribution but are available from the kernel firmware download. So just add them to the kfw.cfg file to copy the files over and add the symlink creation in the

Actions #5

Updated by Hammel 11 days ago

This was updated and committed (oops, but not pushed) and then tested. It didn't work because the firmware crashed. The cypress firmware apparently doesn't work out of the upstream linux-firmware repo.

So the alternative is to try the firmware-brcm80211_20161130-3+rpt3_all.deb package instead. If this doesn't work, I'm going back to using a dongle.

Actions #6

Updated by Hammel 11 days ago

This worked better - the interface showed up and there are no dmesg crashes - but it doesn't work.

This table suggests some other firwmware, which appears to be the /lib/firmware/brcm/brcmfmac43430-sdio.bin files. I will try those too, just to be complete, before giving up.

Actions #7

Updated by Hammel 10 days ago

FW Version Status
43455 7.45.18 Loads okay. Doesn't connect to router.
43455 7.45.132 Fails to load.

According to that table only 7.45.18 seems to work very well. So I'm going to setup another wifi router and see if I can connect to that.

I need to review RM #727 which is also about getting the onboard wifi working. Once both this RM and that one are fully examined I will know whether or not the onboard should be considered going forward.

Actions #8

Updated by Hammel 6 days ago

  • Related to Bug #727: brcmfmac having problems in AP + station mode added
Actions #9

Updated by Hammel 3 days ago

Switching to MuseN (tplink router updated to latest dd-wrt) seems to work using the default firmware. At least on the rpi4 and one rpi3. What was required on the RPi's was to restart wpa_supplicant with each change to the wpa_supplicant.conf file.

I can't restart the network while testing this because that would stop/restart the wired network I'm using for testing. So that tells me I need to restart wpa_supplicant externally to S40network, or add a mode to S40network that just restarts the wireless.

For reference, here is the wpa_supplicant.conf

    proto=WPA RSN

So I can use this to test PiNet on Media and Player systems.

Actions #10

Updated by Hammel 3 days ago

  • % Done changed from 20 to 50
PiNet tested on RPi3 (Media System):
  1. hostapd.aponly requires changing from TKIP to CCMP to allow connection from my phone, otherwise the SSID doesn't show up on the phone. - see RM #904, see libpibox
  2. Wireless connection works but php server fails to serve imwww to firefox on phone. - fixed with CCMP updates.
    1. Chrome displays configuration page but Submit button failed - fixed with CCMP updates.
  3. Wired connection works with php server - can configure that way.
  4. PiNet needs the MAC address for the RPi displayed so users can add it to MAC filter lists. - see pinet
  5. When WebUI does work and the config is saved the WebUI is redisplayed with fields cleared - except the PW field. That needs to be cleared too. see ironman imwww
  6. Need to restart wpa_supplicant when changing wireless configuration (wpa_supplicant.conf) - See pnc, which is where the conf file is saved with updates ; use wpa_cli -i wlan0 reconfigure

It appears that the connection is dropped by the phone because there is no internet. I'm not sure why that is, but it's likely because I don't have a fully configured dhcp provided to the phone including nameservers and gateway. I need to check that.

Actions #11

Updated by Hammel 2 days ago

  • Blocked by Bug #904: wpa_supplicant.conf is not working with local router added
Actions #12

Updated by Hammel 1 day ago

  • % Done changed from 50 to 60
Ready for final testing:
  1. pinet showing mac address needs to be verified it displays correctly.
  2. libpibox needs to be tested on hardware to show it generate CCMP instead of TKIP in wpa_supplicant.conf.
Still need:
  1. Clear pw field in ironman/imwww
  2. Restart wpa_supplicant via wpa_cli in piboxd:net.c:saveWireless() after the settings have been written; use wpa_cli -i wlan0 reconfigure
Actions #13

Updated by Hammel about 11 hours ago

Retesting a build with the pinet/libpibox updates failed, likely because I didn't have the proper firmware installed. The working version of firmware should be in /home/mjhammel/src/ximba/raspberrypi2/extras and should be copied to /lib/firmware/brcm/brcmfmac43455-sdio.bin. I'll need to figure out where to store this and how to add it to the build once I recheck that this firmware is the solution to my problems.


When booted dmesg reports this.

$ dmesg | grep brcm
[    4.657993] brcmfmac: F1 signature read @0x18000000=0x15264345
[    4.661831] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    4.663127] usbcore: registered new interface driver brcmfmac
[    4.774216] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd'
[    4.774223] Bluetooth: hci0: BCM: 'brcm/BCM4345C0.hcd'
[    4.774230] Bluetooth: hci0: BCM: 'brcm/BCM.raspberrypi,3-model-b-plus.hcd'
[    4.774237] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'
[    4.896082] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) F
WID 01-996384e2
[    7.405680] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled

Checking version of firmware on the board (latter entry here) and the 7.45.18 file (former entry)

$ strings brcmfmac43455-sdio.bin | grep Version
tecx-wfds-wl11u-mfp-tdls-ve Version: CRC: d7226371 Date: Sun 2015-03-01 07:31:57 PST Ucode Ver: 1026.2 FWID: 01-6a2
$ strings brcmfmac43455-sdio.bin- | grep Version
-obss-obssdump-swdiv Version: 7.45.229 (617f1f5 CY) CRC: 253bd863 Date: Mon 2021-01-04 19:58:58 PST Ucode Ver: 1043.2160 FWID

This suggests that the board is picking up firmware from somewhere else! And wherever that is, it's broken because it doesn't always find the wifi device and it can lock up the Pi on reboot. I need to find and remove that file.


The fw in use is brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin, which is symlinked to ../cypress/cyfmac43455-sdio.bin. This was the fix I put in previously but realized I didn't need. Removing it causes the correct fw to be used, but I still need add the 7.45.18 version in the build somewhere.


Also available in: Atom PDF