Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Bluetooth

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/31/2014 17:00:11      1#

Hi herbat . You need to copy the bluetooth hcd file and hciattach it first.

Here're the instructions (run with root):

  1. 1. Mount Android system partition and copy out the AP6335 hcd file:
  2. # mount Android system partition
  3. mount /dev/block/mtd/by-name/system /mnt
  4. # mkdir for compatiblity
  5. mkdir -p /system/vendor/firmware
  6. # copy required hcd file
  7. cp /mnt/vendor/firmware/bcm4339a0.hcd /system/vendor/firmware/
  8. # umount
  9. umount /mnt

  10. 2. Install the neccessary bluetooth packages:
  11. apt-get install --no-install-recommends brcm-patchram-plus-nexus7 bluetooth ussp-push



  12. 3. Power on the bluetooth and do initializaion:
  13. # Power on
  14. cat /sys/class/rfkill/rfkill0/type   # bluetooth
  15. echo 1 > /sys/class/rfkill/rfkill0/state

  16. # Upload hcd file
  17. brcm_patchram_plus -d --patchram /system/vendor/firmware/bcm4339a0.hcd --baudrate 1500000 --enable_lpm --enable_hci --no2bytes /dev/ttyS0 &



  18. 4. Wait some time until the brcm_patchram_plus settles down, then use bluez related commands to test:
  19. root@firefly:~# hciconfig -a
  20. hci0:        Type: BR/EDR  Bus: UART
  21.         BD Address: 43:39:00:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
  22.         UP RUNNING PSCAN
  23.         RX bytes:1186 acl:0 sco:0 events:39 errors:0
  24.         TX bytes:956 acl:0 sco:0 commands:39 errors:0
  25.         Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
  26.         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
  27.         Link policy: RSWITCH SNIFF
  28.         Link mode: SLAVE ACCEPT
  29.         Name: 'firefly-0'
  30.         Class: 0x600100
  31.         Service Classes: Audio, Telephony
  32.         Device Class: Computer, Uncategorized
  33.         HCI Version: 4.0 (0x6)  Revision: 0x10c
  34.         LMP Version: 4.0 (0x6)  Subversion: 0x6109
  35.         Manufacturer: Broadcom Corporation (15)

  36. hci0 should be up and running now.
  37. 5. Shutdown bluetooth.
  38. echo 0 > /sys/class/rfkill/rfkill0/state
Copy the code



Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 1/8/2015 15:17:50      2#

@herbat

I tried blueman, and it paired my phone well with correct code display.


I install it with:

sudo apt-get install blueman notify-osd


Maybe you need to launch the blueman-applet in a terminal window to see detailed log.

Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list