data Posted April 27, 2019 Share Posted April 27, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 27, 2019 Share Posted April 27, 2019 1 hour ago, data said: What am I missing? A quick look at DT sources reveal me that UART1 doesn't have the "pinctrl-0 = <&uart1_pins>;" parameter, while other UART have theirs. I will fix that later today ... EDIT : Here is the commit for both NEXT and DEV : https://github.com/armbian/build/commit/28e8b699adb2c7eca1702ea8c86ab2f650874166 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted April 28, 2019 Share Posted April 28, 2019 I had to disable this patch since it breaks building. It will be operational when DEV is switched to 5.1.y. 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted April 29, 2019 Share Posted April 29, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 29, 2019 Share Posted April 29, 2019 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 I hope, only Linus Torvald could answer ... He had released RC6 recently ... 0 Quote Link to comment Share on other sites More sharing options...
data Posted April 29, 2019 Author Share Posted April 29, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted April 30, 2019 Share Posted April 30, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted April 30, 2019 Share Posted April 30, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 6, 2019 Share Posted May 6, 2019 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 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"? 0 Quote Link to comment Share on other sites More sharing options...
dolphs Posted May 6, 2019 Share Posted May 6, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted May 6, 2019 Share Posted May 6, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 7, 2019 Share Posted May 7, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
data Posted May 15, 2019 Author Share Posted May 15, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 17, 2019 Share Posted May 17, 2019 None, but I'll follow you your progress and hope you get it to work 0 Quote Link to comment Share on other sites More sharing options...
megi Posted May 21, 2019 Share Posted May 21, 2019 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) 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted May 21, 2019 Share Posted May 21, 2019 51 minutes ago, megi said: Bluetooth is supported in my kernel. Thanks, @megi ! 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 21, 2019 Share Posted May 21, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted May 21, 2019 Share Posted May 21, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted May 21, 2019 Share Posted May 21, 2019 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 ... 1 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 21, 2019 Share Posted May 21, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted May 21, 2019 Share Posted May 21, 2019 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 ... 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 21, 2019 Share Posted May 21, 2019 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) 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted May 21, 2019 Share Posted May 21, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
megi Posted May 21, 2019 Share Posted May 21, 2019 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. 1 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 22, 2019 Share Posted May 22, 2019 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? 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 25, 2019 Share Posted May 25, 2019 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"? 0 Quote Link to comment Share on other sites More sharing options...
data Posted May 25, 2019 Author Share Posted May 25, 2019 hciattach is what you are asking for. e.g. $ sudo hciattach /dev/ttyS1 bcm43xx 921600 noflow - Can you attach the firmware to this thread? 0 Quote Link to comment Share on other sites More sharing options...
SchmuseTigger Posted May 25, 2019 Share Posted May 25, 2019 18 minutes ago, data said: Can you attach the firmware to this thread? Sure, in the link from above: https://github.com/orangepi-xunlong/OrangePiH6_external/tree/master/ap6256 root@orangepi3:/dev# sudo hciattach /dev/ttyS1 bmc4345c5 921600 noflow - Unknown device type or id 0 Quote Link to comment Share on other sites More sharing options...
data Posted May 25, 2019 Author Share Posted May 25, 2019 So were you able to configure the device using hciattach? 0 Quote Link to comment Share on other sites More sharing options...
data Posted May 25, 2019 Author Share Posted May 25, 2019 @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? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.