Jump to content

[Pull Request] - Add bluetooth support for Orange PI 3 LTS


Recommended Posts

Posted

Description

This change makes Bluetooth work with the Orange PI 3 LTS. It's based on these commits:

https://github.com/orangepi-xunlong/orangepi-build/commit/ef22bd4b078388eab200a68384a6dff8d959dcb0 https://github.com/orangepi-xunlong/orangepi-build/commit/ed6d012459461014d41acd22316c1643ff94a127 https://github.com/orangepi-xunlong/orangepi-build/commit/7d01d1d61c99b3038601f061751a46920446f189

How Has This Been Tested?

I build focal current image and test on OPI 3 LTS. Before this change, there is no /sys/class/bluetooth. After this change I can scan bluetooth and pair with my mobile phone.

pierre@orangepi3-lts:~$ ls /sys/class/blue*
hci0

pierre@orangepi3-lts:~$ systemctl status aw859a-bluetooth
● aw859a-bluetooth.service - Bluetooth AW859A
     Loaded: loaded (/lib/systemd/system/aw859a-bluetooth.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2022-06-13 22:20:32 UTC; 49min ago
   Main PID: 1286 (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 2217)
     Memory: 448.0K
     CGroup: /system.slice/aw859a-bluetooth.service
             └─1404 /usr/bin/hciattach_opi -s 1500000 /dev/ttyBT0 sprd

Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: 04 0e 04 01 a2 fc 00
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: hw_rf_cback hw_rf_cback response: [0xFCA2, 0x0000, 0x00]
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: sprd_vnd_send_hci_vsc
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: a1 fc 03 00 00 01
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: Received event, len: 9
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: 04 0e 06 01 a1 fc 00 00 01
Jun 13 22:20:32 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: hw_core_cback hw_core_cback response: [0xFCA1, 0x0000, 0x01]
Jun 13 22:20:33 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth post process
Jun 13 22:20:33 orangepi3-lts hciattach_opi[1286]: SPRD Bluetooth: Done setting line discpline
Jun 13 22:20:33 orangepi3-lts hciattach_opi[1286]: Device setup complete

pierre@orangepi3-lts:~$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-06-13 22:20:33 UTC; 50min ago
       Docs: man:bluetoothd(8)
   Main PID: 1398 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 2217)
     Memory: 1.7M
     CGroup: /system.slice/bluetooth.service
             └─1398 /usr/lib/bluetooth/bluetoothd

Jun 13 22:20:33 orangepi3-lts systemd[1]: Starting Bluetooth service...
Jun 13 22:20:33 orangepi3-lts bluetoothd[1398]: Bluetooth daemon 5.53
Jun 13 22:20:33 orangepi3-lts systemd[1]: Started Bluetooth service.
Jun 13 22:20:33 orangepi3-lts bluetoothd[1398]: Starting SDP server
Jun 13 22:20:33 orangepi3-lts bluetoothd[1398]: Bluetooth management interface 1.21 initialized

Checklist:

  • [x] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

Next steps:

There might be further issues to resolve as noted below. I didn't experience this issue myself. https://github.com/orangepi-xunlong/orangepi-build/issues/24

View the full article

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines