BPI-M2U-bsp AP6212 bcmdhd load issue

Greetings, Trying to make build BPI-M2U-bsp.

Having trouble with drivers for AP6212 & FT5x_ts. Ubuntu: 16.04.01 clean rootfs.

Any ideas?

firmware and nvram.txt and config.txt are in /lib/firmware/ap6212 folder. Builded modules from BPI-M2U-bsp. build.sh

Kernel is configured by …bpi_defconfig and in there everything looks OK for bcmdhd, everything is enabled.

Using pack script and PhoenixCard to create image:

What am I missing?

Fex Conf for WIFI: 

[wlan]
wlan_used                            = 1
compatible                        = "allwinner,sunxi-wlan"
clocks                = "outa"
;pinctrl-names                    = "default"
;bt_clk_gpio                        = port:PI12<4><0><0><0>
wlan_power            = "vcc-wifi"
wlan_io_regulator         = "vcc-io-wifi"
wlan_busnum                        = 1
wlan_regon                        = port:PG10<1><1><1><0>
wlan_hostwake                    = port:ower0<0><default><default><default>

;--------------------------------------------------------------------------------
;bt configuration
;clocks:                            32k clk
;bt_power:                        bt power
;wlan_io_regulator:        the power of bt io
;bt_rst_n:                  bt function enable io
;status:                            okay
;--------------------------------------------------------------------------------
[bt]
bt_used                                = 1
compatible                        = "allwinner,sunxi-bt"
clocks                                 = "outa"
pinctrl-names                    = "default"
clock_io                            = port:PI12<4><0><0><0>
bt_power                             = "vcc-wifi-2"
bt_io_regulator             = "vcc-io-wifi"
bt_rst_n                            = port:PH12<1><1><1><0>

;--------------------------------------------------------------------------------
;btlpm configuration
;uart_index:                    uart0, uart1 or uart3
;bt_wake:                   host wake-up bluetooth device
;bt_wak_host:               bt device wake-up host
;status:                            okay
;--------------------------------------------------------------------------------
[btlpm]
btlpm_used                        = 0
compatible                        = "allwinner,sunxi-btlpm"
uart_index                        = 3
bt_wake               = port:PG11<1><1><1><0>
bt_host_wake          = port:power1<0><default><default><default>

[sdc1]
sdc1_used          = 1
bus-width	= 4
sdc1_clk           = port:PG00<4><1><3><default>
sdc1_cmd           = port:PG01<4><1><3><default>
sdc1_d0            = port:PG02<4><1><3><default>
sdc1_d1            = port:PG03<4><1><3><default>
sdc1_d2            = port:PG04<4><1><3><default>
sdc1_d3            = port:PG05<4><1><3><default>
;sunxi-power-save-mode =
sd-uhs-sdr50			=
sd-uhs-ddr50			=
sd-uhs-sdr104			=
cap-sdio-irq			=
keep-power-in-suspend	=
ignore-pm-notify	=
max-frequency	   = 150000000


modprobe: ERROR: could not inser 'bcmdhd': No such device
Output from dmesg: 
sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1104.440892] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1104.448462] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1104.455539] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1104.457998] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1104.459804] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !!
[ 1104.466951] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing LEGACY(SDR12) dt B
[ 1104.475998] sdio_read_cis: 2 callbacks suppressed
[ 1104.476006] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1104.477514] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1104.479021] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1104.481736] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1104.574418] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1104.574584] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1104.574826] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 4 timing SD-HS(SDR25) dt B
[ 1104.578045] mmc2: new high speed SDIO card at address 0001
[ 1104.740104] wifi_platform_bus_enumerate device present 1
[ 1104.740143] sunxi-wlan wlan: bus_index: 1
[ 1104.740148] ======== Card detection to detect SDIO card! ========
[ 1106.740160] failed to power up DHD generic adapter, 3 retry left
[ 1106.756976] wifi_platform_set_power = 0
[ 1106.757002] ======== PULL WL_REG_ON LOW! ========
[ 1106.757466] wifi_platform_bus_enumerate device present 0
[ 1106.757502] sunxi-wlan wlan: bus_index: 1
[ 1106.757514] ======== Card detection to remove SDIO card! ========
[ 1106.757781] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1106.766349] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1106.774815] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1106.783234] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1106.791851] dummy_sdmmc: probe of mmc2:0001:1 failed with error -123
[ 1106.791970] dummy_sdmmc: probe of mmc2:0001:2 failed with error -123
[ 1106.792599] wifi_platform_set_power = 1
[ 1106.792613] ======== PULL WL_REG_ON HIGH! ========
[ 1106.793026] mmc2: card 0001 removed
[ 1106.793044] sunxi-wlan wlan: check wlan wlan_power voltage: 3300000
[ 1106.793516] sunxi-wlan wlan: check wlan io_regulator voltage: 2700000
[ 1106.793560] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 1106.794668] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1106.810064] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1106.830875] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1106.838636] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1106.845514] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1106.847966] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1106.849841] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !!
[ 1106.857076] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing LEGACY(SDR12) dt B
[ 1106.866230] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1106.867753] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1106.869276] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1106.872013] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1106.958769] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1106.958915] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1106.959131] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 4 timing SD-HS(SDR25) dt B
[ 1106.962376] mmc2: new high speed SDIO card at address 0001
[ 1107.110249] wifi_platform_bus_enumerate device present 1
[ 1107.110287] sunxi-wlan wlan: bus_index: 1
[ 1107.110299] ======== Card detection to detect SDIO card! ========
[ 1109.110345] failed to power up DHD generic adapter, 2 retry left
[ 1109.127198] wifi_platform_set_power = 0
[ 1109.127228] ======== PULL WL_REG_ON LOW! ========
[ 1109.127685] wifi_platform_bus_enumerate device present 0
[ 1109.127721] sunxi-wlan wlan: bus_index: 1
[ 1109.127734] ======== Card detection to remove SDIO card! ========
[ 1109.127997] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1109.136595] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1109.145018] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1109.153462] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1109.161902] dummy_sdmmc: probe of mmc2:0001:1 failed with error -123
[ 1109.162007] dummy_sdmmc: probe of mmc2:0001:2 failed with error -123
[ 1109.162429] wifi_platform_set_power = 1
[ 1109.162442] ======== PULL WL_REG_ON HIGH! ========
[ 1109.162840] sunxi-wlan wlan: check wlan wlan_power voltage: 3300000
[ 1109.163286] sunxi-wlan wlan: check wlan io_regulator voltage: 2700000
[ 1109.163354] mmc2: card 0001 removed
[ 1109.163578] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 1109.164643] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1109.180212] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1109.200928] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1109.208689] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1109.215566] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1109.218019] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1109.219916] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !!
[ 1109.227149] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing LEGACY(SDR12) dt B
[ 1109.236383] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1109.237911] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1109.328978] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1109.329141] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1109.329368] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 4 timing SD-HS(SDR25) dt B
[ 1109.333419] mmc2: new high speed SDIO card at address 0001
[ 1109.480220] wifi_platform_bus_enumerate device present 1
[ 1109.480271] sunxi-wlan wlan: bus_index: 1
[ 1109.480300] ======== Card detection to detect SDIO card! ========
[ 1111.480159] failed to power up DHD generic adapter, 1 retry left
[ 1111.497066] wifi_platform_set_power = 0
[ 1111.497093] ======== PULL WL_REG_ON LOW! ========
[ 1111.497523] wifi_platform_bus_enumerate device present 0
[ 1111.497560] sunxi-wlan wlan: bus_index: 1
[ 1111.497572] ======== Card detection to remove SDIO card! ========
[ 1111.497811] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1111.506313] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1111.514638] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1111.522410] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1111.530267] dummy_sdmmc: probe of mmc2:0001:1 failed with error -123
[ 1111.530364] dummy_sdmmc: probe of mmc2:0001:2 failed with error -123
[ 1111.531112] wifi_platform_set_power = 1
[ 1111.531127] ======== PULL WL_REG_ON HIGH! ========
[ 1111.531362] mmc2: card 0001 removed
[ 1111.531628] sunxi-wlan wlan: check wlan wlan_power voltage: 3300000
[ 1111.531854] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 1111.532104] sunxi-wlan wlan: check wlan io_regulator voltage: 2700000
[ 1111.533160] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1111.550130] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1111.570860] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1111.578481] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1111.585445] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1111.587900] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1111.589706] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !!
[ 1111.596815] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing LEGACY(SDR12) dt B
[ 1111.605852] sdio_read_cis: 2 callbacks suppressed
[ 1111.605861] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1111.607368] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1111.608876] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1111.611595] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1111.698010] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1111.698117] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 1 timing SD-HS(SDR25) dt B
[ 1111.698324] sunxi-mmc sdc1: sdc set ios: clk 50000000Hz bm PP pm ON vdd 8 width 4 timing SD-HS(SDR25) dt B
[ 1111.701703] mmc2: new high speed SDIO card at address 0001
[ 1111.870115] wifi_platform_bus_enumerate device present 1
[ 1111.870152] sunxi-wlan wlan: bus_index: 1
[ 1111.870165] ======== Card detection to detect SDIO card! ========
[ 1113.870167] failed to power up DHD generic adapter, 0 retry left
[ 1113.886987] wifi_platform_set_power = 0
[ 1113.887014] ======== PULL WL_REG_ON LOW! ========
[ 1113.887437] wifi_platform_bus_enumerate device present 0
[ 1113.887473] sunxi-wlan wlan: bus_index: 1
[ 1113.887485] ======== Card detection to remove SDIO card! ========
[ 1113.887549] failed to power up DHD generic adapter, max retry reached**
[ 1113.887592] unregister wifi platform drivers
[ 1113.887605] wifi_platform_bus_enumerate device present 0
[ 1113.887623] sunxi-wlan wlan: bus_index: 1
[ 1113.887634] ======== Card detection to remove SDIO card! ========
[ 1113.887649] dhd_module_init: Failed to load the driver, try cnt 0
[ 1113.887700] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1113.896203] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1113.904632] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1113.912878] sunxi-mmc sdc1: smc 2 p1 err, cmd 7, RTO !!
[ 1113.921255] dhd_module_init: Failed to load driver max retry reached**
[ 1113.921274] dhd_module_init: Exit err=-19
[ 1113.923230] mmc2: card 0001 removed
[ 1113.923744] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 1113.925758] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1113.940073] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1113.960868] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1113.968678] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[ 1113.975545] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1113.977990] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1113.979869] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !!
[ 1113.987439] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[ 1113.995006] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[ 1114.002556] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[ 1114.010065] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[ 1114.017457] sunxi-mmc sdc1: smc 2 p1 err, cmd 55, RTO !!
[ 1114.025208] sunxi-mmc sdc1: smc 2 p1 err, cmd 55, RTO !!
[ 1114.034690] sunxi-mmc sdc1: smc 2 p1 err, cmd 55, RTO !!
[ 1114.043018] sunxi-mmc sdc1: smc 2 p1 err, cmd 55, RTO !!
[ 1114.049723] sunxi-mmc sdc1: sdc set ios: clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1114.050715] sunxi-mmc sdc1: smc 2 p1 err, cmd 1, RTO !!
[ 1114.058386] sunxi-mmc sdc1: sdc set ios: clk 0Hz bm OD pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 1179.052733] ft5x_ts: Unknown symbol input_set_power_enable (err 0)
[ 1179.052792] ft5x_ts: Unknown symbol input_init_platform_resource (err 0)
[ 1179.052812] ft5x_ts: Unknown symbol input_request_int (err 0)
[ 1179.052847] ft5x_ts: Unknown symbol input_fetch_sysconfig_para (err 0)
[ 1179.052898] ft5x_ts: Unknown symbol input_set_int_enable (err 0)
[ 1179.052965] ft5x_ts: Unknown symbol input_free_platform_resource (err 0)
[ 1179.053089] ft5x_ts: Unknown symbol input_free_int (err 0)

HI: Why use PhoenixCard tools? PhoenixCard just supports Android images.

Easier for me, and i want unified pack system for linux and android. I don’t think its problem in PhoenixCard dough. When i get builded module from tina userspace its loads and says that wlan0 interface “no wireless extension”.

Any ideas guys? Stuck here :frowning:

Tina is a Sunixi Linix effort to support Linux in mainstream Debian for all Allwinner ARM products. Seems very odd that Ubuntu Mate can be presented as stable when Debian mainstream is unresolved. Ubunutu is supposed to be a Debian derivative. Not sure where Andriod thinks it fits into stability assurances as Andriod picks and chooses architectures in a proprietary fashion and resolves stability independently of open source.

Yesterday, I did a in depth reading of the status of their Allwinner R40 amd BPi m2U support at Sunxi as my Ubuntu Mate image behaved oddly.

It’s somewnere between alpha and beta releases as R40 was only included as of February 2017. seems mostly alpha to me. Other may disagree and say BPi M2U Ubuntu Mate is recently out of Beta, officially. Debian acceptance process is slow and technology is a race. So Allwinner and BPi must produce demonstrations of product far sooner than Debian acceptance.

The short story is Allwinner has yet to get Debian to accept any of their R40 code to date (8/2017), but BPi is providing “demo” releases that are somewhat stable, mostly complete, and coming out of repositories that are not mainstream Debian.

SO IT SEEMS, independent hacker/developers are providing Linux images and modules outside the more formal development channel an ahead of the normal stable release process.

Until Sunixi provides Debian with accepted code for all the R40 features, I suspect you may wander into unfinished or broken components that require you to think like a developer and debug.

Also BPi asserts the V40 is the same as the R40, but Sunxi has yet to even acknowledge that the V40 exists, and makes no assertion of equal to R40.

In other words, the Ubuntu image seems not really up to standard Ubuntu. It’s a hacked demo that may need substantial debugging.

Assumimg that you have a good compile of the driver module with a .ko file name, try lsmod amd determine if the module is installed.

Driver modules may or may not be compiled and installed with the kernel image.

If it isn’t installed, read a tutorial on how to do so and give it a try.

But it sounds like you may require additional software packages to make the wifi user friendly.

Once it’s working, you can get back to your original goal.

Hi George, but did you read my initial post at all? “Having trouble with drivers for AP6212 & FT5x_ts. Ubuntu: 16.04.01 clean rootfs. Any ideas? firmware and nvram.txt and config.txt are in /lib/firmware/ap6212 folder. Builded modules from BPI-M2U-bsp. build.s” Modules are builded with kernel and it’s not installed by default because its my clean ubuntu 16.04.1 rootfs, i install it and when I’m trying to insert the modules it fails with power up adapter errors. Fex or dts problem to me.

“wlan_hostwake = port:ower0<0>” This “ower” might be a typo but (this is BPI’s fex not mine)

I’m having problems configuring WLAN not bulding and modprobing the module.

Thanks of course.

Well, my replies were based on finding my own recent installation of a BPi Ubuntu Mate doing odd things. I think it was the same original image that you use.

I’m not sure the Kernel is stable. I was having serious audio problems when listiening to YouTube music, and had seen the Ubuntu completely logout my user while watch YouTube in Chromium. Something dramatically crashed!

I was about to stop using the Ubuntu Mate and switch to Debian, which I strongly prefer. I. had not attempted the wifi install because I didn’t have an antenna.

For me to help you further, I’ll have reinstall Ubuntu Mate, and make my own wifi antenna.

All this will take a few days to get done. Then I can try to get the wifi working, and report back.

But if the kernal image is not stable, it’s just an exercise… Not ready for a finished product.

If you are borrowing packages from different places or Android, I’ve no idea if they will work. Everything must target use with the Allwinner R40 cpu and the BPi m2U board. And attempt to share Android and Ubuntu packages is uncharted territory.

Can you verify with ‘dmesg’ that you can boot the Ubuntu without any errors? If you have errors, the image may not ever work right.

Stability must come first, or you are wasting your efforts.

Version 16.04.2 with wifi installed may be useful reference, now available.

Try: wlan_hostwake = port:power0<0>

*Edit: Maybe this helps (taken from released schematic) *Edit2: I realized now that wifi and bt have missing info, i think one way to find out is to extract the sunxi.dtb from a working image, but if the information could be provided would save a lot of work. I can’t remember how i got the wifi working… will check again…

  • BT-PCM-CLK = PB6
  • BT-PCM-SYN = PB7
  • BT-PCM-DIN = PB8
  • BT-PCM-DOUT = PB12

clocks is also wrong but i think is not used.

I’m happy to see your progress.

My point about Tina and Sunxi is that these sources may be the slowest to publish because they are seeking Debian Mainline approval. Of course, they may be the most reliable preliminary code as well because of better quality control.

The R40 is the most recent addition to Sunxi+Tina support… February 2017, and nothing yet for the V40.

The BPi Ubuntu Mate images might publish months ahead of Sunxi+Tina and are developers forks, not stable Ubuntu. And BananaPi schematics might be preliminary with errors. DIY verification is useful.

Debian mainline is the final say in good public domain code but a much slower, longer work-in-progress.

Allwinner has an R40 manual, and references for all its support chips. The wifi/Bluetooth chip is from a different sources, so documents have to come from somewhere else.

So available code may be preliminary bleeding edge. The choices are to wait or DIY. And DIY may suffer from some chips not sharing documents. Wifi chip providers often refuse to help open source coders.

Of course, the BPi m2u Debian images are also developing forks - not true Debian mainline , but you might find a different group that has different successes with drivers.

Checking the internet for Broadcom AP6212 drivers. Armbian claims to have recently solved the problem for the BPi m2plus with a driver copied from Android. This ISN’T the m2Ultra, but may be the way foward.

The wireless router open source sites may also be helpful. Try OpenWRT and ddWRT discussions for the Broadcom AP6216. They may also help, but I didn’t find Ap6212 specific solutions. Proprietary problems involved.

I resolved my DIY wifi antenna, and I may first try Version 16.04.2 as it is supposed to have the wifi working. Debian images seem to not offer wifi.

Just and update about the fex config. I have reviewed my history log to see if i have touched this part of fex to fix something, and i can confirm Wifi is working with this configuration above although i think something is odd about the misspelled fex info.

So your issue is not related to fex config.

Here is the log we can see wifi is up and running with this odd config:

[    1.403670] sunxi-bt bt: bt_power_name (vcc-wifi-2)
[    1.403683] sunxi-bt bt: io_regulator_name (vcc-io-wifi)
[    1.404388] sunxi-wlan wlan: wlan_power_name (vcc-wifi)
[    1.404398] sunxi-wlan wlan: io_regulator_name (vcc-io-wifi)
[    4.136947] dhd_wifi_platform_load: Enter
[    4.137462] wifi_platform_set_power = 1
[    4.460110] wifi_platform_bus_enumerate device present 1
[    4.736815] wifi_platform_set_power = 0
[    1.403670] sunxi-bt bt: bt_power_name (vcc-wifi-2)
[    1.403683] sunxi-bt bt: io_regulator_name (vcc-io-wifi)
[    1.403708] sunxi-bt bt: bt_rst gpio=236  mul-sel=1  pull=1  drv_level=1  data=0
[    1.403755] sunxi-bt bt: clk_name (outa)
[    1.404062] sunxi-bt bt: block state already is 1
[   16.310385] sunxi-bt bt: set block: 0
[   16.311946] sunxi-bt bt: check bluetooth bt_power voltage: 3300000
[   16.313392] sunxi-bt bt: check bluetooth io_regulator voltage: 3300000
[    1.403708] sunxi-bt bt: bt_rst gpio=236  mul-sel=1  pull=1  drv_level=1  data=0
[    1.412479] sunxi-wlan wlan: wlan_regon gpio=202  mul-sel=1  pull=1  drv_level=1  data=0
[    1.418276] sunxi-wlan wlan: get gpio wlan_hostwake failed
[    1.881022] gpio_led_probe start
[    1.881070] led1 gpio number is 244
[    1.881086] led2 gpio number is 245
[    1.881099] led3 gpio number is 246
[    1.404376] sunxi-wlan wlan: wlan_busnum (1)
[    1.404388] sunxi-wlan wlan: wlan_power_name (vcc-wifi)
[    1.404398] sunxi-wlan wlan: io_regulator_name (vcc-io-wifi)
[    1.404416] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[    1.412479] sunxi-wlan wlan: wlan_regon gpio=202  mul-sel=1  pull=1  drv_level=1  data=0
[    1.412547] /soc@01c00000/wlan: could not find phandle
[    1.418276] sunxi-wlan wlan: get gpio wlan_hostwake failed
[    1.424598] sunxi-wlan wlan: clk_name (outa)
[    4.136943] ======== bcm_wlan_set_plat_data ========
[    4.139119] sunxi-wlan wlan: check wlan wlan_power voltage: 3300000
[    4.140821] sunxi-wlan wlan: check wlan io_regulator voltage: 3300000
[    4.460150] sunxi-wlan wlan: bus_index: 1
[    4.736535] Register interface [wlan0]  MAC: 94:a1:a2:c2:67:2c

OK, but I’ll attach whole log so you can see my output, asap. Since I’m using Allwinner PheonixCard Tool, and tina pack script to pack it to allwinner img type, I’m not sure if it’s using dts or fex anymore. When i change hdmi for example to used or unused it changes behaviour, so for that i know it is used from fex file. And rootfs is clean ubuntu rootfs, I cooked it myself maybe some catch in there (small posibility because it couldn’t load “vfe” module and other modules).

And when i load bpi done image modules work and I see wlan0 and can scan. That’s the proof that module is working on my board :confused:

Well, a quick look at the logs appear to indicate your WLAN configuration isn’t right. You may need a bridge to the already working LAN.

I’m not 100% sure about how to do that, but I do know from hacking wifi routers with OpenWRT, its a necessary component. OpenWRT does have some tutorials that may help, also Debian has some.

It seems WLAN0 exists, but can’t locate the rest of your internal LAN structure.

The simplest and most secure bridge is between WLAN0 and ETH0 which allows you to connect with the internet, but doesn’t let any wifi user into the Banana Pi’s file system or applications.

That’s how routers protect themselves.

You need to verify that you have eth0 up and working, but I’m pretty sure it is. There is also a network loopback that is just intended for software testing.

I forgot to mention that you will also have to go looking for your Bluetooth support.

Something may be listed in the /dev directory as a special serial port or Bluetooth port.

Since there are all sorts of Bluetooth devices, verification of a working device depends on what exactly you desire to use. I have a microcontroller board with a tiny Bluetooth card providing Bluetooth to RS232/RS485 serial terminal interface as ttl voltages. That is easy to use for verification with Putty in Linux. But Bluetooth speakers, keyboards, and mice are all more complex to interface. Not good points to start with.

Keyboards and mice have a lot of special details, and the serial transmits 12 bits in one direction, but 13 bits in the opposite. You may have to locate or write special driver software. Audio devices use entirely different drivers to stream audio.

I’m using a very cheap HC-05 Bluetooth to Serial board that can work without being connected to a microcontroller or computer as a test of successful login. If you want to test more, it needs to be connected to something. Range is terrible, about 3 meters.