1 2 Previous Next 15 Replies Latest reply on Sep 4, 2019 3:55 AM by lida_4439816





      i'm use cypress backport driver brcmfmac and firmware (from 05.19) with my kernel (3.10 on samsung a310f) and lineage 7.1 (nogat)

      With some kernel editing - now wifi working good but i'm have only 1 problem and cant find fix - after power up wifi or power up phone - wifi cant connect to saved networks but in network list - i'm see "saved" on wifi ssid..

      I'm try use clearly wpa_supplicant 2.6 and patching with cypress patches - didnt help.

      if i'm delete all files in /data/misc/wifi/* , restart phone and connect to some ssid - in /data/misc/wifi/wpa_supplicant.conf i'm see new network but with string "disabled=1". If i'm remove this string - didnt help fix autoconnect...


      Where maybe problem - please help me understand...

        • 1. Re: bcm43430_a1



          need your help to provide supplicant log , and better fmac log also.

          supplicant log should be added  -dd to enable more logs.

          Fmac driver has a debug option when do bringing up  like:

          insmod  brcmfmac.ko debug = 0x120000e

          1 of 1 people found this helpful
          • 2. Re: bcm43430_a1

            This is log from booted phone (before reboot - connected to ssid "kvant-telecom"













            config_methods=physical_display virtual_push_button























            • 3. Re: bcm43430_a1

              I am glad to hear that you are succeed in adding the 43430_a1 to the kernel low than 4.1+, i am dealing with a project with kernel 3.18.y to add the AP6212, these days i had find many informations and some source code,but i find the driver cant compile in the kernel 3.18.y.Can you give me some help?

              • 4. Re: bcm43430_a1


                    I think you need to have a debug why disabled was set here.   From what i Know if disabled=1 , it can't be reconnected according the mechanism.


                09-03 09:21:12.841  3000  3000 D wpa_supplicant: priority=1 (0x1)

                09-03 09:21:12.841  3000  3000 D wpa_supplicant: disabled=1 (0x1)

                09-03 09:21:12.841  3000  3000 D wpa_supplicant: id_str - hexdump(len=94): 25 37 42 25 32 32 63 72 65 61 74 6f 72 55 69 64 25 32 32 25 33 41 25 32 32 31 30 30 30 25 32 32 ...

                09-03 09:21:12.927  3000  3000 D wpa_supplicant: PSK (from passphrase) - hexdump(len=32): [REMOVED]

                09-03 09:21:12.927  3000  3000 D wpa_supplicant: Priority group 1

                09-03 09:21:12.927  3000  3000 D wpa_supplicant:    id=0 ssid='KVANT-TELECOM'

                • 5. Re: bcm43430_a1

                  i'm try research who in android make this flag - but cant find now.. And why wifi framework dont enable this network when i'm connecting manual.


                  And if i'm remove this flag in wpa_supplicant.conf - this not help - no autoconnect...


                  All this strange, because with stock bcmdhd and cfg80211 - all working good...

                  1 of 1 people found this helpful
                  • 6. Re: bcm43430_a1

                    em, I think need more logs when you switch on/off the wifi menu ,  try to catch the reconnect process and find if there exists an error message.

                    • 7. Re: bcm43430_a1



                      i'm find function -


                          public WifiConfiguration selectQualifiedNetwork(boolean forceSelectNetwork,

                                  boolean isUntrustedConnectionsAllowed, List<ScanDetail>  scanDetails,

                                  boolean isLinkDebouncing, boolean isConnected, boolean isDisconnected,

                                  boolean isSupplicantTransient) {

                              localLog("==========start qualified Network Selection==========");

                              mScanDetails = scanDetails;

                              List<Pair<ScanDetail, WifiConfiguration>>  filteredScanDetails = new ArrayList<>();

                              if (mCurrentConnectedNetwork == null) {

                                  mCurrentConnectedNetwork =





                              // Always get the current BSSID from WifiInfo in case that firmware initiated roaming

                              // happened.

                              mCurrentBssid = mWifiInfo.getBSSID();



                              if (!forceSelectNetwork && !needQualifiedNetworkSelection(isLinkDebouncing, isConnected,

                                      isDisconnected, isSupplicantTransient)) {

                                  localLog("Quit qualified Network Selection since it is not forced and current network"

                                          + " is qualified already");

                                  mFilteredScanDetails = filteredScanDetails;

                                  return null;



                      i'm see that this block run function needQualifiedNetworkSelection

                      but from logcat i'm see this:


                      09-03 11:50:32.949  2556  2628 D WifiQualifiedNetworkSelector:: ==========start qualified Network Selection==========: system_server

                      09-03 11:50:32.951  2556  2628 D WifiQualifiedNetworkSelector:: empty scan result: system_server

                      09-03 11:50:32.952  2556  2628 D WifiQualifiedNetworkSelector:: Quit qualified Network Selection since it is not forced and current network is qualified already: system_server


                      This mean that selectQualifiedNetwork always getting variable scanDetails with 0 results... I'm think this problem maybe.. No other errors i'm find...

                      • 8. Re: bcm43430_a1

                        I think you are seeing the same thing I saw at one point. This is what I found:


                        fmac based radios will not reconnect due to scan data being discarded, due to an invalid timestamp comparison implemented in the Android framework.


                        Android is doing an invalid timestamp check using the BSS TSF (from beacon and probe responses) against the real time of the Android device.  Even worse, the fmac driver always passes zero(0) as the BSS TSF to cfg80211_inform_bss().


                        Reference on where to find the fault in the Android framework:


                        See frameworks/base/wifi/java/android/net/wifi/ScanResult.java, where timestamp is initialized using the BSS tsf in several places.

                        For example:

                          this.timestamp = tsf;


                        See frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/SupplicantWifiScannerImpl.java.

                        The comparison code that is invalid is:

                             ScanResult result = nativeResults.get(i).getScanResult();

                             long timestamp_ms = result.timestamp / 1000; // convert us -> ms


                             if (timestamp_ms > mLastScanSettings.startTime) {

                                  // <snip> code adds the ScanResult


                             } else {

                                  // was a cached result in wpa_supplicant

                                  // code doesn’t add the ScanResult – discarded as stale



                        The mLastScanSettings.startTime get set in the LastScanSettings constructor function, also in SupplicantWifiScannerImpl.java:

                             private static class LastScanSettings {

                                  public long startTime;


                             public LastScanSettings(long startTime) {

                                  this.startTime = startTime;



                        I brought this to the attention of google here:




                        Google refuses to see it as a bug.  I worked around it by always returning maxint in cfg80211_inform_bss_data call so that the comparison in the Android Java code will not toss the scan data:


                        b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 5032db7..e5e2331 100644 
                        --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
                        +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
                        @@ -2894,7 +2894,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
                                       bss = cfg80211_inform_bss(wiphy, notify_channel,
                                                                 (const u8 *)bi->BSSID,
                        -                                        0, notify_capability,
                        +                                        (u64)(0x7FFFFFFFFFFFFFFFLL), notify_capability, notify_interval, notify_ie, notify_ielen, notify_signal, GFP_KERNEL);


                        Try that and see if it resolves your issue.

                        2 of 2 people found this helpful
                        • 9. Re: bcm43430_a1



                          Yes this help me - very thank..

                          This related to android 7 ? this mean that only bcmdhd drivers properly works with android not mainlined fmac... 

                          • 10. Re: bcm43430_a1

                            i'm make proper patch for this fix:

                            • 11. Re: bcm43430_a1

                              yes, thanks a lot for your detailed instructions and share .

                              • 12. Re: bcm43430_a1

                                hello,can you help me with this problen?

                                yes i use the bsp from cypress website(cypress-firmware-v4.14.77-2019_0503),in the package i find the brcmfmac43430-sdio.bin but i cant find brcmfmac43430-sdio.txt, so i download another txt from internet and then i got the log:


                                brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001

                                brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May  2 2019 02:39:18 version (r714225 CY) FWID 01-e539531f


                                and then there is no messages more , i dont know what happenned.is that means i got a wrong bin file?

                                • 13. Re: bcm43430_a1

                                  and ? i'm see no errors.

                                  try -

                                  ifconfig -a


                                  show wlan0?

                                  • 14. Re: bcm43430_a1

                                    for these are no more messages, i think the bin file are fail to loader, ifconfig -a show no wlan0.maybe i got a wrong .bin file and .txt file

                                    1 2 Previous Next