Larry Bank Posted November 20, 2017 Share Posted November 20, 2017 Is there some DT overlay to enable or some software to install to use the onboard bluetooth radio of the Orange Pi Zero Plus 2? Link to comment Share on other sites More sharing options...
Igor Posted November 20, 2017 Share Posted November 20, 2017 No proper quick hack solution yet. https://github.com/armbian/build/commit/d95d45f20947661c17d3d1ee3b1ba964de677cb4 Link to comment Share on other sites More sharing options...
Evi Posted December 5, 2017 Share Posted December 5, 2017 Hello everyone, I managed to have armbian running on my H5, nearly everything is fine so far, boots from NAND, have NodeJs perfectly running, but i do need to have Bluetooth support, basically that was a reason why i got the board. Anyone can tell me how to enable BT support from command line please? Regards, Evi Link to comment Share on other sites More sharing options...
Igor Posted December 5, 2017 Share Posted December 5, 2017 3 hours ago, Evi said: Anyone can tell me how to enable BT support from command line please? It is not implemented yet. You can use some USB based until then - it should work out of the box. You only need to enable Bluetooth support within armbian-config or install appropriate userspace packages manually. Link to comment Share on other sites More sharing options...
happyzax Posted February 18, 2018 Share Posted February 18, 2018 Is there an issue for this or some other way I can track it's status? I'd really like to help and get this working, but I am having trouble getting started. I have setup the build environment and have created images for the OPiZero2+H5 but have no idea what to try to get BT up and running. There are scattered hints here in the forums, but most are over my head. Is there a resource that would guide me in the right direction? Thanks. Link to comment Share on other sites More sharing options...
StephenW Posted March 3, 2018 Share Posted March 3, 2018 On 2/18/2018 at 9:48 AM, happyzax said: Is there an issue for this or some other way I can track it's status? I'd really like to help and get this working, but I am having trouble getting started. I have setup the build environment and have created images for the OPiZero2+H5 but have no idea what to try to get BT up and running. There are scattered hints here in the forums, but most are over my head. Is there a resource that would guide me in the right direction? Thanks. Happysax I am trying to contribute also and I just came across in the armbian doc with this: https://docs.armbian.com/Process_Contribute/ I’m still learning, yet see if that would help Link to comment Share on other sites More sharing options...
thc013 Posted May 6, 2018 Share Posted May 6, 2018 enable overlay uart 1 and add param_uart1_rtscts=1 to armbianenv.txt and adjust /etc/init.d/ap6212-bluetooth so it looks like this # Start patching rfkill unblock all echo "0" > /sys/class/rfkill/rfkill0/state echo "1" > /sys/class/rfkill/rfkill0/state echo " " > /dev/$PORT devmem2 0x1f00060 b 1 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value echo 1 > /sys/class/gpio/gpio10/value sleep 0.1 hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS hciconfig hci0 up and reboot oh you might need to install devmem2 1 Link to comment Share on other sites More sharing options...
happyzax Posted May 6, 2018 Share Posted May 6, 2018 Thanks for this precious information! I've had this bleeding Orange Pi Zero 2+ H5 for like a year now, and finally someone has figured out the BT. Excellent work! Link to comment Share on other sites More sharing options...
TonyMac32 Posted May 7, 2018 Share Posted May 7, 2018 @Myy I wonder if this might be able to be adapted for Tinker mainline bluetooth? So much time so little to do!... Strike that, reverse it. 1 Link to comment Share on other sites More sharing options...
rusatch Posted May 7, 2018 Share Posted May 7, 2018 20 hours ago, thc013 said: oh you might need to install devmem2 On debian devmem2 not available. Debian users should install it from http://launchpadlibrarian.net/153545374/devmem2_0.0-0ubuntu1_arm64.deb Link to comment Share on other sites More sharing options...
thc013 Posted May 7, 2018 Share Posted May 7, 2018 all this could be implanted in the dts file its only uart1 on default and pin 10 enabled oh yeah and the clock Link to comment Share on other sites More sharing options...
Myy Posted May 8, 2018 Share Posted May 8, 2018 On 5/7/2018 at 3:02 AM, TonyMac32 said: @Myy I wonder if this might be able to be adapted for Tinker mainline bluetooth? So much time so little to do!... Strike that, reverse it. Aha ! I'll try this tonight ! Though I forgot the chip they used in the Tinky. It's a broadcom too ? I'll take a look. Link to comment Share on other sites More sharing options...
TonyMac32 Posted May 8, 2018 Share Posted May 8, 2018 It's a Realtek 8723BS, but operates the same way. (any guess what BS stands for? ;-) ). I actually think we should wipe out the DTS entry that's there for it and start over, since that one appears to be tied somehow to the Rockchip special rfkill system. I was able to get it to start the handshake by toggling the gpio pins associated, so this might be a template for getting to to work properly. Ok, enough off-topic. :-D Link to comment Share on other sites More sharing options...
thc013 Posted May 17, 2018 Share Posted May 17, 2018 huh wipe out you only have to add the clock and extra gpio pin in the dts file . Link to comment Share on other sites More sharing options...
zhen8838 Posted May 27, 2018 Share Posted May 27, 2018 On 5/6/2018 at 5:23 PM, thc013 said: enable overlay uart 1 and add param_uart1_rtscts=1 to armbianenv.txt and adjust /etc/init.d/ap6212-bluetooth so it looks like this # Start patching rfkill unblock all echo "0" > /sys/class/rfkill/rfkill0/state echo "1" > /sys/class/rfkill/rfkill0/state echo " " > /dev/$PORT devmem2 0x1f00060 b 1 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value echo 1 > /sys/class/gpio/gpio10/value sleep 0.1 hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS hciconfig hci0 up and reboot oh you might need to install devmem2 I use this solution what you had wrote,but the effect is not significant. my img is Armbian_5.42_Orangepizeroplus2-h5_Debian_stretch_dev_4.16.img . It's my armbianEnv.txt: verbosity=1 console=both overlay_prefix=sun50i-h5 overlays=analog-codec i2c0 i2c1 i2c2 spdif-out spi-add-cs1 spi-jedec-nor spi-spi dev uart1 uart2 uart3 usbhost2 usbhost3 rootdev=UUID=7c11e787-9feb-44a1-9942-c646b86c1d10 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u param_uart1_rtscts=1 It's my /etc/init.d/ap6212-bluetoot # Start patching rfkill unblock all echo "0" > /sys/class/rfkill/rfkill0/state echo "1" > /sys/class/rfkill/rfkill0/state echo " " > /dev/$PORT devmem2 0x1f00060 b 1 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value echo 1 > /sys/class/gpio/gpio10/value sleep 0.1 #on orangepi win following command never ends on first try... force to r un with a timeout... #timeout 5s echo " " > /dev/$PORT #if [ $? != 0 ]; then #timed out... retry # echo " " > /dev/$PORT #fi hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS hciconfig hci0 up but when i reboot or use this /etc/init.d/ap6212-bluetooth start return [....] Starting ap6212-bluetooth (via systemctl): ap6212-bluetooth.serviceWarning: ap6212-bluetooth.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for ap6212-bluetooth.service failed because the control process exited with error code. See "systemctl status ap6212-bluetooth.service" and "journalctl -xe" for details. failed! the log: root@H5:~# systemctl status ap6212-bluetooth.service ● ap6212-bluetooth.service - LSB: Patch firmware for ap6212 adapter Loaded: loaded (/etc/init.d/ap6212-bluetooth; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2018-05-27 06:20:39 UTC; 2min 16s ago Docs: man:systemd-sysv-generator(8) Process: 2164 ExecStart=/etc/init.d/ap6212-bluetooth start (code=exited, status=1/FAILURE) May 27 06:20:29 H5 ap6212-bluetooth[2164]: Value at address 0x1F00060 (0xffff97239060): 0x1 May 27 06:20:29 H5 ap6212-bluetooth[2164]: Written 0x1; readback 0x1 May 27 06:20:29 H5 ap6212-bluetooth[2164]: sh: echo: I/O error May 27 06:20:39 H5 ap6212-bluetooth[2164]: Initialization timed out. May 27 06:20:39 H5 ap6212-bluetooth[2164]: bcm43xx_init May 27 06:20:39 H5 ap6212-bluetooth[2164]: Can't get device info: No such device May 27 06:20:39 H5 systemd[1]: ap6212-bluetooth.service: Control process exited, code=exited status=1 May 27 06:20:39 H5 systemd[1]: Failed to start LSB: Patch firmware for ap6212 adapter. May 27 06:20:39 H5 systemd[1]: ap6212-bluetooth.service: Unit entered failed state. May 27 06:20:39 H5 systemd[1]: ap6212-bluetooth.service: Failed with result 'exit-code'. Warning: ap6212-bluetooth.service changed on disk. Run 'systemctl daemon-reload' to reload units. Is it wrong to use it? or How can i fix it? Link to comment Share on other sites More sharing options...
rusatch Posted May 27, 2018 Share Posted May 27, 2018 1 hour ago, zhen8838 said: Is it wrong to use it? or How can i fix it? You have to install devmem2 Link to comment Share on other sites More sharing options...
zhen8838 Posted May 27, 2018 Share Posted May 27, 2018 16 minutes ago, rusatch said: You have to install devmem2 Thank you for your reply! but I'am already install devmem2,I think my mistake is somewhere else. i use this script to test: #!/bin/bash PORT="ttyS1" MAC_OPTIONS="43:29:B1:55:01:01" rfkill unblock all echo "0" > /sys/class/rfkill/rfkill0/state echo "1" > /sys/class/rfkill/rfkill0/state echo " " > /dev/$PORT devmem2 0x1f00060 b 1 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value echo 1 > /sys/class/gpio/gpio10/value sleep 0.1 hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS hciconfig hci0 up result: root@H5:~# ./blue.sh /dev/mem opened. Memory mapped at address 0xffff9eab1000. Value at address 0x1F00060 (0xffff9eab1060): 0x1 Written 0x1; readback 0x1 bcm43xx_init Initialization timed out. Can't get device info: No such device devmem2 seems are correct... I don't know what to do now Link to comment Share on other sites More sharing options...
zador.blood.stained Posted May 27, 2018 Share Posted May 27, 2018 2 hours ago, zhen8838 said: my img is Armbian_5.42_Orangepizeroplus2-h5_Debian_stretch_dev_4.16.img 30 minutes ago, zhen8838 said: I don't know what to do now Don't use "dev" branch images because they have broken overlays. Only "next" branch images with kernel 4.14 may work. Link to comment Share on other sites More sharing options...
zhen8838 Posted May 27, 2018 Share Posted May 27, 2018 44 minutes ago, zador.blood.stained said: Don't use "dev" branch images because they have broken overlays. Only "next" branch images with kernel 4.14 may work. Thank you ! I'm so sad , Because when i use Armbian_5.38_Orangepizeroplus2-h5_Ubuntu_xenial_next_4.14.14.img, This problem has arisen "Starting kernel" reboots. Now i try to use the nanopi-neo-plus2 image . If I successfully solve, I will feedback in time Link to comment Share on other sites More sharing options...
zhen8838 Posted May 29, 2018 Share Posted May 29, 2018 My problem has been solved,I compiled a new image :Armbian_5.45_Orangepizeroplus2-h5_Debian_stretch_next_4.14.44.img . 1 Link to comment Share on other sites More sharing options...
thc013 Posted June 11, 2018 Share Posted June 11, 2018 thnx zhen8883 i didm't notice that bluetooth was again not working . last weeks i fighting with spi and a nrf20l01 i can't get it working with mysensors and the rf24 lib works a bit but i tried al armbians from 5.38 till 5.46 and kernels from 4.14.14 till 4.14.48 and suddenly it is not working anymore . and i saw your blogs and tried a orangepi distro and works right away when activate it . only thing that was mentioned in the mailine bluetooth thread was that the rts and cts are not bind to uart1 in the dts file so i include them and and put them both in the main dts but no effect i got the info from other threads but hte problems are similar i guess it is the binding of uart1 or the wake up routine is not going well Link to comment Share on other sites More sharing options...
thc013 Posted June 12, 2018 Share Posted June 12, 2018 a bit futher make sure devmem2 0x1f00060 b 1 give as result Value at address 0x1F00060 (0xffff9eab1060): 0x1 Link to comment Share on other sites More sharing options...
happyzax Posted June 20, 2018 Share Posted June 20, 2018 Just installed the latest nightly, did an upgrade and sure enough BT is not working anymore. The fix no longer works. Dang! Almost had it! Link to comment Share on other sites More sharing options...
Recommended Posts