Jump to content

Cubietruck - how to disable WIFI and Bluetooth completely ?


EtlARM

Recommended Posts

I have Armbian_4.5_Cubietruck_Debian_jessie_3.4.109 running from NAND on my Cubietruck.

Boot, reboot and shutdown are very slow. I assume that this is caused by this bug:

 

Wifi module unloading fails. This is usually not a problem, except in Jessie where shutdown takes a bit longer.

 

As I do not need WIFI and Bluetooth ...

  • Is it possible to remove WIFI and Bluetooth completely? How?
  • Would that help with the mentioned problem?
  • Is it ensured, that the WIFI and Bluetooth hardware modules are shutoff / power save when disabled?

 

P.S.: great work Igor

Link to comment
Share on other sites

Thanks for the list with possible modules! Disable of ap6210 was gaining 95 seconds in my case.

This module seems to have still some problems but development is frozen since a year...

 

But back to the other part of my question, is it better power consumption wise:

  • to disable an unused WIFI module (not loading the driver at all)
  • or to load the module, but to switch it off afterwards
Link to comment
Share on other sites

I think that not loading drivers should work.

I looked at ap6210 hardware specifications and cubietruck schematics, and its default state (with WL_REG_ON and BT_RST_N inputs both LOW) is the most power saving - both WLAN and BT sections are disabled.

WL_REG_ON is connected to PH9, BT_RST_N is connected to PH18.

To be sure, remove PH18 from [gpio_para] section in your fex/bin (also decrement gpio_num value there)

gpio_pin_68 = port:PH18<0><default><default><0>

And set

wifi_used          = 0
bt_used             = 0

Edit: since there are no pull-down resistors and default pin state is floating, it may be better to set both specified pins as OUTPUT LOW in fex file.

https://linux-sunxi.org/Fex_Guide#Port_Definitions

https://linux-sunxi.org/Fex_Guide#.5Bgpio_para.5D

https://linux-sunxi.org/Fex_Guide#.5Bgpio_init.5D

Link to comment
Share on other sites

I double checked the schematics and agree to your opinion.

PH18 and PH09 are used multiple times in the script.fex file:

gpio_pin_68     = port:PH18<0><default><default><0>
lcdd18          = port:PH18<2><0><default><default>
csi_stby_b      = port:PH18<1><default><default><0>
smc_sck         = port:PH18<5><default><default><default>
kp_out0         = port:PH18<4><1><default><default>
ap6xxx_bt_regon = port:PH18<1><default><default><0>
gy_int1         = port:PH18<6><1><default><default>

lcdd9           = port:PH09<2><0><default><default>
ms_d1           = port:PH09<5><default><default><default>
kp_in1          = port:PH09<4><1><default><default>
ap6xxx_wl_regon = port:PH09<1><default><default><0>

Italic lines are from unused blocks and should not matter. The bold lines are from WiFi, configured as output and already have a default value 0. Therefore it should work without changes.

Link to comment
Share on other sites

Italic and bold are not working in code blocks  :)

 

Shit, this was visible in the editor...

For the history: both lines starting with "ap6xxx_" were ment to be bold and the rest italic.

 

I didn't mention these lines because csi, smc, lcd, mmc and whatever else are disabled by default.

If wifi_used and bt_used are disabled, I'm not sure if pin settings in this block will have any effect, so it's better to set them in gpio or gpio_init explicitly.

 

I would also assume, that all lines in a disabled section are not processed.

 

Therefore I kept wifi_used and bt_used enabled. As the modules are not loaded, nothing should change the pin state also. It would be the easiest way for me to remember at next setup: just disable the modules and keep everything in script.fex as it is.

 

 

In case someone would like to do the modification to the gpio pins directly, the complete section in script.fex would look like this:

[gpio_para]
gpio_used = 1
gpio_num  = 5
gpio_pin_1  = port:PH20<1><default><default><1>
gpio_pin_2  = port:PH10<0><default><default><0>
gpio_pin_9  = port:PH09<1><default><default><0>
gpio_pin_68 = port:PH18<1><default><default><0>
gpio_pin_69 = port:PH24<0><default><default><0>

Please notice, that there is a <1> after the pin name to set them as output.

Link to comment
Share on other sites

On mainline kernel you need to blacklist modules that are loading without entry in /etc/modules.

Create file /etc/modprobe.d/wireless-blacklist.conf and put this in it to disable Wi-Fi:

blacklist brcmfmac
blacklist brcmutil

And you still need to comment rfcomm line in /etc/modules to disable bluetooth

 

For kernel 4.9 is this still valid? or should I just comment rfcomm and brcmfmac lines in /etc/modules

@cubietruck:~$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

brcmfmac
rfcomm
hidp
bonding
Link to comment
Share on other sites

I would be interested in how to disable WLAN ... I connected my cubietruck to my Amazon Echo Dot via Bluetooth because wanted to use the Echo Dot as Speaker and now I have distortion and clicks in the output and one idea is that WLAN interferes there ...

I use 5.25 vanilla kernel ... so also the 4.9. Any idea?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines