Jump to content

Recommended Posts

Posted

Hello

 

I cannot enable the Bluetooth on Tinkerboard device. Tried latest image, fresh install.

 

I've opened the question on StackOverflow: https://superuser.com/questions/1698728/cannot-enable-bluetooth-on-tinkerboard-armbian

It contains technical details.

 

The latest what I've found so far is it could be related to Kernel compilation flags:

 

# Extract from the /boot/config-5.10.60-rockchip

CONFIG_SERIAL_DEV_BUS=y
CONFIG_BT_HCIUART_3WIRE=y
CONFIG_BT_HCIUART_SERDEV=y
# CONFIG_BT_HCIUART_RTL - is not set
# CONFIG_SERIAL_DEV_CTRL_TTYPORT - is not set

 

I tried to download and compile the kernel and stuck. Basically I do not know where to find the kernel used to build the image.

And most of all I'm not 100% sure I have to recompile the kernel. I do not believe nobody tested the Bluetooth before. Most probably it is configuration issue.

 

Please assist

Posted
58 minutes ago, Dmytro Ovdiienko said:

It contains technical details.

 

 

58 minutes ago, Dmytro Ovdiienko said:

I tried to download and compile the kernel and stuck.


Lots of those wifi chips requires additional hacks.

 

58 minutes ago, Dmytro Ovdiienko said:

Basically I do not know

 

Perhaps checks this to get some better picture https://docs.armbian.com/User-Guide_FAQ/

 

58 minutes ago, Dmytro Ovdiienko said:

And most of all I'm not 100% sure I have to recompile the kernel.


I am also not 100% sure, investigation is required to be sure. If you plan to recompile, do it with https://docs.armbian.com/Developer-Guide_Build-Preparation/

 

58 minutes ago, Dmytro Ovdiienko said:

I do not believe nobody tested the Bluetooth before. Most probably it is configuration issue.


It was certainly tested and working, but things breaks down from time to time. We have automated testing which checks BT functionality each time its run just the problem we lack people that will deal and cash to hire them to deal with all this ...

 

Welcome :)

 

ASUS doesn't waste money so they stay on old kernel ...

Posted

Another hint to rule out if its kernel or userland hack issue - armbian-config -> system -> alternative kernels (try 5.4.y)

Posted
Quote

Armbian implements some basic 'system logging' at every startup and shutdown and contains a little utility to provide this collected information combined with some more useful debug info from user installations....

 

Following is a link to report file: http://ix.io/3OsQ

 

Quote

If you plan to recompile

 

For now before I change anything, I'd gather debugging information needed to investigate the issue.

Posted
1 hour ago, Dmytro Ovdiienko said:

There is no v5.4. Which kernel you'd like me to try?


Then we seems to remove 5.4.y ... once there are a lot of packages in the repository, updating takes hours. When its not that suffed, its fast. :( "quick check" is off the table then. Loosing some function on kernel upgrade is expected and mainly we have no resources to do anything about ... 

 

Sadly I am not that attached to this. If I run script on Tinker which is running latest 5.15.y kernel http://ix.io/3OtC
 

Spoiler
/usr/local/bin/start_bt.sh
Resetting the Bluetooth chip
	Bluetooth chip power down...
	Bluetooth chip power up...
	Resetting done
Realtek Bluetooth init uart with init speed:115200, final_speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1 

Realtek Bluetooth :3-wire sync pattern resend : 1, len: 8

Realtek Bluetooth :Get SYNC Resp Pkt

Realtek Bluetooth :Get SYNC pkt-active mode

Realtek Bluetooth :3-wire config pattern resend : 1 , len: 10
Realtek Bluetooth :Get CONFG pkt-active mode

Realtek Bluetooth :Get CONFG resp pkt-active mode

Realtek Bluetooth :H5 init finished

Realtek Bluetooth :RTK send HCI_VENDOR_READ_RTK_ROM_VERISION_Command

Realtek Bluetooth :Received reliable seqno 0 from card
Realtek Bluetooth :receive hci command complete event with command:1001

Realtek Bluetooth :Read Local Version Information with Status:0
Realtek Bluetooth :HCI Version 0x06
Realtek Bluetooth :HCI Revision 0x000b
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :RTK send HCI_VENDOR_READ_RTK_ROM_VERISION_Command

Realtek Bluetooth :Received reliable seqno 1 from card
Realtek Bluetooth :receive hci command complete event with command:fc6d

Realtek Bluetooth :Read RTK rom version with Status:0
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 1
Realtek Bluetooth :IC: RTL8723BS

Realtek Bluetooth :Firmware/config: rtl8723b_fw, rtl8723b_config

Realtek Bluetooth :config offset(00f4),length(08)
Realtek Bluetooth :config baud rate to :4928002, hwflowcontrol:5f, 1
Realtek Bluetooth :config offset(0027),length(01)
Realtek Bluetooth :config offset(00fe),length(01)
Realtek Bluetooth :config offset(01e3),length(01)
Realtek Bluetooth :config offset(00db),length(01)
Realtek Bluetooth :config offset(01df),length(01)
Realtek Bluetooth :config offset(01e2),length(01)
Realtek Bluetooth :config offset(0085),length(01)
Realtek Bluetooth :config offset(0161),length(01)
Realtek Bluetooth :Get config baud rate from config file:4928002
Realtek Bluetooth :Load FW OK
Realtek Bluetooth :rtk_get_fw_project_id: opcode 0, len 1, data 1
Realtek Bluetooth :fw_ver 0x1e4cc3ff, patch_num 2
Realtek Bluetooth :chip id 0x0001
Realtek Bluetooth :chip id 0x0002
Realtek Bluetooth :patch length is 0x5dd4
Realtek Bluetooth :start offset is 0x5680
Realtek Bluetooth :Svn version:    14422

Realtek Bluetooth :Coexistence: BTCOEX_20150119-5844

Realtek Bluetooth :fw: exists, config file: exists
Realtek Bluetooth :Total len 24088 for fw/config
Realtek Bluetooth :baudrate in change speed command: 0x2 0x80 0x92 0x4 

Realtek Bluetooth :Received reliable seqno 2 from card
Realtek Bluetooth :receive hci command complete event with command:fc17

Realtek Bluetooth :Change BD Rate with status:0
Realtek Bluetooth :final_speed 1500000

Realtek Bluetooth :hw flow control enable
Realtek Bluetooth :iEndIndex:95  iLastPacketLen:148 iAdditionpkt:5

Realtek Bluetooth :hci_download_patch tx_index:0 rx_index: -1

Realtek Bluetooth ERROR: patch timerout, retry:

Realtek Bluetooth :3-wire download patch re send:0
Realtek Bluetooth ERROR: patch timerout, retry:

Realtek Bluetooth :3-wire download patch re send:1
Realtek Bluetooth ERROR: patch timerout, retry:

Realtek Bluetooth :3-wire download patch re send:2
Terminated
Could not create hci0 through rtk_hciattach

 


Perhaps @jock or @TonyMac32 knows something about?

 

Posted

@IgorAfter I switched to v4.4 I see the Bluetooth adapter. Following is a link to report: http://ix.io/3Ovx

 

 

$ rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: phy1: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

 

$ hcitool dev
Devices:
        hci0    F0:03:8C:xx:xx:xx

 

Posted
48 minutes ago, Dmytro Ovdiienko said:

After I switched to v4.4 I see the Bluetooth adapter.

 

Kernel 4.4.y is yery different and yes, it works there. Functionality was ported to modern kernel and was working in Armbian mainline based 5.4.y kernel  (according to test framework)... and after that it obviously stopped working. This is happening all the time since Linux kernel is constantly changing. Nothing unusual.

 

Posted
18 hours ago, Igor said:

Perhaps @jock or @TonyMac32 knows something about?

Yup, I suggested the OP to write here for official support his post on rockchip tv boxes section (the answer is here).

 

To recap, I had the chance to add support for a realtek bluetooth chip using serdev framework on a rk322x board.

Serdev does all the bluetooth machinery in the kernel, so there is no need for ugly external userspace binaries.

 

I guess the tinkerboard rtl8723bs chip is suitable for that treatment also; coarse things can be made offline, but refining (device tree bits, voltage regulators) to get the thing working absolutely require access to a functioning board for proper testing.

Posted
39 minutes ago, jock said:

the thing working absolutely require access to a functioning board for proper testing.


I can donate hardware. PM for address.

Posted
On 2/2/2022 at 2:41 PM, Dmytro Ovdiienko said:

Below is a list of kernels available. There is no v5.4. Which kernel you'd like me to try?

 

image.png.ac96b911c23a6cec975ff86da490779f.png

How did you change the kernel by kernel? I can't see the option?

Posted
/dts-v1/;
/plugin/;

/ {
    fragment@0 {
		target = <&uart0>;

		__overlay__ {
			pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
			bluetooth {
				compatible = "realtek,rtl8723bs-bt";
  				device-wake-gpios = <&gpio4 26 0>;
				host-wake-gpios = <&gpio4 31 0>;
				enable-gpios = <&gpio4 29 1>;
			};
		};
    };
};

 

dtc -I dts -O dtb bt.dts -o bt.dtbo

 

would you like to try this dtbo?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines