← Back to team overview

ubuntu-phone team mailing list archive

Re: [PATCH] grouper: add hciattach and bttest to init

 

On 03/22/2013 01:13 PM, Mathieu Trudel-Lapierre wrote:
From: Mathieu Trudel-Lapierre <mathieu-tl@xxxxxxxxxx>

Adding back hciattach (removed at 4.2, used to be in jb...) to properly patch
the bluetooth chip with its firmware, also add bttest as a jumping board for
initializing the device, we already build it and it contains all the code
necessary to power on and enable bluetooth.

Signed-off-by: Mathieu Trudel-Lapierre <mathieu-tl@xxxxxxxxxx>
---
  init.grouper.rc | 13 +++++++++++++
  1 file changed, 13 insertions(+)

diff --git a/init.grouper.rc b/init.grouper.rc
index c059e24..ced1078 100644
--- a/init.grouper.rc
+++ b/init.grouper.rc
@@ -237,6 +237,11 @@ service btmacreader /system/bin/btmacreader
      class main
      oneshot

+# Start/initialize bluetooth
+service btenable /system/xbin/bttest enable
+    class main
+    oneshot
+
  service wpa_supplicant /system/bin/wpa_supplicant \
      -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
      #   we will start as root and wpa_supplicant will switch to user wifi
@@ -313,6 +318,14 @@ service bugreport /system/bin/bugmailer.sh -b /system/media/audio/ui/Dock.ogg -e
      oneshot
      keycodes 115 114

+#BCM
+service hciattach /system/bin/brcm_patchram_plus --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \
+    --baudrate 3000000 --use_baudrate_for_download --patchram /etc/firmware/bcm4330.hcd --no2bytes --enable_lpm --tosleep=50000 /dev/ttyHS2
+  user bluetooth
+  group bluetooth net_bt_admin
+  class main
+  disabled
+
  # Start GPS daemon
    on boot
    service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml


Applied, thanks!

Cheers,
--
Ricardo Salveti de Araujo


References