Dietpi: Diet-Pi Network | RPi3 build-in WiFi always try to connect while disabled

Created on 5 Jun 2016  ยท  33Comments  ยท  Source: MichaIng/DietPi

@Fourdee

Description:

  • RPi3 buid-in WiFi adapter always try to connect to WiFi AP while adapter is disabled in dietpi-config

160605-0006

160605-0007

160605-0009

160605-0008

root@Rpi_3-TEST:~# dmesg | grep brcmf
[   58.064918] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   58.067106] brcmfmac: power management disabled
[   58.099530] brcmfmac: power management disabled
[   58.262574] brcmfmac: power management disabled
[   58.442766] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   58.442781] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[   67.853994] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   67.863335] brcmfmac: power management disabled
[   67.902551] brcmfmac: power management disabled
[   68.069905] brcmfmac: power management disabled
[   68.285730] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   68.285743] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[   75.414342] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   75.418999] brcmfmac: power management disabled
[   75.456260] brcmfmac: power management disabled
[   75.569395] brcmfmac: power management disabled
[   75.783101] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   75.783113] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[   82.745149] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   82.747959] brcmfmac: power management disabled
[   82.780690] brcmfmac: power management disabled
[   82.930449] brcmfmac: power management disabled
[   83.145856] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   83.145869] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[   93.464449] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   93.468034] brcmfmac: power management disabled
[   93.500888] brcmfmac: power management disabled
[   93.640873] brcmfmac: power management disabled
[   93.834717] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   93.834730] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[   99.554723] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[   99.557294] brcmfmac: power management disabled
[   99.590130] brcmfmac: power management disabled
[   99.730556] brcmfmac: power management disabled
[   99.913281] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[   99.913295] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  106.644471] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  106.648424] brcmfmac: power management disabled
[  106.688807] brcmfmac: power management disabled
[  106.789396] brcmfmac: power management disabled
[  107.013247] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  107.013260] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  118.934864] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  118.937167] brcmfmac: power management disabled
[  118.970211] brcmfmac: power management disabled
[  119.153963] brcmfmac: power management disabled
[  119.173322] brcmfmac: brcmf_sdio_hdparse: seq 6: sequence number error, expect 5
[  119.173380] brcmfmac: brcmf_sdio_hdparse: seq 5: sequence number error, expect 7
[  119.177752] brcmfmac: brcmf_sdio_hdparse: seq 7: sequence number error, expect 6
[  119.393403] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  119.393417] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  128.025598] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  128.028773] brcmfmac: power management disabled
[  128.068585] brcmfmac: power management disabled
[  128.199455] brcmfmac: power management disabled
[  128.443344] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  128.443358] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  135.232859] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  135.246443] brcmfmac: power management disabled
[  135.282655] brcmfmac: power management disabled
[  135.409048] brcmfmac: power management disabled
[  135.633118] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  135.633132] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  142.794631] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  142.801687] brcmfmac: power management disabled
[  142.839557] brcmfmac: power management disabled
[  142.929586] brcmfmac: power management disabled
[  143.143228] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  143.143241] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  148.184540] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  148.187183] brcmfmac: power management disabled
[  148.230111] brcmfmac: power management disabled
[  148.340452] brcmfmac: power management disabled
[  148.522805] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  148.522819] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  159.046499] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  159.049199] brcmfmac: power management disabled
[  159.113930] brcmfmac: power management disabled
[  159.246152] brcmfmac: power management disabled
[  159.483058] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  159.483071] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  168.234526] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  168.240394] brcmfmac: power management disabled
[  168.276634] brcmfmac: power management disabled
[  168.430556] brcmfmac: power management disabled
[  168.633086] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  168.633100] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  180.424017] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  180.429089] brcmfmac: power management disabled
[  180.466682] brcmfmac: power management disabled
[  180.620709] brcmfmac: power management disabled
[  180.823025] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  180.823038] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  187.153691] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  187.160710] brcmfmac: power management disabled
[  187.203910] brcmfmac: power management disabled
[  187.320559] brcmfmac: power management disabled
[  187.512835] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  187.512849] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  195.246278] brcmfmac: power management disabled
[  195.246598] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  195.279277] brcmfmac: power management disabled
[  195.409454] brcmfmac: power management disabled
[  195.594158] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  195.594172] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  203.324714] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  203.326942] brcmfmac: power management disabled
[  203.359158] brcmfmac: power management disabled
[  203.481803] brcmfmac: power management disabled
[  203.704375] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  203.704388] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  211.484669] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  211.489525] brcmfmac: power management disabled
[  211.527737] brcmfmac: power management disabled
[  211.690933] brcmfmac: power management disabled
[  211.884772] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  211.884786] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  221.794377] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  221.798118] brcmfmac: power management disabled
[  221.831062] brcmfmac: power management disabled
[  221.949023] brcmfmac: power management disabled
[  222.193267] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  222.193280] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  232.825236] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  232.827703] brcmfmac: power management disabled
[  232.860364] brcmfmac: power management disabled
[  232.990402] brcmfmac: power management disabled
[  233.232233] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  233.232248] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  245.355187] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  245.358086] brcmfmac: power management disabled
[  245.391201] brcmfmac: power management disabled
[  245.489794] brcmfmac: power management disabled
[  245.724638] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  245.724650] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  255.374798] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  255.376886] brcmfmac: power management disabled
[  255.409448] brcmfmac: power management disabled
[  255.500317] brcmfmac: power management disabled
[  255.673042] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  255.673054] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  265.386208] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  265.391344] brcmfmac: power management disabled
[  265.430006] brcmfmac: power management disabled
[  265.540338] brcmfmac: power management disabled
[  265.743104] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  265.743118] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  275.082430] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  275.091640] brcmfmac: power management disabled
[  275.132709] brcmfmac: power management disabled
[  275.280225] brcmfmac: power management disabled
[  275.473841] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  275.473856] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  283.745151] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  283.747864] brcmfmac: power management disabled
[  283.781355] brcmfmac: power management disabled
[  283.909395] brcmfmac: power management disabled
[  284.103943] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  284.103957] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  295.093098] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  295.100134] brcmfmac: power management disabled
[  295.139164] brcmfmac: power management disabled
[  295.290681] brcmfmac: power management disabled
[  295.502714] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  295.502727] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  302.034447] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  302.042887] brcmfmac: power management disabled
[  302.079228] brcmfmac: power management disabled
[  302.238290] brcmfmac: power management disabled
[  302.453006] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  302.453020] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  311.395604] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  311.396879] brcmfmac: power management disabled
[  311.430401] brcmfmac: power management disabled
[  311.570522] brcmfmac: power management disabled
[  311.783430] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  311.783443] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  318.434425] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  318.437297] brcmfmac: power management disabled
[  318.469738] brcmfmac: power management disabled
[  318.638982] brcmfmac: power management disabled
[  318.837024] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  318.837037] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  324.124752] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  324.129404] brcmfmac: power management disabled
[  324.161748] brcmfmac: power management disabled
[  324.269260] brcmfmac: power management disabled
[  324.482882] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  324.482895] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  333.965317] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  333.966961] brcmfmac: power management disabled
[  333.999953] brcmfmac: power management disabled
[  334.114254] brcmfmac: power management disabled
[  334.322467] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  334.322483] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  342.644735] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  342.646992] brcmfmac: power management disabled
[  342.679640] brcmfmac: power management disabled
[  342.800538] brcmfmac: power management disabled
[  343.002385] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  343.002399] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  353.045306] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  353.048042] brcmfmac: power management disabled
[  353.081202] brcmfmac: power management disabled
[  353.239401] brcmfmac: power management disabled
[  353.472847] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  353.472860] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  364.163518] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  364.167157] brcmfmac: power management disabled
[  364.208448] brcmfmac: power management disabled
[  364.360758] brcmfmac: power management disabled
[  364.556211] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  364.556224] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  372.344545] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  372.350608] brcmfmac: power management disabled
[  372.386702] brcmfmac: power management disabled
[  372.540729] brcmfmac: power management disabled
[  372.724682] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  372.724695] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  379.695248] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  379.697099] brcmfmac: power management disabled
[  379.731822] brcmfmac: power management disabled
[  379.849082] brcmfmac: power management disabled
[  380.065095] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  380.065109] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  386.665247] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  386.667167] brcmfmac: power management disabled
[  386.700082] brcmfmac: power management disabled
[  386.819082] brcmfmac: power management disabled
[  387.004148] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  387.004162] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  396.294878] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  396.297053] brcmfmac: power management disabled
[  396.329876] brcmfmac: power management disabled
[  396.449637] brcmfmac: power management disabled
[  396.664403] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  396.664416] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  405.924970] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  405.927279] brcmfmac: power management disabled
[  405.962292] brcmfmac: power management disabled
[  406.111659] brcmfmac: power management disabled
[  406.319465] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  406.319479] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  415.664772] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  415.666990] brcmfmac: power management disabled
[  415.699401] brcmfmac: power management disabled
[  415.829382] brcmfmac: power management disabled
[  416.052798] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  416.052820] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  426.884959] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  426.889100] brcmfmac: power management disabled
[  426.928399] brcmfmac: power management disabled
[  427.041127] brcmfmac: power management disabled
[  427.246089] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  427.246103] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  437.015801] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  437.017272] brcmfmac: power management disabled
[  437.051942] brcmfmac: power management disabled
[  437.159340] brcmfmac: power management disabled
[  437.393186] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  437.393198] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  448.249957] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  448.252026] brcmfmac: power management disabled
[  448.282182] brcmfmac: power management disabled
[  448.409623] brcmfmac: power management disabled
[  448.594590] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  448.594602] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  459.884843] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  459.888842] brcmfmac: power management disabled
[  459.926974] brcmfmac: power management disabled
[  460.074425] brcmfmac: power management disabled
[  460.303072] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  460.303087] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  469.675633] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  469.676631] brcmfmac: power management disabled
[  469.709642] brcmfmac: power management disabled
[  469.850976] brcmfmac: power management disabled
[  470.104602] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  470.104616] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  480.294459] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  480.298543] brcmfmac: power management disabled
[  480.342023] brcmfmac: power management disabled
[  480.469417] brcmfmac: power management disabled
[  480.673105] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  480.673118] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  490.525075] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  490.527052] brcmfmac: power management disabled
[  490.559919] brcmfmac: power management disabled
[  490.689934] brcmfmac: power management disabled
[  490.894733] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  490.894747] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  497.385115] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  497.386998] brcmfmac: power management disabled
[  497.420453] brcmfmac: power management disabled
[  497.560667] brcmfmac: power management disabled
[  497.754462] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  497.754475] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  505.625325] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  505.627703] brcmfmac: power management disabled
[  505.662606] brcmfmac: power management disabled
[  505.779536] brcmfmac: power management disabled
[  505.973051] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  505.973064] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  513.744643] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  513.750893] brcmfmac: power management disabled
[  513.786860] brcmfmac: power management disabled
[  513.889810] brcmfmac: power management disabled
[  514.094132] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  514.094146] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  523.285986] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  523.289526] brcmfmac: power management disabled
[  523.328730] brcmfmac: power management disabled
[  523.479416] brcmfmac: power management disabled
[  523.692781] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  523.692795] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  529.674438] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  529.679592] brcmfmac: power management disabled
[  529.720058] brcmfmac: power management disabled
[  529.830470] brcmfmac: power management disabled
[  530.030290] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  530.030306] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  535.277048] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  535.279400] brcmfmac: power management disabled
[  535.315367] brcmfmac: power management disabled
[  535.409760] brcmfmac: power management disabled
[  535.633512] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  535.633525] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  541.986316] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  541.986656] brcmfmac: power management disabled
[  542.020365] brcmfmac: power management disabled
[  542.172319] brcmfmac: power management disabled
[  542.407184] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  542.407199] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  551.184658] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  551.188004] brcmfmac: power management disabled
[  551.233399] brcmfmac: power management disabled
[  551.350029] brcmfmac: power management disabled
[  551.582981] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  551.582996] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  561.744737] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  561.747437] brcmfmac: power management disabled
[  561.780245] brcmfmac: power management disabled
[  561.901296] brcmfmac: power management disabled
[  562.153482] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  562.153496] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  572.415827] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  572.420660] brcmfmac: power management disabled
[  572.461647] brcmfmac: power management disabled
[  572.569736] brcmfmac: power management disabled
[  572.783168] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  572.783183] brcmfmac: brcmf_cfg80211_scan: scan error (-11)
[  583.254616] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[  583.257989] brcmfmac: power management disabled
[  583.290869] brcmfmac: power management disabled
[  583.410031] brcmfmac: power management disabled
[  583.614547] brcmfmac: brcmf_cfg80211_escan: Connecting: status (3)
[  583.614561] brcmfmac: brcmf_cfg80211_scan: scan error (-11)

You can watch this as well in registration table of the WiFi Access Point.

Bug

Most helpful comment

@k-plan
Love the extra info and colours. :+1: I'll add that in so it matches this style:
image

All 33 comments

@k-plan
I think there is a way to disable WiFi using a dtoverlay in config.txt. May of been just for bluetooth, i'll try and find out.
EDIT: yep it was for bluetooth https://openenergymonitor.org/emon/node/12311

The other method seems to be blacklisting the modules: http://raspberrypi.stackexchange.com/questions/43720/disable-wifi-wlan0-on-pi-3

I'll see which works

Disable WiFi (bluetooth untested):

cat << _EOF_ > /etc/modprobe.d/disable_rpi3_wifi.conf
blacklist brcmfmac
blacklist brcmutil
_EOF_

image

although, it doesn't physically disable the adapter hardware. Pretty sure theres no way to achieve this (yet).

Good, bluetooth still works when wifi modules disabled https://github.com/Fourdee/DietPi/issues/376#issuecomment-225567091:
image

disable bluetooth:

systemctl stop bluetooth
systemctl stop hciuart

systemctl disable bluetooth
systemctl disable hciuart

modprobe -rf bnep
modprobe -rf hci_uart
modprobe -rf btbcm
modprobe -rf bluetooth

cat << _EOF_ > /etc/modprobe.d/disable_rpi3_bt.conf
blacklist bnep
blacklist hci_uart
blacklist btbcm
blacklist bluetooth
_EOF_


enable bluetooth:

modprobe bnep
modprobe hci_uart
modprobe btbcm
modprobe bluetooth

systemctl enable bluetooth
systemctl enable hciuart

systemctl start bluetooth
systemctl start hciuart

rm /etc/modprobe.d/disable_rpi3_bt.conf

Ok done. DietPi will also control the wifi modules in dietpi-config, if you have a RPi3.

Added option for bluetooth control while I was there, in advanced menu:
image

@k-plan
I've tested both, but please let me know if its resolved the issue.

@Fourdee

I've tested both, but please let me know if its resolved the issue.

tested now about 12h, it works.

 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 DietPi     | 20:03 | Tue 14/06/16
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 V120       | RPi 3 Model B (armv7l)
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

root@RPi-UniFi:~# uname -a
Linux RPi-UniFi 4.4.13-v7+ #893 SMP Wed Jun 8 14:39:18 BST 2016 armv7l GNU/Linux

root@RPi-UniFi:~# dmesg | grep brcmf
root@RPi-UniFi:~#

Bluetooth enable and disable works as well. (only tested with wlan off)

  • Disable Bluetooth - works without reboot (on-the-fly)
  • Enable Bluetooth - works only after rebooting the device (reboot device message can/will be helpful)

Nice work Fourdee! :+1:

@k-plan
Thanks for the tests :+1:

Bluetooth enable and disable works as well. (only tested with wlan off)

Just tried on RPi3 with Wlan only connection and disabled bluetooth, works a treat :)

Will mark this as closed, please reopen as needed.

bluetooth enable, works only after rebooting the device

@k-plan
Bizzare, works straight away for me:
image

Might be the one of the services, if you can replicate it again, can you please try to run

systemctl status hciuart.service
systemctl status bluetooth.service
  • Bluetooth disabled:
root@RPi-UniFi:~# bluetoothctl
[bluetooth]#

  • Bluetooth enabled via dietpi-config:
Synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d bluetooth enable
Created symlink from /etc/systemd/system/dbus-org.bluez.service to /lib/systemd/system/bluetooth.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/hciuart.service to /lib/systemd/system/hciuart.service.

bluetooth

root@RPi-UniFi:~# bluetoothctl
[bluetooth]#
root@RPi-UniFi:~# systemctl status hciuart.service
? hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: failed (Result: exit-code) since Wed 2016-06-15 19:47:04 CEST; 2min 31s ago
  Process: 5777 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)

Jun 15 19:47:04 RPi-UniFi hciattach[5777]: Initialization timed out.
Jun 15 19:47:04 RPi-UniFi hciattach[5777]: bcm43xx_init
Jun 15 19:47:04 RPi-UniFi systemd[1]: hciuart.service: control process exited, code=exi...s=1
Jun 15 19:47:04 RPi-UniFi systemd[1]: Failed to start Configure Bluetooth Modems connec...RT.
Jun 15 19:47:04 RPi-UniFi systemd[1]: Unit hciuart.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
root@RPi-UniFi:~# systemctl status hciuart.service -l
โ— hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: failed (Result: exit-code) since Wed 2016-06-15 19:47:04 CEST; 10min ago
  Process: 5777 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)

Jun 15 19:47:04 RPi-UniFi hciattach[5777]: Initialization timed out.
Jun 15 19:47:04 RPi-UniFi hciattach[5777]: bcm43xx_init
Jun 15 19:47:04 RPi-UniFi systemd[1]: hciuart.service: control process exited, code=exited status=1
Jun 15 19:47:04 RPi-UniFi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Jun 15 19:47:04 RPi-UniFi systemd[1]: Unit hciuart.service entered failed state.

root@RPi-UniFi:~# systemctl status bluetooth.service
? bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Wed 2016-06-15 19:46:34 CEST; 3min 50s ago
     Docs: man:bluetoothd(8)
 Main PID: 5768 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           +-5768 /usr/lib/bluetooth/bluetoothd

Jun 15 19:46:34 RPi-UniFi systemd[1]: Started Bluetooth service.

root@RPi-UniFi:~# lsmod
Module                  Size  Used by
hci_uart               17943  0
btbcm                   5929  1 hci_uart
bnep                   10340  2
bluetooth             326105  7 bnep,btbcm,hci_uart
cfg80211              427855  0
rfkill                 16037  3 cfg80211,bluetooth
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
evdev                  11396  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   83461  1
ipv6                  347530  47
root@RPi-UniFi:~# dmesg
 . . .
[86475.194697] Bluetooth: Core ver 2.21
[86475.194751] NET: Registered protocol family 31
[86475.194756] Bluetooth: HCI device and connection manager initialized
[86475.194770] Bluetooth: HCI socket layer initialized
[86475.194778] Bluetooth: L2CAP socket layer initialized
[86475.194796] Bluetooth: SCO socket layer initialized
[86475.195592] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[86475.195600] Bluetooth: BNEP filters: protocol multicast
[86475.195610] Bluetooth: BNEP socket layer initialized
[86475.202134] Bluetooth: HCI UART driver ver 2.3
[86475.202147] Bluetooth: HCI UART protocol H4 registered
[86475.202152] Bluetooth: HCI UART protocol Three-wire (H5) registered
[86475.202240] Bluetooth: HCI UART protocol BCM registered

@Fourdee

is it possible or reasonable to disable/blacklist modul cfg80211 as well, then we disable build-in wifi adapter?

@k-plan

Yep, makes sense, will free up 427.85KB. I'll take a look.

@k-plan
Its in. Also not RPi 3 specific anymore, all devices will have cfg80211 and bluetooth modules controlled by DietPi.

root@DietPi:~# lsmod
Module                  Size  Used by
brcmfmac              186343  0
brcmutil                5661  1 brcmfmac
cfg80211              427855  1 brcmfmac
rfkill                 16037  1 cfg80211
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   83461  1
ipv6                  347530  20
root@DietPi:~# /DietPi/dietpi/func/dietpi-set_wifi_bt wifi 0
root@DietPi:~# lsmod
Module                  Size  Used by
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   83461  1
ipv6                  347530  20
root@DietPi:~# /DietPi/dietpi/func/dietpi-set_wifi_bt wifi 1
root@DietPi:~# lsmod
Module                  Size  Used by
brcmfmac              186343  0
brcmutil                5661  1 brcmfmac
cfg80211              427855  1 brcmfmac
rfkill                 16037  1 cfg80211
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   83461  1
ipv6                  347530  20

@Fourdee

  • updating to the last v.120 testing build.
  • disable and re-enable Bluetooth and WiFi via dietpi-config
synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d bluetooth enable
Created symlink from /etc/systemd/system/dbus-org.bluez.service to /lib/systemd/system/bluetooth.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/hciuart.service to /lib/systemd/system/hciuart.service.

160619-0001

160619-0002

160619-0003

  • TESTING:
root@RPi-UniFi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    . . .

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    . . .

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
     . . .


root@RPi-UniFi:~# bluetoothctl
[bluetooth]# show
No default controller available
[bluetooth]#


root@RPi-UniFi:~# lsmod
Module                  Size  Used by
hci_uart               17943  0
btbcm                   5929  1 hci_uart
bnep                   10340  2
bluetooth             326105  7 bnep,btbcm,hci_uart
brcmfmac              186343  0
brcmutil                5661  1 brcmfmac
cfg80211              427855  1 brcmfmac
rfkill                 16037  4 cfg80211,bluetooth
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
evdev                  11396  0
fuse                   83461  1
ipv6                  347530  49


root@RPi-UniFi:~# systemctl status hciuart.service
โ— hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: failed (Result: exit-code) since Sun 2016-06-19 13:37:16 CEST; 6min ago
  Process: 7083 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)

Jun 19 13:37:16 RPi-UniFi hciattach[7083]: Initialization timed out.
Jun 19 13:37:16 RPi-UniFi hciattach[7083]: bcm43xx_init
Jun 19 13:37:16 RPi-UniFi systemd[1]: hciuart.service: control process exited, code=exited status=1
Jun 19 13:37:16 RPi-UniFi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Jun 19 13:37:16 RPi-UniFi systemd[1]: Unit hciuart.service entered failed state.


root@RPi-UniFi:~# systemctl status bluetooth.service
โ— bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: active (running) since Sun 2016-06-19 13:36:46 CEST; 7min ago
     Docs: man:bluetoothd(8)
 Main PID: 7059 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           โ””โ”€7059 /usr/lib/bluetooth/bluetoothd

Jun 19 13:36:46 RPi-UniFi systemd[1]: Started Bluetooth service.


root@RPi-UniFi:~# logread | grep blue
Jun 19 13:36:46 RPi-UniFi daemon.info bluetoothd[7059]: Bluetooth daemon 5.23
Jun 19 13:36:46 RPi-UniFi daemon.info bluetoothd[7059]: Starting SDP server
Jun 19 13:36:46 RPi-UniFi daemon.notice dbus[462]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Jun 19 13:36:46 RPi-UniFi daemon.info bluetoothd[7059]: Bluetooth management interface 1.10 initialized
Jun 19 13:36:46 RPi-UniFi daemon.notice dbus[462]: [system] Successfully activated service 'org.freedesktop.hostname1'


root@RPi-UniFi:~# dmesg | grep Blue
[  611.975797] Bluetooth: Core ver 2.21
[  611.975847] Bluetooth: HCI device and connection manager initialized
[  611.975862] Bluetooth: HCI socket layer initialized
[  611.975870] Bluetooth: L2CAP socket layer initialized
[  611.975889] Bluetooth: SCO socket layer initialized
[  611.979953] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  611.979963] Bluetooth: BNEP filters: protocol multicast
[  611.979976] Bluetooth: BNEP socket layer initialized
[  611.992255] Bluetooth: HCI UART driver ver 2.3
[  611.992268] Bluetooth: HCI UART protocol H4 registered
[  611.992273] Bluetooth: HCI UART protocol Three-wire (H5) registered
[  611.992375] Bluetooth: HCI UART protocol BCM registered

  • SUMMARY: wifi - works / bluetooth - not working

  • NOW: root@RPi-UniFi:~# reboot
root@RPi-UniFi:~# bluetoothctl
[bluetooth]#


root@RPi-UniFi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
     . . .

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
     . . .


root@RPi-UniFi:~# lsmod
Module                  Size  Used by
cfg80211              427855  0
rfkill                 16037  1 cfg80211
sg                     18319  0
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
evdev                  11396  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   83461  1
ipv6                  347530  32


root@RPi-UniFi:~# logread | grep blue
Jun 19 13:52:50 RPi-UniFi daemon.notice dbus[452]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
Jun 19 13:52:50 RPi-UniFi daemon.info bluetoothd[1354]: Bluetooth daemon 5.23
Jun 19 13:52:50 RPi-UniFi daemon.notice dbus[452]: [system] Successfully activated service 'org.bluez'
Jun 19 13:52:50 RPi-UniFi daemon.err bluetoothd[1354]: Failed to access management interface
Jun 19 13:52:50 RPi-UniFi daemon.err bluetoothd[1354]: Adapter handling initialization failed

160619-0001

160619-0004

160619-0005

  • SUMMARY after reboot: wifi - not working, dietpi-config : all setting lost, Scan and Connect doesn't work / bluetooth - not working

@k-plan
Thanks, i'll take a look :+1:

Fresh installation of the testing branch on RPi 3. 1st run setup completed.

Enabled Bluetooth via dietpi-config:

root@DietPi:~# bluetoothctl
[NEW] Controller B8:27:EB:24:F9:F1 DietPi [default]
[bluetooth]#

Enabled WiFi via dietpi-config:

root@DietPi:~# bluetoothctl
[NEW] Controller B8:27:EB:24:F9:F1 DietPi [default]
[bluetooth]#

root@DietPi:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    1      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     1      0        0 wlan0

All appear to be working ok

Reboot

Bluetooth:

root@DietPi:~# bluetoothctl
[NEW] Controller B8:27:EB:24:F9:F1 DietPi [default]
[bluetooth]# exit
[DEL] Controller B8:27:EB:24:F9:F1 DietPi [default]

WiFi:
image

root@DietPi:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    1      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     1      0        0 wlan0

All appear to be working ok

@k-plan
I'am stumped. I can't replicate the same issues. If you get time, I'd be extremely grateful if you could do a fresh installation using testing branch in dietpi.txt, then run the tests again.

Some additional notes/questions:

  • After enabling bluetooth and running bluetoothctl , if nothing appears, try running power on
  • WiFi country code, was yours set, or 00? If your using WiFi channel 12/13, 00 will prevent connection.
  • Did you run these tests after DietPi had finished the "1st run setup", or during?
  • Any changes to dietpi.txt or config.txt prior to "1st run setup"?

Thanks @k-plan :+1:

EDIT: I see your running static for wifi, let me test. Rebooted, still fine, details correct in dietpi-config.

@Fourdee

I'am stumped. I can't replicate the same issues. If you get time, I'd be extremely grateful if you could do a fresh installation using testing branch in dietpi.txt, then run the tests again.

Yes, I can/will do this, when I am back at home. Sorry, but not today.

After enabling bluetooth and running bluetoothctl , if nothing appears, try runningpower on

root@RPi-UniFi:~# bluetoothctl
[bluetooth]# power on
No default controller available

WiFi country code, was yours set, or 00? If your using WiFi channel 12/13, 00 will prevent connection.

WiFi country code is set to DE, channel is:

root@RPi-UniFi:~# iwlist wlan0 freq
wlan0     13 channels in total; available frequencies :
           . . .
          Current Frequency:2.412 GHz (Channel 1)

wifi

Did you run these tests after DietPi had finished the "1st run setup", or during?

YES, after 1st run setup, with automated installation of mc, iperf, mtr-tiny and tcpdump.

Any changes to dietpi.txt or config.txt prior to "1st run setup"?

  • dietpi.txt (it is the versoin of the testing branch, like you told me before) => NO change by hand after "1st run setup"

    • config.txt => NO change by edit before and after "1st run setup"

On RPi3 I have only install this by hand:
http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/

I see your running static for wifi, let me test

NO, I using DHCP on wifi, but static on eth0


My Testing:

  • Disable bluetooth and wifi
  • reboot
  • enable bluetooth ONLY via dietpi-config and testing; work!
root@RPi-UniFi:~# bluetoothctl
[NEW] Controller B8:27:EB:6B:xx:xx RPi-UniFi [default]
[bluetooth]# exit
[DEL] Controller B8:27:EB:6B:xx:xx RPi-UniFi [default]
root@RPi-UniFi:~#
  • enable wifi via dietpi-config and testing; work!
root@RPi-UniFi:~# iwlist wlan0 rate
wlan0     unknown bit-rate information.
          Current Bit Rate=65 Mb/s
  • going back to dietpi-config and looking for bluetooth
  • it is disable now?!?
    bluetooth-off
  • re-enable bluetooth ONLY via dietpi-config (now it show:Bluetooth : Enabled) and testing; NOT working!

bluetooth

root@RPi-UniFi:~# bluetoothctl
[bluetooth]# power on
No default controller available

@k-plan
Thanks again :+1: , very strange, i'll take another look and see if I can replicate it.

My Testing:

  • Disable bluetooth and wifi
  • reboot
  • enable bluetooth ONLY via dietpi-config and testing; work
  • enable wifi via dietpi-config and testing; work!
  • going back to dietpi-config and looking for bluetooth
  • it is disable now?!?

Bluetooth was still enabled for me. Must be a service failing.

@k-plan Any chance I could SSH into this system and debug? Or even VNC/Remote desktop, you'll be able to see what I'am doing.

Sorry for the late reply, a long hard week with a lot of work ...

Testing clean install with the brand new v120 - The big one! on RPi3.

Same result. Switching many times between Bluetooth on-off and WiFi on-off.
Some times Bluetooth enabling fails.
But the is no regularity distinguishable.

When switching Bluetooth off-on and the terminal windows appears noticeable longer such as switching before, in this cases bluetoothctl fails.
Thinking, it can be a timing/timeout problem.

Any chance I could SSH into this system and debug?

Yes. The "old" or the "new" one?

Or even VNC/Remote desktop, you'll be able to see what I'am doing.

Yes, like to prefer to see what you are doing. ๐Ÿ˜‰

To my computer desktop or the the desktop on RPi3?
VNC or NoMachine Client?
Can we chat for this session? Email?

@k-plan

Sorry for the late reply, a long hard week with a lot of work ...

No worries, hopefully you had a good weekend to make up for it ? :)

To my computer desktop or the the desktop on RPi3?
VNC or NoMachine Client?
Can we chat for this session? Email?

Thanks. I'll send you an email @k-plan :+1:

@k-plan
I sent you an email a few days ago, might of gone to your spam folder, please let me know if you got it :)

Will take this out of milestone for now.

@k-plan
I managed to replicate the same error (took a while lol):+1:
Ran some tests today to try and debug why the bluetooth hciattach service is failing "sometimes".

So instead of trying to start the hciuart service, i modified the code to run the command manually:

#systemctl enable hciuart
#systemctl start hciuart
/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

All we get from hciattach output is:

bcm43xx_init
Initialization timed out.

So again, nothing really to go on.

But if we run the command after it fails, works everytime:

root@DietPi:~# /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
bcm43xx_init
Flash firmware /lib/firmware/BCM43430A1.hcd
Set Controller UART speed to 921600 bit/s
Device setup complete

So, it feels like something isn't ready in time and prevents hciattach from starting. It could even be a bug in hciattach, or a RPi/BT hardware/firmware issue.

Workaround, restart service at most 3 times if it fails:

            # + RPi 3
            if (( $HW_MODEL == 3 )); then

                systemctl enable hciuart

                #Start service again, if it fails: https://github.com/Fourdee/DietPi/issues/376#issuecomment-230149754
                loop_count=0
                max_count=3
                while (( $(systemctl start hciuart;echo $?) != 0 ))
                do

                    if (( $loop_count >= $max_count )); then
                        echo -e "\nERROR: hciuart failed to start after $loop_count attempts\n"
                        break
                    else
                        echo -e "\nINFO: hciuart failed to start. Attempting to restart it...\n"
                        ((loop_count++))
                        sleep 1
                    fi

                done

                #/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

            fi

Test results:

root@DietPi:~# /DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 0 && /DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 1 && systemctl status hciuart -l
Synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
Executing /usr/sbin/update-rc.d bluetooth disable
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Removed symlink /etc/systemd/system/dbus-org.bluez.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/hciuart.service.
Synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d bluetooth enable
Created symlink from /etc/systemd/system/dbus-org.bluez.service to /lib/systemd/system/bluetooth.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/hciuart.service to /lib/systemd/system/hciuart.service.
Job for hciuart.service failed. See 'systemctl status hciuart.service' and 'journalctl -xn' for details.

INFO: hciuart failed to start. Attempting to restart it...

โ— hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: active (running) since Sun 2016-07-03 13:21:32 BST; 17ms ago
  Process: 3433 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=0/SUCCESS)
 Main PID: 3440 (hciattach)
   CGroup: /system.slice/hciuart.service
           โ””โ”€3440 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

Jul 03 13:21:32 DietPi hciattach[3433]: bcm43xx_init
Jul 03 13:21:32 DietPi hciattach[3433]: Flash firmware /lib/firmware/BCM43430A1.hcd
Jul 03 13:21:32 DietPi hciattach[3433]: Set Controller UART speed to 921600 bit/s
Jul 03 13:21:32 DietPi hciattach[3433]: Device setup complete
Jul 03 13:21:32 DietPi systemd[1]: Started Configure Bluetooth Modems connected by UART.

Not ideal, but it works.

@Fourdee

I managed to replicate the same error (took a while lol) ๐Ÿ‘

Thanks! So I have getting self-doubt on my sense over the time ... thinking I have illusion. ๐Ÿ˜„

Should I manual edit nano /DietPi/dietpi/func/dietpi-set_wifi_bt and test it?

Or will you put it in :

gitbranch=testing
gitforkowner=Fourdee

โ“

@k-plan
I've uploaded it to testing branch, so you could run to update:

wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/dietpi/func/dietpi-set_wifi_bt -O /DietPi/dietpi/func/dietpi-set_wifi_bt

Then give it a whirl in dietpi-config, or,

/DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 0 && /DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 1 && systemctl status hciuart -l
root@RPi-3-test:~# wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/dietpi/func/dietpi-set_wifi_bt -O /DietPi/dietpi/func/dietpi-set_wifi_bt
--2016-07-03 15:03:25--  https://raw.githubusercontent.com/Fourdee/DietPi/testing/dietpi/func/dietpi-set_wifi_bt
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.12.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.12.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3762 (3.7K) [text/plain]
Saving to: โ€˜/DietPi/dietpi/func/dietpi-set_wifi_btโ€™

/DietPi/dietpi/func/dietpi-set_wifi_bt    100%[=====================================================================================>]   3.67K  --.-KB/s   in 0s

2016-07-03 15:03:25 (12.9 MB/s) - โ€˜/DietPi/dietpi/func/dietpi-set_wifi_btโ€™ saved [3762/3762]



root@RPi-3-test:~# /DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 0 && /DietPi/dietpi/func/dietpi-set_wifi_bt bluetooth 1 && systemctl status hciuart -l
Synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
Executing /usr/sbin/update-rc.d bluetooth disable
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Removed symlink /etc/systemd/system/dbus-org.bluez.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/hciuart.service.
Synchronizing state for bluetooth.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d bluetooth defaults
insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d bluetooth enable
Created symlink from /etc/systemd/system/dbus-org.bluez.service to /lib/systemd/system/bluetooth.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/hciuart.service to /lib/systemd/system/hciuart.service.
Job for hciuart.service failed. See 'systemctl status hciuart.service' and 'journalctl -xn' for details.

INFO: hciuart failed to start. Attempting to restart it...

โ— hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: active (running) since Sun 2016-07-03 15:04:23 CEST; 31ms ago
  Process: 1997 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=0/SUCCESS)
 Main PID: 2004 (hciattach)
   CGroup: /system.slice/hciuart.service
           โ””โ”€2004 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

Jul 03 15:04:23 RPi-3-test hciattach[1997]: bcm43xx_init
Jul 03 15:04:23 RPi-3-test hciattach[1997]: Flash firmware /lib/firmware/BCM43430A1.hcd
Jul 03 15:04:23 RPi-3-test hciattach[1997]: Set Controller UART speed to 921600 bit/s
Jul 03 15:04:23 RPi-3-test hciattach[1997]: Device setup complete
Jul 03 15:04:23 RPi-3-test systemd[1]: Started Configure Bluetooth Modems connected by UART.


root@RPi-3-test:~# bluetoothctl
[NEW] Controller B8:27:EB:xx:xx:xx RPi-3-test [default]
[bluetooth]#

Some mods:

                        # + RPi 3
                        if (( $HW_MODEL == 3 )); then

                                systemctl enable hciuart

                                #Start service again, if it fails: https://github.com/Fourdee/DietPi/issues/376#issuecomment-230149754
                                loop_count=0
                                max_count=3

                                ##User message:
                                echo -e "\nINFO: \033[1;31m Starting Bluetooth Services. Please be patient ... \033[0m \n "

                                while (( $(systemctl start hciuart;echo $?) != 0 ))
                                do

                                        if (( $loop_count >= $max_count )); then
                                                echo -e "\nERROR: hciuart failed to start after $loop_count attempts\n"
                                                break
                                        else
                                                echo -e "\nINFO: hciuart failed to start. Attempting to restart it...\n"
                                                ((loop_count++))
                                                sleep 1
                                        fi

                                ##User message:
                                echo -e "\nINFO: \033[1;32m  Done! Bluetooth Services was started with success! \033[0m \n"
                                sleep 3

                                done

                                #/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

                        fi

Result:

160703-0001

๐Ÿ˜ƒ

@k-plan
Love the extra info and colours. :+1: I'll add that in so it matches this style:
image

@Fourdee

Yes! ๐Ÿ‘

You are the men for styling - I have only hunting the bugs .... ๐Ÿ˜†

_BTW: this will be as well helpful for:_

root@RPi-3-test:~# /DietPi/dietpi/func/dietpi-set_wifi_bt wifi 0 && /DietPi/dietpi/func/dietpi-set_wifi_bt wifi 1
Please wait, enabling WiFi Modules...

Working on a function script so we can use a "global" style, across all DietPi scripts. should clean up the code and keep everything identical :
image
Been meaning to do this for a while, nows the perfect time :+1:

@k-plan
image

Ok, failed bluetooth hciuart issue now resolved with service check, marking this as closed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k-plan picture k-plan  ยท  3Comments

bhaveshgohel picture bhaveshgohel  ยท  3Comments

aesirteam picture aesirteam  ยท  3Comments

Kapot picture Kapot  ยท  3Comments

pfeerick picture pfeerick  ยท  3Comments