3 3
data

OrangePi Lite2 & 3 Bluetooth

Recommended Posts

In an effort to enable Bluetooth on the OrangePi (Lite2 | 3) I am stuck at enabling UART1 via overlay.

According to the schematics, the AP6255 is connected via UART1 (PG6-PG9) to the H6 SoC but not defined in the dtb.

 

Since there is a dtbo which looks promising at /boot/dtb/allwinner/overlay/sun50i-h6-uart1.dtbo I tried adding an

overlay to /boot/armbianEnv.txt - manually and via armbian-config. Both did not work out.

 

In addition,  I also tried adding uart1 to the dtb, without success.

 

What am I missing?

 

 

Share this post


Link to post
Share on other sites

I had to disable this patch since it breaks building. It will be operational when DEV is switched to 5.1.y.

Share this post


Link to post
Share on other sites
On 4/28/2019 at 9:20 AM, Igor said:

I had to disable this patch since it breaks building. It will be operational when DEV is switched to 5.1.y.

Current as of today is 5.0.10

 

So is 5.10.y far out? Is there any short term solution to get BT up and running? I mean I ordered a BT USB Stick to flash to Zigbee, would that work in the mean time if I don't flash it as a normal BT stick?

Share this post


Link to post
Share on other sites
4 hours ago, SchmuseTigger said:

Is there any short term solution to get BT up and running?

I don't think so, at least not "short term" ...

 

4 hours ago, SchmuseTigger said:

So is 5.10.y far out?

You mean 5.1.0, not 5.10.y :P

I hope, only Linus Torvald could answer ... He had released RC6 recently ...

Share this post


Link to post
Share on other sites
11 hours ago, SchmuseTigger said:

..I ordered a BT USB Stick to flash to Zigbee, would that work in the mean time if I don't flash it as a normal BT stick? 

What kind of stick is that?

Share this post


Link to post
Share on other sites
11 hours ago, data said:

What kind of stick is that?

ah I see, it is really only Zigbee from what I can see (Wireless Zigbee CC2531) with the alternative Firmware it just can do a lot more, but does not look like as if it would function like a normal BT stick. Well, so either I wait for a BT driver or as an alternative buy another BT stick. Is there a well known/well supported one out there?

Share this post


Link to post
Share on other sites
18 hours ago, martinayotte said:

I don't think so, at least not "short term" ...

Thanks. Your WiFi solution was really simple, so I thought maybe there is something similar out there. 

Share this post


Link to post
Share on other sites
On 4/29/2019 at 3:35 PM, martinayotte said:

I don't think so, at least not "short term" ...

 

You mean 5.1.0, not 5.10.y :P

I hope, only Linus Torvald could answer ... He had released RC6 recently ...

So 5.1 is out now, does that mean there is hope for BT "soon"?

Share this post


Link to post
Share on other sites
2 hours ago, SchmuseTigger said:

So 5.1 is out now, does that mean there is hope for BT "soon"?

 

hmm, what about this page?

 

" New Devices Supported "

H6

Beelink GS1

"Xunlong Orange Pi 3"

 

Let's find out in the next weeks when 5.2-RC kernels will appear

Share this post


Link to post
Share on other sites
2 hours ago, dolphs said:

Let's find out in the next weeks when 5.2-RC kernels will appear


No, sadly you will only get what is already present in Armbian. Less than that.

Share this post


Link to post
Share on other sites
22 hours ago, dolphs said:

 

hmm, what about this page?

 

" New Devices Supported "

H6

Beelink GS1

"Xunlong Orange Pi 3"

 

Let's find out in the next weeks when 5.2-RC kernels will appear

Holy shit! Thanks! Nice! But shows how "slow" software comes and how maybe not clever it was to buy that thing that early. But I wanted something to thinker with and thinker it is :)

 

Still love it for the eMMC + 2GB RAM 

Share this post


Link to post
Share on other sites

With the boot-issue now resolved, the last nightly enables overlay-support for uart1.

This is one more step towards working bluetooth on the lite2 and Orange Pi 3.

 

Anyone interested is invited to do further testing.

So far, I can enable the uart1 overlay either in armbianEnv.txt or via armbian-config.

This gives us /dev/ttyS1 - at least it's there in dmesg and /dev/ttyS1 exists. Since the bluetooth module is connected via uart1, the

next steps are to attach it. From my understanding, this needs the hci_uart module, which can be loaded via

$ sudo modprobe hci_uart

 

In addition, the btbcm module is required but this should be already loaded. So 'sudo modprobe btbcm' should not be necessary.

You can verify if it is loaded via: $ lsmod | grep btbcm

This in place, we should be able to attach the uart-port using hciattach. Now this is the point, where I am stuck.

 

Typically, you do something along

$ sudo hciattach /dev/ttyS1 bcm43xx 921600 noflow -

However, I tried a couple of different baudrates as well as with and without flow-control without success.

According to a couple of related posts, on success, one should see that the firmware is being loaded at this point.

 

Any ideas or suggestions?

 

Share this post


Link to post
Share on other sites
1 hour ago, megi said:

Bluetooth is supported in my kernel. All you need is have firmware in /lib/firmware and then run:

 

  btmgmt public-addr 00:03:19:9e:8b:00

 

or some other address. After boot.

 

How to get FW is described here:

https://megous.com/git/linux/commit/?h=opi3-5.2&id=9c296799c4d3dd90986833cfded392098c1979bd

 

(On orange pi 3 that is)

Is there a newbie friendly way to do that? Or can you link me to a simple guide or a search term?

Share this post


Link to post
Share on other sites
Quote

Is there a newbie friendly way to do that? 

Nope. The easiest way would be to wait until Linux 5.2 is released and the sunxi64 dev branch will be switched. 

Or you get lucky and @martinayotte wants to spare some free time to play around with the pre-5.2 sources.

Share this post


Link to post
Share on other sites
24 minutes ago, Werner said:

Or you get lucky and @martinayotte wants to spare some free time to play around with the pre-5.2 sources.

Maybe later ... I don't want to get indigestion doing too much branch switching ...

Share this post


Link to post
Share on other sites
1 hour ago, Werner said:

Nope. The easiest way would be to wait until Linux 5.2 is released and the sunxi64 dev branch will be switched. 

Or you get lucky and @martinayotte wants to spare some free time to play around with the pre-5.2 sources.

nah, I'll wait. I basically  "need" BT to use it to switch on some BT-light strips. And I can still do that with my phone, works. So for me, I'll wait. 

Share this post


Link to post
Share on other sites
4 minutes ago, SchmuseTigger said:

I basically  "need" BT to use it to switch on some BT-light strips.

You can also purchase some USB-BT dongle ...

Share this post


Link to post
Share on other sites
2 hours ago, martinayotte said:

You can also purchase some USB-BT dongle ...

true, would that then "just work"? Well, I ordered one, I'll find out soon(ish)

Share this post


Link to post
Share on other sites
1 hour ago, SchmuseTigger said:

true, would that then "just work"?

Probably, but I didn't tested it. I've only plug one showing "ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)" in "lsusb", and I've also see "btusb" module loaded ...

Install "bluez" and running "hciconfig" shows :

hci1:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING 
	RX bytes:1220 acl:0 sco:0 events:72 errors:0
	TX bytes:2788 acl:0 sco:0 commands:72 errors:0

 

 

Share this post


Link to post
Share on other sites
9 hours ago, Werner said:

Nope. The easiest way would be to wait until Linux 5.2 is released and the sunxi64 dev branch will be switched. 

Or you get lucky and @martinayotte wants to spare some free time to play around with the pre-5.2 sources.

 

This already works with 5.1 if armbian is still using my kernel patches. All that's needed is putting firmware in /lib/firmware.

Share this post


Link to post
Share on other sites
14 hours ago, megi said:

 

This already works with 5.1 if armbian is still using my kernel patches. All that's needed is putting firmware in /lib/firmware.

 

14 hours ago, megi said:

 

This already works with 5.1 if armbian is still using my kernel patches. All that's needed is putting firmware in /lib/firmware.

Yes, sounds incredible easy. But for a windows user with no experience with linux that is harder then it looks like. Is there a guide somewhere? What would I need to google to find out how to do it?

Share this post


Link to post
Share on other sites
On 5/21/2019 at 3:12 PM, SchmuseTigger said:

Is there a newbie friendly way to do that? Or can you link me to a simple guide or a search term?

Allright, I got the file downloaded and into the correct folder, but I'm stuck here:

 

The board contains AP6256 WiFi/BT module that has its bluetooth part connected to SoC's UART1 port. Enable this port, and add node for the bluetooth device.

 

The UART1 I got actived in the armbian-config. But how to I "add a node for the BT device"?

Share this post


Link to post
Share on other sites

hciattach is what you are asking for. e.g.

 

$ sudo hciattach /dev/ttyS1 bcm43xx 921600 noflow -

 

Can you attach the firmware to this thread?

Share this post


Link to post
Share on other sites

So were you able to configure the device using hciattach?

Share this post


Link to post
Share on other sites

@megi

I noticed I already had the firmware for ap6255 at /lib/firmware on the lite2 but I am still not able to attach the device to uart1

How have you managed to configure uart1? Or are there some relevant differences in the kernel which haven't been ported to

the lite2 built yet?

Share this post


Link to post
Share on other sites

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...
3 3