Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bluetooth support for Orange PI 3 LTS #3896

Merged
merged 1 commit into from Jun 15, 2022

Conversation

pierre-pretorius
Copy link
Collaborator

@pierre-pretorius pierre-pretorius commented Jun 13, 2022

Description

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

orangepi-xunlong/orangepi-build@ef22bd4
orangepi-xunlong/orangepi-build@ed6d012
orangepi-xunlong/orangepi-build@7d01d1d

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:

  • My code follows the style guidelines of this project
  • 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
  • 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.
orangepi-xunlong/orangepi-build#24

@EvilOlaf
Copy link
Member

@afaulkner420 can you test this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

None yet

3 participants