Comments (17)
I managed to make bluetooth work.
This is a bit tricky.
MTK connectivity requires userspace shit to initialize device (both WIFI and BT). In case module compiled into the kernel, routine which completed device setup executed before chip can actually be initialized.
So, to fix things up you need to build stp_chrdev_bt.ko as a module, and insert it after stp_uart_launcher is running. In this case things just works.
from bpi-router-linux.
i had only tested wifi-AP after merging the combo-device-driver...there are also Problems with BT on 4.4:
currently there is much work on other things so i will accept patches but do not work on BT now
from bpi-router-linux.
added this patch:
BPI-SINOVOIP/BPI-R2-bsp@3823964
and the BT-Options to the debug-branch
can you please test if BT now works?
from bpi-router-linux.
debug merged to main
bt works like in 4.4
occasionally hangs and bluetoothd does not work
from bpi-router-linux.
BT is actually not build in...
obj-$(CONFIG_MTK_COMBO_BT_HCI) += bt/
is missing in drivers/misc/mediatek/connectivity/Makefile
edit: bt-folder does not exist also in 4.4
just for reference:
http://forum.banana-pi.org/t/kernel-bluetouh-module/4592/17
BPI-SINOVOIP/BPI-R2-bsp@6b9512b
from bpi-router-linux.
Kernel config to activate BT:
$ grep BT .config | grep -v '#'
CONFIG_BT=y
CONFIG_BT_BREDR=y
CONFIG_BT_HS=y
CONFIG_BT_LE=y
CONFIG_BT_DEBUGFS=y
CONFIG_MTK_BTIF=y
CONFIG_MTK_COMBO_BT=y
CONFIG_MTK_COMBO_BT_HCI=y
from bpi-router-linux.
added that to branch "debug_bt"
from bpi-router-linux.
nice to hear that, can you figure out why this happen and how i can build the only BT as module? afair i cannot build the combo-device as module.
from bpi-router-linux.
Yes.. Shortly saying you need to get here - https://github.com/frank-w/BPI-R2-4.14/blob/4.14-main/net/bluetooth/hci_core.c#L2104
Which is called from hci_power_on, which is called from https://github.com/frank-w/BPI-R2-4.14/blob/4.14-main/net/bluetooth/hci_core.c#L3160 (hci_register_dev).
You need set CONFIG_MTK_COMBO_BT=m
, and add two simple hacks, as here - alxchk@5ea5c3c (bluetooth_drv_init.c, stp_chrdev_bt.c)
Actually I did a lot of other changes to track this, so I'm not completely sure that these changes are sufficient, but you can try. The main idea to call hci_register_dev after stp loader up and running.
from bpi-router-linux.
Thanks for the update.
IsCONFIG_MTK_COMBO_BT_HCI
needed? Does both need to be compile as module?
$ grep CONFIG_MTK_COMBO_BT arch/arm/configs/mt7623n_evb_fwu_defconfig
CONFIG_MTK_COMBO_BT=y
CONFIG_MTK_COMBO_BT_HCI=y
According to alxchk@5ea5c3c it should like:
CONFIG_MTK_COMBO_BT=m
CONFIG_MTK_COMBO_BT_HCI=y
from bpi-router-linux.
afaik on next boot BT-Module gets loaded before you can call stp_uart_launcher...
so BT have to initialized via script (unload module, run stp_uart_launcher, load module)
am i right? pushed to 4.19-bt, but had not yet time to test :(
from bpi-router-linux.
This module will not be autoloaded. So modprobe it manually after stp launcher.
I have bunch of systemd unit files for that, can share.
from bpi-router-linux.
have to test it before, currently busy with some mainline-discussions/tests (dsa, fbdev, linux 5.0)
i think i will integrate it in wifi.sh, which calles stp_uart_launcher for wifi...
as far as i see you disable code...imho if that works...code should be dropped completely
from bpi-router-linux.
root@bpi-r2:~# bluetoothctl
[NEW] Controller 00:00:46:85:90:01 bpi-r2 [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:00:46:85:90:01 Discovering: yes
[NEW] Device 00:14:03:05:08:AE 00-14-03-05-08-AE
[NEW] Device 9C:8C:6E:4A:F8:23 [TV] Samsung 8 Series (65)
[NEW] Device B4:9D:0B:5F:2A:B9 Aquaris X5 Plus
[CHG] Device 00:14:03:05:08:AE LegacyPairing: no
[CHG] Device 00:14:03:05:08:AE Name: BPI-R2
[CHG] Device 00:14:03:05:08:AE Alias: BPI-R2
[bluetooth]# scan off
[CHG] Device B4:9D:0B:5F:2A:B9 RSSI is nil
[CHG] Device 9C:8C:6E:4A:F8:23 RSSI is nil
[CHG] Device 00:14:03:05:08:AE RSSI is nil
[CHG] Controller 00:00:46:85:90:01 Discovering: no
Discovery stopped
[bluetooth]# pair B4:9D:0B:5F:2A:B9
Attempting to pair with B4:9D:0B:5F:2A:B9
[CHG] Device B4:9D:0B:5F:2A:B9 Connected: yes
[CHG] Device B4:9D:0B:5F:2A:B9 Modalias: bluetooth:v000Fp1200d1436
....
[CHG] Device B4:9D:0B:5F:2A:B9 ServicesResolved: yes
[CHG] Device B4:9D:0B:5F:2A:B9 Paired: yes
Pairing successful
nice ;)
https://github.com/frank-w/BPI-R2-4.14/commits/4.19-bt
from bpi-router-linux.
There seem still issues with btle,can you guide me/us to debug this? Where should we add debug-printk?
http://forum.banana-pi.org/t/bpi-r2-kernel-bluetooth-module/4592/64
from bpi-router-linux.
I don't know if this needs to be posted, however, it seems Bluetooth was added at some point.
Around 14 days ago (from this message), Bluetooth was fixed for kernels 5.4, 5.6 thru 5.10 and 5.15. I have personally have not tested other versions. Please have a look at the thread I'm referencing: https://forum.banana-pi.org/t/bpi-r2-internal-wifi-bt-mt6625l-kernel/4307/355 .
Maybe this issue should be closed?
from bpi-router-linux.
BTLE is imho not possible,but basicly BT is working again.
Thx for pointing to it
from bpi-router-linux.
Related Issues (20)
- bpi-r3 eth1 dropping packets HOT 5
- 6.1-main deb package is not compatible with Debian Bullseye HOT 7
- mt7530 doesn't work on bpi-r3 if mtk_eth is built as module HOT 6
- bpi-r3 branch 6.3-rc missing SFP support / transmit queue timeout HOT 38
- BPI-r3 expose pps HOT 8
- adding CONFIG_NTP_PPS module not 6.2-main brach HOT 1
- build.sh Deb Pack Gen debarch if statement backwards HOT 2
- Wireguard support BPI-R3 HOT 2
- WiFi doesn't work on kernel 5.15 HOT 9
- bpi-r2, kernel 5.15.129 - compilation errors (mediatek) - arm-linux-gnueabihf-gcc (Debian 13.2.0-2) HOT 4
- [bpi-r2pro/linux 6.1] how to populate spi devices in /dev HOT 1
- bpi-r3 will it be able to support armbian? HOT 1
- i2c rtcs HOT 2
- Initramfs and bootargs support? HOT 2
- [Question] 5.15 & hwnat HOT 3
- Linux ACL's (Access Control Lists) does not work for ext4 for some reason. HOT 4
- cryptodev not available on kernel 6.1 HOT 7
- iptables not available on kernel 6.1 HOT 4
- is it possible to resize the filesystem when using SD card? HOT 2
- SFP1 vlan not working on the r3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bpi-router-linux.