Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth is not working on X96MaxPlus_2101 #1086

Closed
drafort opened this issue Feb 20, 2023 · 59 comments
Closed

Bluetooth is not working on X96MaxPlus_2101 #1086

drafort opened this issue Feb 20, 2023 · 59 comments
Labels
documentation Improvements or additions to documentation new box Research Fills in the Blanks support This need is supported

Comments

@drafort
Copy link

drafort commented Feb 20, 2023

Model: X96MaxPlus_2101
WiFi & Bluetooth chip: FN-LINK 6222B (rtl88x2cs)

IPC_2023-02-19 00 04 45 9580
IPC_2023-02-19 00 02 34 7300

IMG_20230220_142009

Armbian: Armbian 23.02.0-trunk Jammy with Linux 6.1.12-flippy-82+
Booting from sdcard
Bluetooth already installed from armbian-config, but no Bluetooth devices found, however, on installed ("from the box") at emmc Android 9, Bluetooth working perfectly.

Screenshot_20230220_131451

Screenshot_20230220_131507
Screenshot_20230220_132020

@ophub
Copy link
Owner

ophub commented Feb 20, 2023

@drafort
Copy link
Author

drafort commented Feb 20, 2023

/boot/uEnv.txt change dtb: meson-sm1-x96-max-plus.dtb

https://github.com/unifreq/linux-5.15.y/blob/main/arch/arm64/boot/dts/amlogic/meson-sm1-x96-max-plus.dts#L185-L197

Thank you to reply!
Dtb changed as pointed.
Still no Bluetooth devices available
Screenshot_20230220_154404
Screenshot_20230220_154331
Screenshot_20230220_154419
Uploading Screenshot_20230220_154507.jpg…

@ophub
Copy link
Owner

ophub commented Feb 20, 2023

armbian-config > Network > Install Bluetooth Support

@drafort
Copy link
Author

drafort commented Feb 20, 2023

Or it's important to change Linux kernel to 5.15 from 6.1? And to use Jammy 5.15.94?

@ophub
Copy link
Owner

ophub commented Feb 20, 2023

https://github.com/ophub/kernel/tree/main/pub/stable

This dtb is available in four series (5.4/5.10/5.15/6.1) kernels. You can switch freely

armbian-update -k 5.x.y

@drafort
Copy link
Author

drafort commented Feb 20, 2023

armbian-config > Network > Install Bluetooth Support

already been installed
no devices found
Screenshot_20230220_160014
Screenshot_20230220_154507

@ophub
Copy link
Owner

ophub commented Feb 20, 2023

Update other series of kernels to see which can drive

@drafort
Copy link
Author

drafort commented Feb 20, 2023

Update other series of kernels to see which can drive

Thanks!
I'm trying now and will give feedback here

@drafort
Copy link
Author

drafort commented Feb 20, 2023

Update other series of kernels to see which can drive

Kernel was updated to 5.15.94 using armbian-update -k
Still no Bluetooth devices found.
Bluetooth support is installed from armbian-config.

Screenshot_20230220_171411

@drafort
Copy link
Author

drafort commented Feb 20, 2023

Kernel downgraded to 5.10.168
But still no Bluetooth devices found
Screenshot_20230220_181118_org connectbot
Screenshot_20230220_182618

@drafort
Copy link
Author

drafort commented Feb 20, 2023

Kernel was downgraded to 5.4.231
But result is the same: no Bluetooth devices found. What to do?

Screenshot_20230220_192609

@drafort
Copy link
Author

drafort commented Feb 22, 2023

upd:
Tried to use Debian bullseye 5.15.94 instead Ubuntu (usb flash drive and sd card)
System is not booting up with dtb "meson .... max_plus" and "meson .... max_plus_100".
Successfully started with "meson .... x96_air_1000", but still no Bluetooth devices found (Bluetooth support was installed from debian-config).
May be problem is in dtb?

@ophub
Copy link
Owner

ophub commented Feb 22, 2023

unifreq/linux-5.15.y@d1a5aff

This driver is added by a third party, some people can use it, some people can't, it's unstable.
Give up if the test fails, there is no other way at present.

@drafort
Copy link
Author

drafort commented Feb 22, 2023

@salsabilng
Copy link

salsabilng commented Feb 22, 2023

I have same tv box, im able to edit the dtb to activate the bluetooth. currently using 6.1.12 kernel

here is my dtb, extract, then replace meson-sm1-x96-max-plus.dtb in /boot/dtb/amlogic
dont know yet if it's stable or not, but it works on me

meson-sm1-x96-max-plus.zip

@drafort
Copy link
Author

drafort commented Feb 22, 2023

Thank you!
It's more better, but errors occurred.
Screenshot_20230222_121231
May be I do something wrong?

ps. Bluetooth support was installed from armbian-config

@salsabilng
Copy link

salsabilng commented Feb 22, 2023

maybe driver issue, not sure, try another kernel.
try to use it first, if it works, u can just ignore it

@drafort
Copy link
Author

drafort commented Feb 22, 2023

maybe driver issue, not sure, try another kernel. try to use it first, if it works, u can just ignore it

not working: no device
Screenshot_20230222_122424

now I'm trying with Ubuntu 6.1 instead Debian 6.1

@salsabilng
Copy link

sudo rfkill , see if the bt device listed

@drafort
Copy link
Author

drafort commented Feb 22, 2023

sudo rfkill , see if the bt device listed

yes, it listed
Screenshot_20230222_123039

@salsabilng
Copy link

sorry, dont know much, try to change the kernel

@drafort
Copy link
Author

drafort commented Feb 22, 2023

sorry, dont know much, try to change the kernel

Thank you! I'll try and leave feedback

@drafort
Copy link
Author

drafort commented Feb 22, 2023

Kernel was downgraded to 5.15.94
hci0 is disappeared from rfkill list(
Bluetooth support is installed from armbian-config

Screenshot_20230222_135012

@salsabilng
Copy link

you need to replace the dtb again.

@drafort
Copy link
Author

drafort commented Feb 22, 2023

you need to replace the dtb again.

cannot start system (deb 5.15.94) with this dtb

@drafort
Copy link
Author

drafort commented Feb 22, 2023

I think that's driver problem. May be possible to inject to dtb this driver?https://codeberg.org/Hiyurigi/rtl88x2cs

@salsabilng
Copy link

hmm, try using bullseye 6.1.12

@salsabilng
Copy link

and use sudo bluetoothctl

@drafort
Copy link
Author

drafort commented Feb 22, 2023

hmm, try using bullseye 6.1.12

Already tryed, used "bluetoothctl" from root.
(see upper).

Screenshot_20230222_121231
Screenshot_20230222_123034_org connectbot

Or it's important to execute "bluetoothctl" from root with "sudo"?

@salsabilng
Copy link

@ophub
Copy link
Owner

ophub commented Feb 23, 2023

Can Bluetooth of rtl8822cs be used? Which dtb are you using?
cat /boot/uEnv.txt

@salsabilng
Copy link

salsabilng commented Feb 23, 2023

i have changes the dts, so the bluetooth can be recognized. this is mine

sudo dmesg | grep Bluetooth
[ 9.251609] Bluetooth: Core ver 2.22
[ 9.254518] Bluetooth: Starting self testing
[ 9.270179] Bluetooth: ECDH test passed in 11166 usecs
[ 9.279533] Bluetooth: SMP test passed in 4612 usecs
[ 9.284159] Bluetooth: Finished self testing
[ 9.292851] Bluetooth: HCI device and connection manager initialized
[ 9.299791] Bluetooth: HCI socket layer initialized
[ 9.307051] Bluetooth: L2CAP socket layer initialized
[ 9.318039] Bluetooth: SCO socket layer initialized
[ 9.399020] Bluetooth: HCI UART driver ver 2.3
[ 9.400505] Bluetooth: HCI UART protocol H4 registered
[ 9.415186] Bluetooth: HCI UART protocol BCSP registered
[ 9.451454] Bluetooth: HCI UART protocol LL registered
[ 9.453643] Bluetooth: HCI UART protocol ATH3K registered
[ 9.459248] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 9.474270] Bluetooth: HCI UART protocol Intel registered
[ 9.506858] Bluetooth: HCI UART protocol Broadcom registered
[ 9.507697] Bluetooth: HCI UART protocol QCA registered
[ 9.507707] Bluetooth: HCI UART protocol AG6XX registered
[ 9.507756] Bluetooth: HCI UART protocol Marvell registered
[ 10.201635] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
[ 10.209214] Bluetooth: hci0: RTL: rom_version status=0 version=3
[ 10.211403] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_fw.bin
[ 10.221651] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_config.bin
[ 10.255242] Bluetooth: hci0: RTL: cfg_sz 73, total sz 40777
[ 10.602803] Bluetooth: hci0: RTL: fw version 0x05a91a4a
[ 14.824900] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 14.826059] Bluetooth: BNEP filters: protocol multicast
[ 14.831025] Bluetooth: BNEP socket layer initialized
[ 14.845046] Bluetooth: MGMT ver 1.22

bluetoothctl
Agent registered
[��CHG��] Controller 5C:C5:63:9F:C1:95 Pairable: yes
[bluetooth]# show
Controller 5C:C5:63:9F:C1:95 (public)
Name: blackBox
Alias: blackBox
Class: 0x00000000
Powered: yes
Discoverable: no
DiscoverableTimeout: 0x000000b4
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0537
Discovering: no
Roles: central
Roles: peripheral
Advertising Features:
ActiveInstances: 0x00 (0)
SupportedInstances: 0x04 (4)
SupportedIncludes: tx-power
SupportedIncludes: appearance
SupportedIncludes: local-name
SupportedSecondaryChannels: 1M
SupportedSecondaryChannels: 2M
SupportedSecondaryChannels: Coded

cat /etc/ophub-release
PLATFORM='amlogic'
VERSION_CODEID='debian'
VERSION_CODENAME='bullseye'
SOC='s905x3'
MODEL_NAME='X96-Max+_100Mb'
FDTFILE='meson-sm1-x96-max-plus.dtb'
UBOOT_OVERLOAD='u-boot-x96maxplus.bin'
MAINLINE_UBOOT='/usr/lib/u-boot/x96maxplus-u-boot.bin.sd.bin'
BOOTLOADER_IMG='/usr/lib/u-boot/hk1box-bootloader.img'
FAMILY='meson-sm1'
BOARD='s905x3'
KERNEL_VERSION='6.1.12'
KERNEL_BRANCH='stable'
K510='0'
ROOTFS_TYPE='btrfs'
BOOT_CONF='uEnv.txt'
DISK_TYPE='emmc'
MLUBOOT_STATUS='yes'
AMPART_STATUS='yes'
PACKAGED_DATE='2023-01-16'

personally, i never use the bluetooth, so i dont know will it works for transfering file or just streaming a music via bluetooth. The bluetooth can discover my other device and pair to it.

@salsabilng
Copy link

some changes i've made

unifreq/linux-5.15.y@main...salsabilng:linux-5.15.y:main

@salsabilng
Copy link

by the way, ive tried many times using usb with 5.15.y kernel and older on this box, and never succeed to boot. so use 6.1.y kernel only for usb uses.
in my case, i installed the armbian into emmc, and using the mainline boot, then i can get any kernel version working,

Thanks! I tested 6.1. Screenshot_20230223_110337 Screenshot_20230223_110249 Screenshot_20230223_110149

It's still no success.

ps. 5.15. successfully started with dtb from X96-air-1000

i suspect because your not using mainline uboot, but eh i'm not sure

@salsabilng
Copy link

salsabilng commented Feb 24, 2023

just a few hours ago, chewitt add new dts to support banana pi that has RTL8822CS, although it has different cpu, may be we can adopt the bluetooth part to the x96 max plus dts. currently i cant do it myself because i have many homework.
@ophub @drafort

chewitt/linux@dc15871

this is what i already adopted

chewitt/linux@bbf2bea

@salsabilng
Copy link

salsabilng commented Feb 26, 2023

i've done the changes if you still concern here is the step i through

  1. i use dev 6.1.13 kernel, to get this run armbian-update -k 6.1.13 -v dev if you want you can try mainline boot, add -m yes in that command
  2. replace dtb meson-sm1-x96-max-plus.dtb with this compiled dtb https://github.com/salsabilng/amlogic-s9xxx-armbian/releases/download/kernel_5.15.95/5.15.95.tar.gz
  3. reboot and good luck

@ophub ophub added the documentation Improvements or additions to documentation label Feb 26, 2023
@salsabilng
Copy link

I've added new dtb called meson-sm1-x96-max-plus-2101.dts, this will enable the rtl8822cs bluetooth and the Wifi on 2101 box. The Wifi are stable and show no error. I have open PR on unifreq 6.1. hope it will accepted soon

unifreq/linux-6.1.y#13

@ophub
Copy link
Owner

ophub commented Feb 27, 2023

I left a message for him. You submitted this dts to 5.15 and the other three lts kernels

@drafort
Copy link
Author

drafort commented Feb 27, 2023

I'm sorry for the delay.
Thank you for help!
I'll make test today and will leave feedback

@drafort
Copy link
Author

drafort commented Feb 27, 2023

Result for me:
(kernel was updated without adding "-m yes", dtb was used as attached - for "max_plus" )
Screenshot_20230227_185119
As I see: no Bluetooth devices.

@salsabilng
Copy link

I left a message for him. You submitted this dts to 5.15 and the other three lts kernels

thanks! will do,

@salsabilng
Copy link

im able to reproduce your error, it turns out only boot from emmc works. so you need to install it to emmc

@drafort
Copy link
Author

drafort commented Mar 1, 2023

Hello!
Is it possible to inform then "meson-sm1-x96-max-plus-2101.dts" will be included in "iso" release?

@ophub
Copy link
Owner

ophub commented Mar 1, 2023

Can bluetooth and wireless work normally?

@salsabilng
Copy link

havent tried bluetooth for transfer any files, but it can pair and discover any device. for wireless, i have decrease the max frequency, little slow but stable for couple days now

@salsabilng
Copy link

recall that i use 6.1.y kernel,

@ophub
Copy link
Owner

ophub commented Mar 2, 2023

You submitted this dts to 5.4/5.10/5.15 kernels

@salsabilng
Copy link

salsabilng commented Mar 2, 2023

done. waiting for approval. thanks!

@drafort
Copy link
Author

drafort commented Mar 2, 2023

As I understand it, Bluetooth will work only when system installed on EMMC. To install on EMMC, you must specify the type of device from "armbian-install" menu. Now 2101 is not specified in device list.
Now I tested to run 6.1 (ophub) form usb with 2101.dtb from salsabilng. In rfkill hci0 is listed, but in "hcitool dev" - no devices.

@salsabilng
Copy link

armbian-install , select x96-max-plus. then copy 2101 dtb to /boot/dtb/amlogic . edit uEnv.txt change line to FDT=/dtb/amlogic/meson-sm1-x96-max-plus-2101.dtb

@salsabilng
Copy link

i have question @ophub, whats the difference between usb and mmc boot process, why the bluetooth only works in mmc?

@ophub
Copy link
Owner

ophub commented Mar 3, 2023

The u-boot boot sequence is different.
Generally, the situation encountered is the opposite of yours. It is normal to start and use it on the usb, but it cannot be used when writing to emmc. You have filled in the blank again.

Don't forget to submit your dts to the internal kernel library. Because other kernels don't have it, you can't add this option to the default installation list. Otherwise, other kernels can't use it because they don't have a dtb.

@drafort
Copy link
Author

drafort commented Mar 3, 2023

Thank you!
However, is it possible to make Bluetooth work when booting from usb in the near future? Because now I need to have two systems: Android on emmc and armbian on usb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation new box Research Fills in the Blanks support This need is supported
Projects
None yet
Development

No branches or pull requests

3 participants