BPI-R2 Kernel bluetooth module

bluetoothd is afaik part of bluez…have you enabled bluez (maybe separate stack also needed) in kernel too? error-message of bluetoothd?

imho wlan must not be connected but the chip must be started before with wmt-tools (wmt_loader ,stp_uart_lancher)

on which step you hang or is not desired result?

To run bluetoothd you need rfkill in the kernel. I manage to avoid the error, but doesn’t solve the issue.

CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
CONFIG_RFKILL_GPIO=y

added that and some other now in main

Did some more test, same OS but with kernel 4.4. LEscan is working but unable to pair or set a connection between BT devices. Something is missing in 4.14 to allow LE scan to work.

bluetoothd is still not working.

# /usr/lib/bluetooth/bluetoothd -n -C
bluetoothd[1106]: Bluetooth daemon 5.43
bluetoothd[1106]: Starting SDP server
bluetoothd[1106]: kernel lacks bnep-protocol support
bluetoothd[1106]: System does not support network plugin
bluetoothd[1106]: Bluetooth management interface 1.10 initialized

LEscan

# hcitool lescan
LE Scan ...
4C:42:31:07:6C:XX (unknown)
4C:42:31:07:6C:XX (unknown)
3C:15:C2:CC:13:XX (unknown)
3C:15:C2:CC:13:XX (unknown)
FC:F1:36:C5:CA:XX (unknown)
5D:74:FF:77:B7:XX (unknown)
5D:74:FF:77:B7:XX (unknown)
AC:BC:32:A9:DA:XX (unknown)
AC:BC:32:A9:DA:XX (unknown)

Try to connect

# hcitool leinfo FC:F1:36:C5:CA:C4
Requesting information ...
Could not create connection: Input/output error
root@bpi-r2:~# hcitool leinfo 3C:15:C2:CC:13:B3
Requesting information ...
Could not create connection: Input/output error
root@bpi-r2:~# hcitool leinfo 5D:74:FF:77:B7:CC
Requesting information ...
Could not create connection: Input/output error
root@bpi-r2:~# hcitool leinfo AC:BC:32:A9:DA:C6
Requesting information ...
Could not create connection: Input/output error
root@bpi-r2:~# hcitool leinfo 5B:90:D3:2F:12:BB
Requesting information ...
Could not create connection: Input/output error

which OS do you use? which device? pin-protected? BT-version? bluez-utils (which version) installed?

does it work with 4.4+ubuntu?

BT-Speaker may needs some from the audio/multimedia-stack (internal audio-chip maybe), please first try a “simple” BT-device line mouse/keyboard to test if BT itself is working, the complexer devices like audio/multimedia

maybe passkey-problem: https://debianforum.de/forum/viewtopic.php?p=671148#p671148 (compile passkey-agent and use it to set PINcode)

For all my test i use the same system, eg: Debian stech.

There is nothing related to a BT-Speaker yet as it is pure BT scan and connection. It should be able to list all BT devices available.

# dpkg -l | grep blue
ii  bluetooth                     5.43-2+deb9u1                all          Bluetooth support
ii  bluez                         5.43-2+deb9u1                armhf        Bluetooth tools and daemons
ii  bluez-obexd                   5.43-2+deb9u1                armhf        bluez obex daemon
ii  bluez-tools                   0.2.0~20140808-5+b2          armhf        Set of tools to manage Bluetooth devices for linux

On kernel 4.4, BT init

[  175.326050] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:2 f:0 g:0 w:2 lpbk:2 coredump:0 wmt:2 stp:0)
[  175.341375] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(0) ok
[  175.378610] mtk_bt_hci_notify event(3)=HCI_NOTIFY_VOICE_SETTING
[  175.419856] hci_reassembly: this workaround is applied for mediatek BT

On kernel 4.14, BT init

[ 1690.935593] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:2 f:0 g:0 w:2 lpbk:2 coredump:0 wmt:2 stp:0)
[ 1690.946039] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(0) ok
[ 1690.982828] mtk_bt_hci_notify event(3)=HCI_NOTIFY_VOICE_SETTING
[ 1690.992145] [WMT-CTRL][W]wmt_ctrl_rx:wmt_ctrl_rx be signaled, but no rx data(2000)
[ 1691.025211] hci_reassembly: this workaround is applied for mediatek BT

On 4.14 the additional line:

[ 1690.992145] [WMT-CTRL][W]wmt_ctrl_rx:wmt_ctrl_rx be signaled, but no rx data(2000)

you can connect your speaker with 4.4.70?

then we must search the localtion of that error…i’m currently not at home so i can’t search the source-tree

error seems to be here: https://github.com/frank-w/BPI-R2-4.14/blob/8c3ec0a9f038d0089a28ee306fea1efdb41ad810/drivers/misc/mediatek/connectivity/common/conn_soc/core/wmt_ctrl.c#L274

obj-$(CONFIG_MTK_COMBO_BT_HCI) += bt/

seems to be missing in drivers/misc/mediatek/connectivity/Makefile

i assume that there are coming compile-errors, i had not ported something in the BT-Driver, merged after wifi was working

mhm…the bt-folder is removed also in 4.4.70…strange…

@garywang have you an idea what is missing?

created branch debug_bt…but currently i’ve found no difference to 4.4

there are WMT_DBG_FUNC, but i don’t know how to show that messages…

@xbgmsharp can you add printk() in that file in that function to see more whats going on?

i assume that the read from BT is failing…function mtk_wcn_stp_receive_data is in file /drivers/misc/mediatek/connectivity/common/conn_soc/include/stp_exp.h and drivers/misc/mediatek/connectivity/common/common_detect/wmt_stp_exp.c

The reason why I removed BT folder is that I implemented BT support in linux-mt/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/stp_chrdev_bt.c.

i have used your patch and bt should be working as in 4.4…but it seems that no data can be received…any idea?

Hi @frank-w, I compiled the kernel from your github.

There is some changes about the network, there is a wan, four lanN, For now, I can’t use the network, when I try sudo dhclient lan0, It shows up RTNETLINK answers: Network is down.

I’m not familiar with lanN or wan stuff. Is there any documents or tutorial to teach me about that?

I know how a “entity switch” works, you know , the “Broadcast domain” Stuffs. But when it comes to be a chip “MT7350” and MII interface, I did not learn before…

You need to make sure the NIC are up prior to configure then.

ip link set eth0 up
ip link set lan0 up
dhclient lan0

:grinning: Thanks, I will try that tomorrow!

As per this thread if you could test the bluetouh module it would be great.

the bluetooth-driver file mentioned by gary is the same as in 4.4 (no output to diff).

so i try to focus on mtk_wcn_stp_receive_data in drivers/misc/mediatek/connectivity/common/common_detect/wmt_stp_exp.c

INT32 mtk_wcn_stp_receive_data(PUINT8 buffer, UINT32 length, UINT8 type)
{
    INT32 ret = -1;

    if (mtk_wcn_stp_receive_data_f)
        ret = (*mtk_wcn_stp_receive_data_f) (buffer, length, type);
    else
        WMT_STP_EXP_ERR_FUNC("mtk_wcn_stp_receive_data_f cb is null\n");

    return ret;
}

UINT32 mtk_wcn_stp_exp_cb_reg(P_MTK_WCN_STP_EXP_CB_INFO pStpExpCb)
{
    WMT_STP_EXP_INFO_FUNC("call stp exp cb reg\n");
    ...
    mtk_wcn_stp_receive_data_f = pStpExpCb->stp_receive_data_cb;


drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_exp.c:252:		.stp_receive_data_cb = _mtk_wcn_stp_receive_data,

that function is now in drivers/misc/mediatek/connectivity/common/conn_soc/core/stp_core.c

#if STP_EXP_HID_API_EXPORT
INT32 _mtk_wcn_stp_receive_data(UINT8 *buffer, UINT32 length, UINT8 type)
#else
INT32 mtk_wcn_stp_receive_data(UINT8 *buffer, UINT32 length, UINT8 type)
#endif
{
    /* GeorgeKuo modify: reduce "if" branch */
    UINT16 copyLen = 0;
    UINT16 tailLen = 0;

    osal_lock_unsleepable_lock(&stp_core_ctx.ring[type].mtx);

    while (stp_core_ctx.ring[type].read_p != stp_core_ctx.ring[type].write_p) {
        /* GeorgeKuo modify: reduce if branch */
        if (stp_core_ctx.ring[type].write_p > stp_core_ctx.ring[type].read_p) {
            copyLen = stp_core_ctx.ring[type].write_p - stp_core_ctx.ring[type].read_p;
            if (copyLen > length)
                copyLen = length;

            osal_memcpy(buffer, stp_core_ctx.ring[type].buffer + stp_core_ctx.ring[type].read_p, copyLen);
            stp_core_ctx.ring[type].read_p += copyLen;
        } else {
            tailLen = MTKSTP_BUFFER_SIZE - stp_core_ctx.ring[type].read_p;
            if (tailLen > length) { /* exclude equal case to skip wrap check */
                copyLen = length;
                osal_memcpy(buffer, stp_core_ctx.ring[type].buffer + stp_core_ctx.ring[type].read_p,
                        copyLen);
                stp_core_ctx.ring[type].read_p += copyLen;
            } else {
                /* part 1: copy tailLen */
                osal_memcpy(buffer, stp_core_ctx.ring[type].buffer + stp_core_ctx.ring[type].read_p,
                        tailLen);

                buffer += tailLen;  /* update buffer offset */

                /* part 2: check if head length is enough */
                copyLen = length - tailLen;
                copyLen =
                    (stp_core_ctx.ring[type].write_p <
                     copyLen) ? stp_core_ctx.ring[type].write_p : copyLen;

                if (copyLen)
                    osal_memcpy(buffer, stp_core_ctx.ring[type].buffer + 0, copyLen);

                /* Update read_p final position */
                stp_core_ctx.ring[type].read_p = copyLen;

                /* update return length: head + tail */
                copyLen += tailLen;
            }
        }
        break;
    }

    osal_unlock_unsleepable_lock(&stp_core_ctx.ring[type].mtx);

    if ((MTK_WCN_BOOL_TRUE == stp_psm_is_quick_ps_support()) && (type != WMT_TASK_INDX)) {
#if PSM_USE_COUNT_PACKAGE
        stp_psm_disable_by_tx_rx_density(STP_PSM_CORE(stp_core_ctx), 1);
#else
        stp_psm_disable_by_tx_rx_density(STP_PSM_CORE(stp_core_ctx), 1, copyLen);
#endif
    }

    return copyLen;
}

as i see here the osal-stack is used…i did not understand what this function does exactly

there are multiple osal_memcpy(buffer, stp_core_ctx.ring[type].buffer + x,length) which seem to copy from osal-buffer to param-buffer in chunks. As there are 0 bytes received, the first chunk must fail…

@xbgmsharp which modules have you loaded?

have tried to initilize BT with kernel, i’ve got curretly on my board (may be without some BT-modules)

find  /lib/modules/4.14.12-00008-g2e65188/ -name '*.ko*' | grep bt
/lib/modules/4.14.12-00008-g2e65188/kernel/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/stp_chrdev_bt.ko
root@bpi-r2:~# modprobe stp_chrdev_bt.ko
modprobe: FATAL: Module stp_chrdev_bt.ko not found in directory /lib/modules/4.14.12-00008-g2e65188
connectivity/common/conn_soc/linux/pub/stp_chrdev_bt.koel/drivers/misc/mediatek/c
-bash: /lib/modules/4.14.12-00008-g2e65188/kernel/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/stp_chrdev_bt.ko: Permission denied

You first need to load the WIFI. then the BT device should be present, eg: # hciconfig -a

Kernel log:

[ 1656.555608] [BT-MOD-INIT][I]do_bluetooth_drv_init:start to do bluetooth driver init
[ 1656.563532] [MTK-BT] BT_init: mtk_stp_BT_chrdev driver(major 192) installed
[ 1656.570895] [BT-MOD-INIT][I]do_bluetooth_drv_init:finish bluetooth driver init, i_ret:0

enable wifi

root@bpi-r2:~# less wifi.sh 

### BEGIN INIT INFO
# Provides:       wifi
# Required-Start: $network $remote_fs $syslog
# Required-Stop:  $network $remote_fs $syslog
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Load MediaTek MT6625L firmware
### END INIT INFO

# Don't exit on error status
set +e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/dev/null
NAME=wifi
DESC="Load MediaTek MT6625L firmware wifi & BT"

# Check FILE exists and is executable
if [[ -x /usr/bin/wmt_loader ]];
then
        # ??
        /usr/bin/wmt_loader
        sleep 3
else
        echo "Error, unable to find wmt_loader"
fi

# Check FILE exists and is character special
if  [[ -c /dev/stpwmt ]];
then
        # Load firmware
        /usr/bin/stp_uart_launcher -p /etc/firmware &
        sleep 5
else
        echo "Error, device no created, /dev/stpwmt"
fi

# Check FILE exists and is character special
if  [[ -c /dev/wmtWifi ]];
then
        echo 0 >/dev/wmtWifi
        sleep 5
        echo A >/dev/wmtWifi
        sleep 2
else
        echo "Error, wifi device no created, /dev/wmtWifi"
fi

# Check NIC ap0
ifconfig ap0
if [[ $? != "0" ]]
then
        echo "Error, device no available, ap0"
else
        echo "Done, all good, ready to lauch hostapd"
        #hostapd -B /etc/hostapd/hostapd.conf
fi

hciconfig seems to be part of bluez…gary says me that bluez currently does not work stable…how to scan without bluez?

have not done much with bluetooth :wink:

since ifconfig is not part of debian stretch we can use “ip addr show ap0” instead of ifconfig

also you should not call echo 0 > /dev/wmtWifi

here my full log:

root@bpi-r2:~# ./wifi.sh 
init combo devic[   29.515869] [WMT-DETECT][I]wmt_detect_open:open major 154 minor 0 (pid 540)
e
[   29.524123] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191037),arg(0)
Opened combo dev[   29.532287] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (1074034433),arg(30243)
ice
get device[   29.540313] set current consys chipid (0x7623)
 id : 30243
[   29.546139] [WMT-DETECT][I]wmt_detect_unlocked_ioctl:cmd (-2147191036),arg(30243)
set device id : [   29.554760] [WMT-MOD-INIT][I]do_common_drv_init:start to do common driver init, chipid:0x00007623
30243
[   29.568860] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
[   29.576286] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6620.defAnt, mt6620_ant_m3.cfg, -1)
[   29.584413] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
[   29.591790] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6628.defAnt, mt6628_ant_m1.cfg, -1)
[   29.599950] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
[   29.607318] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6630.defAnt, mt6630_ant_m1.cfg, -1)
[   29.617880] [WMT-CONSYS-HW][E]mtk_wmt_probe(122):Wmt Cannot find pinctrl default!
[   29.626396] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
[   29.633153] [BT-MOD-INIT][I]do_bluetooth_drv_init:CONFIG_MTK_COMBO_BT is not defined
[   29.640909] [WCN-MOD-INIT][E]do_connectivity_driver_init(57):do common driver init failed, ret:-1
[   29.649748] [GPS-MOD-INIT][I]do_gps_drv_init:CONFIG_MTK_COMBO_GPS is not defined
[   29.657118] [WCN-MOD-INIT][E]do_connectivity_driver_init(62):do common driver init failed, ret:-1
[   29.665956] [FM-MOD-INIT][I]do_fm_drv_init:start to do fm module init
[   29.672351] [FM-MOD-INIT][I]do_fm_drv_init:finish fm module init
[   29.678346] [WLAN-MOD-INIT][I]do_wlan_drv_init:start to do wlan module init 0x7623
[   29.686165] [MTK-WIFI] WIFI_init: mtk_wmt_WIFI_chrdev driver(major 153) installed.
[   29.693708] [WLAN-MOD-INIT][I]do_wlan_drv_init:WMT-WIFI char dev init, ret:0
[   29.701695] [WLAN-MOD-INIT][I]do_wlan_drv_init:WLAN-GEN2 driver init, ret:0
[   29.708705] [WLAN-MOD-INIT][I]do_wlan_drv_init:finish wlan module init
do module init: [   29.715566] [WMT-DETECT][I]wmt_detect_close:close major 154 minor 0 (pid 540)
30243
failed to init module 
open device node[   32.735688] [WMT-DEV][W]WMT_unlocked_ioctl:chipid = 0x7623
 succeed.(Node:/[   32.742656] [WMT-LIB][W]wmt_lib_set_hif:new hifType: 2, fm:2
dev/stpwmt, fd:3[   32.749531] [WMT-CORE][E]opfunc_hif_conf(874):WMT-CORE: WMT HIF info added
) 
chip id is 0[   32.749533] [WMT-DEV][W]WMT_unlocked_ioctl:unknown cmd (-2147180516)
x7623
chiId:0x7[   32.765358] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 234 
623, setting to [   32.772116] vcn18: mode operation not allowed
property((null))[   32.777775] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 238 

chiId:0x7623
[   32.784474] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 241 
run SOC chip flo[   32.791223] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 243 
w
create pwr on[   32.798448] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 250 
 thread ok
[   32.804962] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 277 
[   32.811651] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 279 
[   32.817034] DEBUG: Passed mtk_wcn_consys_power_on 193 
[   32.822167] DEBUG: Passed mtk_wcn_consys_power_on 195 
[   32.827342] DEBUG: Passed mtk_wcn_consys_power_on 202 
[   32.832445] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 281 
[   32.837841] DEBUG: Passed mtk_wcn_consys_hw_reg_ctrl 286 
[   32.896231] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6620.defAnt'.
[   32.903590] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6620.defAnt, mt6620_ant_m3.cfg, -1)
[   32.911760] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6628.defAnt'.
[   32.919145] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6628.defAnt, mt6628_ant_m1.cfg, -1)
[   32.927294] [WMT-CONF][E]wmt_conf_parse_pair(323):unknown field 'mt6630.defAnt'.
[   32.934648] [WMT-CONF][W]wmt_conf_parse:parse fail (mt6630.defAnt, mt6630_ant_m1.cfg, -1)
[   32.944733] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: read hw_ver (hw version) (0x8a00)
[   32.953227] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: read fw_ver (rom version) (0x8a00)
[   32.961221] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: ic info: SOC_CONSYS.E1 (0x8a00/0x8a00, WMTHWVER:0, patch_ext:_e1)
enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch
fwVersion:0x8a00
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x22,0x00,0x06,0x00
gpatchnum = [2]
gdwonseq = [2]
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin
fw Ver in patch: 0x8a00
read patch info:0x21,0x00,0x0e,0xf0
gdwonseq = [1]
cmd(srh_patch) resp(ok)
[   33.072502] [WMT-IC][W]mtk_wcn_soc_patch_dwn:wmt_core: patch dwn:0 frag(51, 268) ok
[   33.222661] [WMT-IC][W]mtk_wcn_soc_patch_dwn:wmt_core: patch dwn:0 frag(114, 52) ok
[   33.558518] [WMT-IC][W]mtk_wcn_soc_sw_init:co-clock disabled.
[   33.565015] [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
[   33.572403] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:0 f:0 g:0 w:0 lpbk:2 coredump:0 wmt:2 stp:0)
[   33.582859] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(9) ok
[   37.734904] [MTK-WIFI] WIFI_open: WIFI_open: major 153 minor 0 (pid 539)
[   37.741755] [MTK-WIFI] WIFI_write: WIFI_write A
[   37.741755] 
[   37.786920] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt wlan func on before wlan probe
[   37.798410] kalFirmwareImageMapping firmware size 225840
[   38.869759] [MTK-WIFI] register_set_p2p_mode_handler: (pid 545) register set p2p mode handler c050ebd0
[   38.879095] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt call wlan probe ok
[   38.885936] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:0 f:0 g:0 w:2 lpbk:2 coredump:0 wmt:2 stp:0)
[   38.896494] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(3) ok
[   38.902588] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
[   38.909882] [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1
[   38.915656] [MTK-WIFI] WIFI_close: WIFI_close: major 153 minor 0 (pid 539)
12: ap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 02:08:22:d8:03:fc brd ff:ff:ff:ff:ff:ff
Done, all good, ready to lauch hostapd
root@bpi-r2:~# hciconfig -a
root@bpi-r2:~# 

as you see hciconfig -a does not show any controller (must see my local BT-controller)

ifconfig apt-get install net-tools.

From your log, you are missing some kernel entry.

[   29.626396] [WMT-MOD-INIT][I]do_common_drv_init:finish common driver init
[   29.633153] [BT-MOD-INIT][I]do_bluetooth_drv_init:CONFIG_MTK_COMBO_BT is not defined
[   29.640909] [WCN-MOD-INIT][E]do_connectivity_driver_init(57):do common driver init failed, ret:-1
[   29.649748] [GPS-MOD-INIT][I]do_gps_drv_init:CONFIG_MTK_COMBO_GPS is not defined
[   29.657118] [WCN-MOD-INIT][E]do_connectivity_driver_init(62):do common driver init failed, ret:-1
[   29.665956] [FM-MOD-INIT][I]do_fm_drv_init:start to do fm module init
[   29.672351] [FM-MOD-INIT][I]do_fm_drv_init:finish fm module init
  │ Symbol: MTK_COMBO_BT [=m]                                                                                                                   │  
  │ Type  : tristate                                                                                                                            │  
  │ Prompt: MediaTek Combo Chip BT driver                                                                                                       │  
  │   Location:                                                                                                                                 │  
  │     -> Device Drivers                                                                                                                       │  
  │       -> Misc devices                                                                                                                       │  
  │         -> Mediatek Peripherals                                                                                                             │  
  │ (1)       -> Modem & Connectivity related configs                                                                                           │  
  │   Defined at drivers/misc/mediatek/connectivity/Kconfig:201                                                                                 │  
  │   Depends on: BT [=y] && MTK_COMBO [=y]                                                                                                     │  
  │   Selects: MTK_BTIF [=y]                                                                                                                    │  
  │                                                                                                                                             │  
  │                                                                                                                                             │  
  │ Symbol: MTK_COMBO_BT_HCI [=m]                                                                                                               │  
  │ Type  : tristate                                                                                                                            │  
  │ Prompt: MediaTek Combo Chip BlueZ driver                                                                                                    │  
  │   Location:                                                                                                                                 │  
  │     -> Device Drivers                                                                                                                       │  
  │       -> Misc devices                                                                                                                       │  
  │         -> Mediatek Peripherals                                                                                                             │  
  │ (2)       -> Modem & Connectivity related configs                                                                                           │  
  │   Defined at drivers/misc/mediatek/connectivity/Kconfig:208                                                                                 │  
  │   Depends on: BT [=y] && MTK_COMBO [=y]                                                                                                     │  
  │   Selects: MTK_BTIF [=y]           

have compiled with this options, but did not found the corresponding module to load…

edit had forgotten that modulename is with dashes and filename with underscores…

root@bpi-r2:~# find /lib/modules/$(uname -r) -name '*.ko' | grep bt                                                                                 
/lib/modules/4.14.12-bpi-r2/kernel/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/stp_chrdev_bt.ko
root@bpi-r2:~# modprobe stp-chrdev-bt
root@bpi-r2:~# lsmod
Module                  Size  Used by
stp_chrdev_bt          24576  0
bridge                151552  0
mt76x2e                61440  0
mt76                   32768  1 mt76x2e
mtk_thermal            16384  0
thermal_sys            61440  1 mtk_thermal
pwm_mediatek           16384  0
ip_tables              24576  0
x_tables               28672  1 ip_tables
ipv6                  409600  19 bridge

rebooted, loaded module again (is visible in lsmod) and then started wifi.sh…

do_bluetooth_drv_init:CONFIG_MTK_COMBO_BT is not defined

again…have you compiled in the driver fixed?