summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--bluetooth-firmware-bcm.manifest7
-rw-r--r--bluetooth-firmware-bcm.rule9
-rw-r--r--firmware/CMakeLists.txt7
-rw-r--r--firmware/bcm4334w/BCM43342A1_001.002.003.0987.0000_Murata_Type1CC_ePA_RFtest_LE_7dBm_adj_temp.hcdbin49919 -> 0 bytes
-rwxr-xr-xfirmware/bcm4334w/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcdbin48926 -> 0 bytes
-rwxr-xr-xfirmware/bcm4334w/BCM4334W0_001.002.003.0013.0016_Ponte_Solo_Semco_B58_Reset_Picky_12dBm.hcdbin63359 -> 0 bytes
-rwxr-xr-xfirmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58.hcdbin63355 -> 0 bytes
-rwxr-xr-xfirmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcdbin62872 -> 0 bytes
-rw-r--r--firmware/bcm4334w/BCM4334W_001.002.003.1005.1084_B58_ePA.hcdbin49351 -> 0 bytes
-rwxr-xr-xfirmware/bcm4334w/ReleaseNote_BCM4334W0_001.002.003.0014.0000_Samsung_Ponte Solo.pdfbin242180 -> 0 bytes
-rw-r--r--firmware/bcm4343/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcdbin0 -> 36501 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0043.0110_ORC_SWB-B59.hcdbin31301 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0044.0125_ORC_Ponte_Solo-3G.hcdbin31666 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0044.0129_ENG_Ponte_Solo-3G.HCDbin31899 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0045.0132_ORC_A4WP_Ponte_Solo-3G.hcdbin33268 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0048.0144_ORC_A4WP_Ponte_Solo-3G.hcdbin34092 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcdbin33887 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A1_001.002.009.0005.0006_ENG_SEMCO-B59.hcdbin5470 -> 0 bytes
-rw-r--r--firmware/bcm4343w/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcdbin9597 -> 0 bytes
-rw-r--r--firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0043.0110_ORC_SEMCO_SWB-B59.txt48
-rw-r--r--firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0045.0132_A4WP_Ponte_Solo-3G.txt47
-rw-r--r--firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0144_A4WP_Ponte_Solo-3G.txt55
-rw-r--r--firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.txt54
-rw-r--r--firmware/bcm4343w/ReleaseNotes_BCM4343A1_001.002.009.0009.0012_Ponte_Solo-3G.txt37
-rw-r--r--packaging/bluetooth-firmware-bcm.spec70
-rwxr-xr-xpackaging/bluetooth-hci-device.service11
-rwxr-xr-xpackaging/bluetooth-hciattach@.service13
-rw-r--r--scripts/CMakeLists.txt8
-rwxr-xr-xscripts/bt-dev-end.sh9
-rwxr-xr-xscripts/bt-dev-start-c210.sh8
-rwxr-xr-xscripts/bt-dev-start-msm8974.sh6
-rwxr-xr-xscripts/bt-dev-start-sprdtrum.sh (renamed from scripts/bt-dev-start-msm8x26.sh)50
-rwxr-xr-xscripts/mobile/bt-dev-start-e4412.sh8
-rwxr-xr-xscripts/wearable/bt-dev-start-e4412.sh10
-rw-r--r--tools/CMakeLists.txt24
-rw-r--r--tools/bcmtool.c (renamed from tools/bcmtool_4330b3_w.c)208
-rw-r--r--tools/bcmtool_4330b1_m.c (renamed from tools/bcmtool_4330m0_m.c)2
-rw-r--r--tools/bcmtool_4330b1_w.c (renamed from tools/bcmtool_4330b2_w.c)2
39 files changed, 221 insertions, 474 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94e9747..2c2c5ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,3 +10,5 @@ ADD_SUBDIRECTORY(set-address)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(firmware)
ADD_SUBDIRECTORY(scripts)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/bluetooth-firmware-bcm.rule DESTINATION /etc/smack/accesses.d)
diff --git a/bluetooth-firmware-bcm.manifest b/bluetooth-firmware-bcm.manifest
index a3dc534..17a69b1 100644
--- a/bluetooth-firmware-bcm.manifest
+++ b/bluetooth-firmware-bcm.manifest
@@ -2,7 +2,8 @@
<define>
<domain name="bt_firmware"/>
</define>
- <request>
- <domain name="bt_firmware"/>
- </request>
+ <assign>
+ <filesystem path="/usr/etc/bluetooth/*" label="_" exec_label="none"/>
+ <filesystem path="/etc/smack/accesses.d/bluetooth-firmware-bcm.rule" label="_" exec_label="none"/>
+ </assign>
</manifest>
diff --git a/bluetooth-firmware-bcm.rule b/bluetooth-firmware-bcm.rule
new file mode 100644
index 0000000..b3a871f
--- /dev/null
+++ b/bluetooth-firmware-bcm.rule
@@ -0,0 +1,9 @@
+bt_firmware bluez rwx---
+bluez bt_firmware rwx---
+dbus bt_firmware rwx---
+systemd::script::bt_firmware bluez rwx---
+systemd::script::bt_firmware bt_firmware rwx---
+systemd::script::bt_firmware procps r-x---
+systemd::script::bt_firmware rfkill r-x---
+systemd::script::bt_firmware system::sys_logging --x---
+systemd::script::bt_firmware wifi-loader r-----
diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt
index 389c4dd..22b4a82 100644
--- a/firmware/CMakeLists.txt
+++ b/firmware/CMakeLists.txt
@@ -14,8 +14,5 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4334w/BCM4334W_001.002.003.0997.102
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4335/BCM4335B0_002.001.006.0233.0234_ORC_RedWood.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4339/BCM4339_003.001.009.0030.0122_ORC_RedWood.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-# files for msm8x26
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4334w/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4343w/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4343w/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
+#kiran
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bcm4343/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
diff --git a/firmware/bcm4334w/BCM43342A1_001.002.003.0987.0000_Murata_Type1CC_ePA_RFtest_LE_7dBm_adj_temp.hcd b/firmware/bcm4334w/BCM43342A1_001.002.003.0987.0000_Murata_Type1CC_ePA_RFtest_LE_7dBm_adj_temp.hcd
deleted file mode 100644
index fe687d7..0000000
--- a/firmware/bcm4334w/BCM43342A1_001.002.003.0987.0000_Murata_Type1CC_ePA_RFtest_LE_7dBm_adj_temp.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd b/firmware/bcm4334w/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd
deleted file mode 100755
index cb27e32..0000000
--- a/firmware/bcm4334w/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/BCM4334W0_001.002.003.0013.0016_Ponte_Solo_Semco_B58_Reset_Picky_12dBm.hcd b/firmware/bcm4334w/BCM4334W0_001.002.003.0013.0016_Ponte_Solo_Semco_B58_Reset_Picky_12dBm.hcd
deleted file mode 100755
index c39d57c..0000000
--- a/firmware/bcm4334w/BCM4334W0_001.002.003.0013.0016_Ponte_Solo_Semco_B58_Reset_Picky_12dBm.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58.hcd b/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58.hcd
deleted file mode 100755
index a8aef2a..0000000
--- a/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd b/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd
deleted file mode 100755
index c974dc1..0000000
--- a/firmware/bcm4334w/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/BCM4334W_001.002.003.1005.1084_B58_ePA.hcd b/firmware/bcm4334w/BCM4334W_001.002.003.1005.1084_B58_ePA.hcd
deleted file mode 100644
index d3d530f..0000000
--- a/firmware/bcm4334w/BCM4334W_001.002.003.1005.1084_B58_ePA.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4334w/ReleaseNote_BCM4334W0_001.002.003.0014.0000_Samsung_Ponte Solo.pdf b/firmware/bcm4334w/ReleaseNote_BCM4334W0_001.002.003.0014.0000_Samsung_Ponte Solo.pdf
deleted file mode 100755
index 41ee8d3..0000000
--- a/firmware/bcm4334w/ReleaseNote_BCM4334W0_001.002.003.0014.0000_Samsung_Ponte Solo.pdf
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd b/firmware/bcm4343/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd
new file mode 100644
index 0000000..8966d0e
--- /dev/null
+++ b/firmware/bcm4343/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0043.0110_ORC_SWB-B59.hcd b/firmware/bcm4343w/BCM4343A0_001.001.034.0043.0110_ORC_SWB-B59.hcd
deleted file mode 100644
index 0591453..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0043.0110_ORC_SWB-B59.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0125_ORC_Ponte_Solo-3G.hcd b/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0125_ORC_Ponte_Solo-3G.hcd
deleted file mode 100644
index e3a8b06..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0125_ORC_Ponte_Solo-3G.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0129_ENG_Ponte_Solo-3G.HCD b/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0129_ENG_Ponte_Solo-3G.HCD
deleted file mode 100644
index 6963df3..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0044.0129_ENG_Ponte_Solo-3G.HCD
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0045.0132_ORC_A4WP_Ponte_Solo-3G.hcd b/firmware/bcm4343w/BCM4343A0_001.001.034.0045.0132_ORC_A4WP_Ponte_Solo-3G.hcd
deleted file mode 100644
index e42b840..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0045.0132_ORC_A4WP_Ponte_Solo-3G.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0144_ORC_A4WP_Ponte_Solo-3G.hcd b/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0144_ORC_A4WP_Ponte_Solo-3G.hcd
deleted file mode 100644
index 102f739..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0144_ORC_A4WP_Ponte_Solo-3G.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd b/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd
deleted file mode 100644
index f6e855e..0000000
--- a/firmware/bcm4343w/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A1_001.002.009.0005.0006_ENG_SEMCO-B59.hcd b/firmware/bcm4343w/BCM4343A1_001.002.009.0005.0006_ENG_SEMCO-B59.hcd
deleted file mode 100644
index 8285e41..0000000
--- a/firmware/bcm4343w/BCM4343A1_001.002.009.0005.0006_ENG_SEMCO-B59.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd b/firmware/bcm4343w/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd
deleted file mode 100644
index c68657e..0000000
--- a/firmware/bcm4343w/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd
+++ /dev/null
Binary files differ
diff --git a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0043.0110_ORC_SEMCO_SWB-B59.txt b/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0043.0110_ORC_SEMCO_SWB-B59.txt
deleted file mode 100644
index 9f9cfa6..0000000
--- a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0043.0110_ORC_SEMCO_SWB-B59.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-#
-# THIS INFORMATION IS PROPRIETARY TO BROADCOM CORPORATION
-#
-# Product: Generic
-#
-# Mode: UART, Class 1, 37.4MHz, WLBGA_eLG
-#
-# Master CSP: 797152
-#
-###############################################################################
-
-This is an official release candidate version based on .0043.0000 baseline.
-
-====================
- Release Notes
-====================
-
-06/17/2014
-
-1. This customer specific release is based on the following baseline
-
- BCM4343A0_001.001.034.0043.0000\Generic\UART\37_4MHz\wlbga_eLG_lite
-
-
-2. Customization:
-============================
-(1) Program name: SEMCO SWB-B59
-(2) Clock source: 37.4MHz
-(3) Radio power class: 1.5
-(4) BB Register Bit Fields settings for PCM Slave.
-(6) fm_spurCancelOnThresh = 0xC4
-(7) Disable FMStandaloneTestMode(dynamic control of BB CLK)
-
-
----------------------------------------------------
-Major changes since baseline .0031:
----------------------------------------------------
-BLTH03155577 - PCM loopback does not work
-BLTH03144368 - fix interrupt locking issue in BT clock sleep
-BLTH03144323 - [RFFW] GFSK 12dBm power update
-BLTH03144410 - Expose LE power setting register
-BLTH03144443 - Fix a problem in the Tx Test function
-BLTH03136746 - Fix an issue wheare device could not enter into sleep again after A2DP streaming
-BLTH03107192 - Fix for wrong sleep period of FM active monitor
-BLTH03107288 - LE test mode fix
-BLTH03087176 - Fix for high sleep current after turn on/off FM while BT and WLAN are ON.
-BLTH03078769 - fix wrong interval notification on mode change event
diff --git a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0045.0132_A4WP_Ponte_Solo-3G.txt b/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0045.0132_A4WP_Ponte_Solo-3G.txt
deleted file mode 100644
index 1df4c29..0000000
--- a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0045.0132_A4WP_Ponte_Solo-3G.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-#
-# THIS INFORMATION IS PROPRIETARY TO BROADCOM CORPORATION
-#
-# Product: Generic
-#
-# Mode: UART, Class 1, 37.4MHz, 4343W(WLCSP)
-#
-# Master CSP: 809502
-#
-###############################################################################
-
-This is an official release candidate version based on .0045.0000 baseline.
-
-====================
- Release Notes
-====================
-
-07/09/2014
-
-1. This customer specific release is based on the following baseline
-
- BCM4343A0_001.001.034.0045.0000\Generic\UART\37_4MHz\wlcsp_Semco_B59_en_a4wp
-
-
-2. Customization:
-============================
-(1) Program name: Samsung Ponte_Solo-3G(Gear3)
-(2) Clock source: 37.4MHz
-(3) Radio power class: 1.5
-(4) BB Register Bit Fields settings for PCM Slave
-(5) No FMRX (BT_I2S_WS/BT_I2S_CLK/BT_I2S_DI : OPEN)
-(6) Enable BR/EDR RSSI monitoring
-(7) TCA table update
-
-
----------------------------------------------------
-Major changes since baseline .0044:
----------------------------------------------------
-BLTH03180862 - Enable A4WP without the OTP for NSA mode
-BLTH03181033 - fix high baud-rate(over 3Mbps) setting
-BLTH03203842 - [A4WP] Use the Onchip temperature instead of NTC as it is grounded
-BLTH03206077 - Fix OTP RC Cal read back bug
-BLTH03208176 - set default Event_Mask_Page_2 value to 0x0 as 4.1 spec states
-BLTH03208190 - connection timeout issue with certain headset in sniff mode
-BLTH03221380 - Add TSSI Setting and Change IQ Cal settings
-BLTH03221370 - Create 4343W wlcsp module targets \ No newline at end of file
diff --git a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0144_A4WP_Ponte_Solo-3G.txt b/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0144_A4WP_Ponte_Solo-3G.txt
deleted file mode 100644
index dcc97f0..0000000
--- a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0144_A4WP_Ponte_Solo-3G.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-###############################################################################
-#
-# THIS INFORMATION IS PROPRIETARY TO BROADCOM CORPORATION
-#
-# Product: Generic
-#
-# Mode: UART, Class 1, 37.4MHz, 4343W(WLCSP)
-#
-# Master CSP: 809502
-#
-###############################################################################
-
-This is an official release candidate version based on .0048.0000 baseline.
-
-====================
- Release Notes
-====================
-
-07/18/2014
-
-1. This customer specific release is based on the following baseline
-
- BCM4343A0_001.001.034.0048.0000\Generic\UART\37_4MHz\wlcsp_Semco_B59_en_a4wp
-
-
-2. Customization:
-============================
-(1) Program name: Samsung Ponte_Solo-3G(Gear3)
-(2) Clock source: 37.4MHz
-(3) Radio power class: 1.5
-(4) BB Register Bit Fields settings for PCM Slave
-(5) No FMRX (BT_I2S_WS/BT_I2S_CLK/BT_I2S_DI : OPEN)
-(6) Enable BR/EDR RSSI monitoring
-
-
----------------------------------------------------
-Major changes since baseline .0045:
----------------------------------------------------
-BLTH03238711 - [A4WP] improve A4WP charging efficiency : Enable Low Power Mode/set 6V as vrect_set
-BLTH03223633 - Implement function for GPIO_Read and GPIO_Config_and_Write
-BLTH03208340 - Implement LPO calibration ready check
-BLTH03223634 - A2DP streaming choppiness with certain headset who sends flow_stop frequently when doing BT inquiry.
-BLTH03225548 - TSSI targets update after adding iTR setting
-
----------------------------------------------------
-Major changes since baseline .0044:
----------------------------------------------------
-BLTH03180862 - Enable A4WP without the OTP for NSA mode
-BLTH03181033 - fix high baud-rate(over 3Mbps) setting
-BLTH03203842 - [A4WP] Use the Onchip temperature instead of NTC as it is grounded
-BLTH03206077 - Fix OTP RC Cal read back bug
-BLTH03208176 - set default Event_Mask_Page_2 value to 0x0 as 4.1 spec states
-BLTH03208190 - connection timeout issue with certain headset in sniff mode
-BLTH03221380 - Add TSSI Setting and Change IQ Cal settings
-BLTH03221370 - Create 4343W wlcsp module targets \ No newline at end of file
diff --git a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.txt b/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.txt
deleted file mode 100644
index fe5d1aa..0000000
--- a/firmware/bcm4343w/ReleaseNotes_BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-###############################################################################
-#
-# THIS INFORMATION IS PROPRIETARY TO BROADCOM CORPORATION
-#
-# Product: Generic
-#
-# Mode: UART, Class 1, 37.4MHz, 4343W(WLCSP)
-#
-# Master CSP: 809502
-#
-###############################################################################
-
-This is an official release candidate version based on .0048.0000 baseline.
-
-====================
- Release Notes
-====================
-
-07/24/2014
-
-1. This customer specific release is based on the following baseline
-
- BCM4343A0_001.001.034.0048.0000\Generic\UART\37_4MHz\wlcsp_Semco_B59
-
-
-2. Customization:
-============================
-(1) Program name: Samsung Ponte_Solo-3G(Gear3)
-(2) Clock source: 37.4MHz
-(3) Radio power class: 1.5
-(4) BB Register Bit Fields settings for PCM Slave
-(5) No FMRX (BT_I2S_WS/BT_I2S_CLK/BT_I2S_DI : OPEN)
-(6) Enable BR/EDR RSSI monitoring
-
-
----------------------------------------------------
-Major changes since baseline .0045:
----------------------------------------------------
-BLTH03238711 - [A4WP] improve A4WP charging efficiency : Enable Low Power Mode
-BLTH03223633 - Implement function for GPIO_Read and GPIO_Config_and_Write
-BLTH03208340 - Implement LPO calibration ready check
-BLTH03223634 - A2DP streaming choppiness with certain headset who sends flow_stop frequently when doing BT inquiry.
-BLTH03225548 - TSSI targets update after adding iTR setting
-
----------------------------------------------------
-Major changes since baseline .0044:
----------------------------------------------------
-BLTH03181033 - fix high baud-rate(over 3Mbps) setting
-BLTH03203842 - [A4WP] Use the Onchip temperature instead of NTC as it is grounded
-BLTH03206077 - Fix OTP RC Cal read back bug
-BLTH03208176 - set default Event_Mask_Page_2 value to 0x0 as 4.1 spec states
-BLTH03208190 - connection timeout issue with certain headset in sniff mode
-BLTH03221380 - Add TSSI Setting and Change IQ Cal settings
-BLTH03221370 - Create 4343W wlcsp module targets \ No newline at end of file
diff --git a/firmware/bcm4343w/ReleaseNotes_BCM4343A1_001.002.009.0009.0012_Ponte_Solo-3G.txt b/firmware/bcm4343w/ReleaseNotes_BCM4343A1_001.002.009.0009.0012_Ponte_Solo-3G.txt
deleted file mode 100644
index 55d2387..0000000
--- a/firmware/bcm4343w/ReleaseNotes_BCM4343A1_001.002.009.0009.0012_Ponte_Solo-3G.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-#
-# THIS INFORMATION IS PROPRIETARY TO BROADCOM CORPORATION
-#
-# Product: Generic
-#
-# Mode: UART, Class 1, 37.4MHz, 4343W(WLCSP)
-#
-# Master CSP: 809502
-#
-###############################################################################
-
-This is an official release candidate version based on .0009.0000 baseline.
-
-====================
- Release Notes
-====================
-
-07/31/2014
-
-1. This customer specific release is based on the following baseline
-
- BCM4343A1_001.002.009.0009.0000\Generic\UART\37_4MHz\wlcsp_Semco_B59
-
-
-2. Customization:
-============================
-(1) Program name: Samsung Ponte_Solo-3G(Gear3)
-(2) Clock source: 37.4MHz
-(3) Radio power class: 1.5
-(4) BB Register Bit Fields settings for PCM Slave
-(5) No FMRX (BT_I2S_WS/BT_I2S_CLK/BT_I2S_DI : OPEN)
-(6) Enable BR/EDR RSSI monitoring
-(7) TCA/TSSI table update
-
-
-
diff --git a/packaging/bluetooth-firmware-bcm.spec b/packaging/bluetooth-firmware-bcm.spec
index 1018211..c9ae96d 100644
--- a/packaging/bluetooth-firmware-bcm.spec
+++ b/packaging/bluetooth-firmware-bcm.spec
@@ -1,14 +1,15 @@
Name: bluetooth-firmware-bcm
Summary: firmware and tools for bluetooth
# Version/Release/Group are based on mobile package
-Version: 0.2.30
-Release: 0
+Version: 0.2.29
+Release: 1
Group: Hardware Support/Handset
License: Apache-2.0
Source0: bluetooth-firmware-bcm-%{version}.tar.gz
+Source1: bluetooth-hciattach@.service
+Source2: bluetooth-hci-device.service
BuildRequires: cmake
-BuildRequires: model-build-features
%description
firmware and tools for bluetooth
@@ -34,12 +35,12 @@ Group: TO_BE/FILLED
%description msm8974
firmware and tools for bluetooth for redwood msm8974
-%package msm8x26
-Summary: bcm firmware and tools for ms8x26
+%package sprdtrum
+Summary: broadcom firmware and tools for Kiran Spreadtrum
Group: TO_BE/FILLED
-%description msm8x26
-bcm firmware and tools for Rinato 3g msm8x26
+%description sprdtrum
+broadcom bluetooth firmware and tools Kiran Spreadtrum
%prep
%setup -q -n bluetooth-firmware-bcm-%{version}
@@ -48,18 +49,17 @@ bcm firmware and tools for Rinato 3g msm8x26
export CFLAGS+=" -fpie -fvisibility=hidden"
export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+%if "%{?tizen_profile_name}" == "wearable"
+export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
+%endif
+
%cmake \
%if "%{?tizen_profile_name}" == "wearable"
-%if "%{?model_build_feature_model_name}" == "b2"
- -DTIZEN_WEARABLE_B2=YES \
- -DTIZEN_WEARABLE_B3=NO \
-%elseif "%{?model_build_feature_model_name}" == "b3"
- -DTIZEN_WEARABLE_B2=NO \
- -DTIZEN_WEARABLE_B3=YES \
+ -DTIZEN_WEARABLE=YES \
+%else
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
+ -DTIZEN_WEARABLE=NO \
%endif
-%elseif "%{?tizen_profile_name}" == "mobile"
- -DTIZEN_WEARABLE_B2=NO \
- -DTIZEN_WEARABLE_B3=NO \
%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
@@ -75,6 +75,9 @@ mkdir -p %{buildroot}/usr/share/license
cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
cat %{_builddir}/%{name}-%{version}/LICENSE.Broadcom >> %{buildroot}/usr/share/license/%{name}
+install -D -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/bluetooth-hciattach@.service
+install -D -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-device.service
+
%post c210
rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
ln -s %{_prefix}/etc/bluetooth/bt-dev-start-c210.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
@@ -87,25 +90,24 @@ ln -s %{_prefix}/etc/bluetooth/bt-dev-start-e4412.sh %{_prefix}/etc/bluetooth/bt
rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
ln -s %{_prefix}/etc/bluetooth/bt-dev-start-msm8974.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
-%post msm8x26
-rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
-ln -s %{_prefix}/etc/bluetooth/bt-dev-start-msm8x26.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
-
%files c210
%manifest bluetooth-firmware-bcm.manifest
%defattr(-,root,root,-)
-%{_bindir}/bcmtool
+%{_bindir}/bcmtool_4330b1
%{_bindir}/setbd
%{_prefix}/etc/bluetooth/BCM4330B1_002.001.003.0221.0265.hcd
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-c210.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
/usr/share/license/%{name}
+%exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
+%exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
%files e4412
%manifest bluetooth-firmware-bcm.manifest
%defattr(-,root,root,-)
-%{_bindir}/bcmtool
+%{_bindir}/bcmtool_4330b1
+%exclude %{_bindir}/bcmtool
%{_bindir}/setbd
%if "%{?tizen_profile_name}" == "wearable"
%{_prefix}/etc/bluetooth/BCM20710A1_001.002.014.0059.0060.hcd
@@ -124,11 +126,14 @@ ln -s %{_prefix}/etc/bluetooth/bt-dev-start-msm8x26.sh %{_prefix}/etc/bluetooth/
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-e4412.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
+%exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
+%exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
%files msm8974
%manifest bluetooth-firmware-bcm.manifest
%defattr(-,root,root,-)
-%{_bindir}/bcmtool
+%{_bindir}/bcmtool_4330b1
+%exclude %{_bindir}/bcmtool
%{_bindir}/setbd
%{_prefix}/etc/bluetooth/BCM4335B0_002.001.006.0233.0234_ORC_RedWood.hcd
%{_prefix}/etc/bluetooth/BCM4339_003.001.009.0030.0122_ORC_RedWood.hcd
@@ -136,17 +141,24 @@ ln -s %{_prefix}/etc/bluetooth/bt-dev-start-msm8x26.sh %{_prefix}/etc/bluetooth/
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-msm8974.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
/usr/share/license/%{name}
+%exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
+%exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
+
+%post sprdtrum
+rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
+ln -s %{_prefix}/etc/bluetooth/bt-dev-start-sprdtrum.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
-%files msm8x26
+%files sprdtrum
%manifest bluetooth-firmware-bcm.manifest
%defattr(-,root,root,-)
%{_bindir}/bcmtool
+%exclude %{_bindir}/bcmtool_4330b1
%{_bindir}/setbd
-%{_prefix}/etc/bluetooth/BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd
-%{_prefix}/etc/bluetooth/BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd
-%{_prefix}/etc/bluetooth/BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd
-%{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd
+%{_prefix}/etc/bluetooth/BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
-%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-msm8x26.sh
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-sprdtrum.sh
%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
/usr/share/license/%{name}
+%{_libdir}/systemd/system/bluetooth-hciattach@.service
+%{_libdir}/systemd/system/bluetooth-hci-device.service
+/etc/smack/accesses.d/bluetooth-firmware-bcm.rule
diff --git a/packaging/bluetooth-hci-device.service b/packaging/bluetooth-hci-device.service
new file mode 100755
index 0000000..e05228c
--- /dev/null
+++ b/packaging/bluetooth-hci-device.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=hciattach service for Broadcom BT/FM requested
+StopWhenUnneeded=yes
+
+[Service]
+Type=oneshot
+ExecStart=/usr/etc/bluetooth/bt-dev-start.sh
+ExecStop=/usr/etc/bluetooth/bt-dev-end.sh
+RemainAfterExit=yes
+StandardOutput=journal+console
+StandardError=inherit
diff --git a/packaging/bluetooth-hciattach@.service b/packaging/bluetooth-hciattach@.service
new file mode 100755
index 0000000..00ec9e9
--- /dev/null
+++ b/packaging/bluetooth-hciattach@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=hciattach service requested by %I
+Requires=bluetooth-hci-device.service
+After=bluetooth-hci-device.service
+
+[Service]
+Type=oneshot
+ExecStartPre=-/bin/mkdir -p /run/bluetooth/
+ExecStart=/bin/touch /run/bluetooth/%I
+ExecStop=/bin/rm /run/bluetooth/%I
+RemainAfterExit=yes
+StandardOutput=journal+console
+StandardError=inherit
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index bbe5959..ab3b898 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,13 +1,11 @@
# install firmware
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-dev-end.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-dev-start-c210.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-IF (TIZEN_WEARABLE_B2)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/wearable/bt-dev-start-e4412.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-ELSEIF (TIZEN_WEARABLE_B3)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-dev-start-sprdtrum.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
+IF (TIZEN_WEARABLE)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/wearable/bt-dev-start-e4412.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
ELSE ()
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mobile/bt-dev-start-e4412.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-ENDIF (TIZEN_WEARABLE_B2)
+ENDIF (TIZEN_WEARABLE)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-dev-start-msm8974.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-dev-start-msm8x26.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-set-addr.sh DESTINATION ${PLUGIN_INSTALL_PREFIX}/etc/bluetooth)
diff --git a/scripts/bt-dev-end.sh b/scripts/bt-dev-end.sh
index 18af5a8..15d6a54 100755
--- a/scripts/bt-dev-end.sh
+++ b/scripts/bt-dev-end.sh
@@ -4,13 +4,18 @@
# Script for stopping Broadcom UART Bluetooth stack
#
+PGREP="/usr/bin/pgrep"
+
# Device down
/usr/bin/hciconfig hci0 down
# Turn off Bluetooth Chip
-rfkill block bluetooth
+/usr/sbin/rfkill block bluetooth
-killall hciattach
+#/usr/bin/killall hciattach
+# Do NOT use killall due to smack
+hciattach_pid=`${PGREP} hciattach`
+kill $hciattach_pid
#if [ -e /sys/class/gpio/gpio17/value ]
#then
diff --git a/scripts/bt-dev-start-c210.sh b/scripts/bt-dev-start-c210.sh
index 1bf2243..4322cfe 100755
--- a/scripts/bt-dev-start-c210.sh
+++ b/scripts/bt-dev-start-c210.sh
@@ -3,7 +3,7 @@
# Script for registering Broadcom UART BT device
BT_UART_DEVICE=/dev/ttySAC0
BT_CHIP_TYPE=bcm2035
-BCM_TOOL=/usr/bin/bcmtool
+BCM_TOOL=/usr/bin/bcmtool_4330b1
BT_ADDR=/csa/bluetooth/.bd_addr
BT_PLATFORM_DEFAULT_HCI_NAME="TIZEN-Mobile"
@@ -33,7 +33,7 @@ then
fi
# Trun-on Bluetooth Chip
-rfkill unblock bluetooth
+/usr/sbin/rfkill unblock bluetooth
echo "Check for Bluetooth device status"
if (/usr/bin/hciconfig | grep hci); then
@@ -56,7 +56,7 @@ else
then
echo "time expired happen $i"
kill -TERM $bcmtool_pid
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
exit 1
fi
@@ -78,6 +78,6 @@ else
echo "HCIATTACH success"
else
echo "HCIATTACH failed"
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
fi
fi
diff --git a/scripts/bt-dev-start-msm8974.sh b/scripts/bt-dev-start-msm8974.sh
index d0e4d14..b0cb793 100755
--- a/scripts/bt-dev-start-msm8974.sh
+++ b/scripts/bt-dev-start-msm8974.sh
@@ -5,7 +5,7 @@
#
BT_UART_DEVICE=/dev/ttyHS0
BT_CHIP_TYPE=bcm2035
-BCM_TOOL=/usr/bin/bcmtool
+BCM_TOOL=/usr/bin/bcmtool_4330b1
BT_ADDR=/csa/bluetooth/.bd_addr
@@ -39,7 +39,7 @@ then
exit 1
fi
-rfkill unblock bluetooth
+/usr/sbin/rfkill unblock bluetooth
echo "Check for Bluetooth device status"
if (/usr/bin/hciconfig | grep hci); then
@@ -57,7 +57,7 @@ else
echo "HCIATTACH success"
else
echo "HCIATTACH failed"
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
cp /var/log/messages /var/lib/bluetooth/
fi
fi
diff --git a/scripts/bt-dev-start-msm8x26.sh b/scripts/bt-dev-start-sprdtrum.sh
index 494143d..b4e9384 100755
--- a/scripts/bt-dev-start-msm8x26.sh
+++ b/scripts/bt-dev-start-sprdtrum.sh
@@ -5,11 +5,12 @@ MKNOD="/bin/mknod"
AWK="/usr/bin/awk"
RFKILL="/usr/sbin/rfkill"
CP="/bin/cp"
+SLEEP="/bin/sleep"
#
# Script for registering Broadcom UART BT device
#
-BT_UART_DEVICE=/dev/ttyHS0
+BT_UART_DEVICE=/dev/ttyS0
BT_CHIP_TYPE=bcm2035
BCM_TOOL=/usr/bin/bcmtool
@@ -28,15 +29,10 @@ SYSLOG_PATH=/var/log/messages
UART_SPEED=3000000
#Firmware Loading timeout: Unit * 100ms
-# Example : 34 is 3.4 sec
-TIMEOUT=34
+# Example : 60 is 6.0 sec
+TIMEOUT=60
-BCM_4334_SEMCO="BCM4334W0_001.002.003.0014.0017_Ponte_Solo_Semco_B58_13.5dBm.hcd"
-BCM_4334_MURATA="BCM43342A1_001.002.003.1006.0000_Rintao_G3_ePA.hcd"
-BCM_4343_SEMCO="BCM4343A0_001.001.034.0048.0145_ORC_Ponte_Solo-3G.hcd"
-BCM_4343_A1_SEMCO="BCM4343A1_001.002.009.0009.0012_ORC_Ponte_Solo-3G.hcd"
-
-#REVISION_NUM=`${GREP} Revision /proc/cpuinfo | ${AWK} "{print \\$3}"`
+BCM_4343A0="BCM4343A0_001.001.034.0058.0215_ORC_Kiran.hcd"
echo "Check for Bluetooth device status"
if (${HCI_CONFIG} | grep hci); then
@@ -45,35 +41,11 @@ if (${HCI_CONFIG} | grep hci); then
exit 1
fi
-#Get RFKILL info (ex. bcm4343w X semco)
-BCM_CHIP_NAME=`${RFKILL} list bluetooth | ${AWK} -F'[: ]' '/^0/{print $3}'`
-BCM_CHIP_REV=`${RFKILL} list bluetooth | ${AWK} -F'[: ]' '/^0/{print $4}'`
-BCM_CHIP_PKG=`${RFKILL} list bluetooth | ${AWK} -F'[: ]' '/^0/{print $5}'`
-
#Select Firmware to check chip info
-BCM_FIRMWARE=${BCM_4343_SEMCO}
+BCM_FIRMWARE=${BCM_4343A0}
${RFKILL} unblock bluetooth
-if [ "$BCM_CHIP_NAME" == "bcm4334w" ]; then
- if [ "$BCM_CHIP_PKG" == "semco" ]; then
- BCM_FIRMWARE=${BCM_4334_SEMCO}
- elif [ "$BCM_CHIP_PKG" == "murata" ]; then
- BCM_FIRMWARE=${BCM_4334_MURATA}
- fi
-elif [ "$BCM_CHIP_NAME" == "bcm4343w" ]; then
- if [ "$BCM_CHIP_REV" == "a0" ]; then
- BCM_FIRMWARE=${BCM_4343_SEMCO}
- elif [ "$BCM_CHIP_REV" == "a0_a1" ]; then
- BT_HW_CHIP_NAME=`$BCM_TOOL $BT_UART_DEVICE -GETNAME 2>&1| ${AWK} '/^Chip/{print $4}'`
-
- if [ $BT_HW_CHIP_NAME == "BCM43430A1" ]; then
- BCM_FIRMWARE=${BCM_4343_A1_SEMCO}
- fi
- fi
-fi
-
-echo "BCM_CHIP_NAME: $BCM_CHIP_NAME, BCM_CHIP_REV: $BCM_CHIP_REV, BCM_CHIP_PKG: $BCM_CHIP_PKG"
echo "BCM_FIRMWARE: $BCM_FIRMWARE"
# Set BT address: This will internally check for the file presence
@@ -87,15 +59,15 @@ fi
echo "Registering Bluetooth device"
-$BCM_TOOL $BT_UART_DEVICE -TYPE=${BCM_CHIP_NAME} $ENABLE_BCMTOOL_DEBUG \
+$BCM_TOOL $BT_UART_DEVICE $ENABLE_BCMTOOL_DEBUG -CSTOPB \
-FILE=/usr/etc/bluetooth/$BCM_FIRMWARE -BAUD=$UART_SPEED \
- -ADDR=$BT_ADDR -PCM_SETTING -LP >$BCM_TOOL_DBG_LOG 2>&1 &
+ -ADDR=$BT_ADDR -LP -SCO >$BCM_TOOL_DBG_LOG 2>&1 &
bcmtool_pid=$!
#Check next timeout seconds for bcmtool success
for (( i=1; i<=$TIMEOUT; i++))
do
- sleep 0.1
+ ${SLEEP} 0.1
kill -0 $bcmtool_pid
bcmtool_alive=$?
@@ -103,7 +75,7 @@ do
then
echo "time expired happen $i"
kill -TERM $bcmtool_pid
- rfkill block bluetooth
+ ${RFKILL} block bluetooth
${CP} $SYSLOG_PATH /var/lib/bluetooth/
exit 1
fi
@@ -120,7 +92,7 @@ done
# Attaching Broadcom device
if (${HCI_ATTACH} $BT_UART_DEVICE -s $UART_SPEED $BT_CHIP_TYPE $UART_SPEED flow); then
- /bin/sleep 0.1
+ ${SLEEP} 0.1
echo "HCIATTACH success"
else
echo "HCIATTACH failed"
diff --git a/scripts/mobile/bt-dev-start-e4412.sh b/scripts/mobile/bt-dev-start-e4412.sh
index 0f492ee..d18a59c 100755
--- a/scripts/mobile/bt-dev-start-e4412.sh
+++ b/scripts/mobile/bt-dev-start-e4412.sh
@@ -5,7 +5,7 @@
#
BT_UART_DEVICE=/dev/ttySAC0
BT_CHIP_TYPE=bcm2035
-BCM_TOOL=/usr/bin/bcmtool
+BCM_TOOL=/usr/bin/bcmtool_4330b1
BT_ADDR=/csa/bluetooth/.bd_addr
@@ -41,7 +41,7 @@ then
fi
fi
-rfkill unblock bluetooth
+/usr/sbin/rfkill unblock bluetooth
echo "Check for Bluetooth device status"
if (/usr/bin/hciconfig | grep hci); then
@@ -65,7 +65,7 @@ else
then
echo "time expired happen $i"
kill -TERM $bcmtool_pid
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
cp /var/log/messages /var/lib/bluetooth/
exit 1
fi
@@ -88,7 +88,7 @@ else
echo "HCIATTACH success"
else
echo "HCIATTACH failed"
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
cp /var/log/messages /var/lib/bluetooth/
fi
fi
diff --git a/scripts/wearable/bt-dev-start-e4412.sh b/scripts/wearable/bt-dev-start-e4412.sh
index 6787e3c..cedfaf4 100755
--- a/scripts/wearable/bt-dev-start-e4412.sh
+++ b/scripts/wearable/bt-dev-start-e4412.sh
@@ -5,7 +5,7 @@
#
BT_UART_DEVICE=/dev/ttySAC0
BT_CHIP_TYPE=bcm2035
-BCM_TOOL=/usr/bin/bcmtool
+BCM_TOOL=/usr/bin/bcmtool_4330b1
BT_ADDR=/csa/bluetooth/.bd_addr
@@ -53,7 +53,7 @@ then
exit 1
fi
-rfkill unblock bluetooth
+/usr/sbin/rfkill unblock bluetooth
echo "Check for Bluetooth device status"
if (/usr/bin/hciconfig | grep hci); then
@@ -84,7 +84,7 @@ else
echo "time expired happen $i"
kill -TERM $bcmtool_pid
break
-# rfkill block bluetooth
+# /usr/sbin/rfkill block bluetooth
# exit 1
fi
@@ -112,7 +112,7 @@ else
if [ $c -eq $MAXBCMTOOLTRY ]
then
echo "***** No Chance to activate, count=$c ******"
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
exit 1
fi
@@ -126,7 +126,7 @@ else
echo "HCIATTACH success"
else
echo "HCIATTACH failed"
- rfkill block bluetooth
+ /usr/sbin/rfkill block bluetooth
cp /var/log/messages /var/lib/bluetooth/
fi
fi
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 728e073..53fb171 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,15 +1,16 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(bcmtool C)
-IF (TIZEN_WEARABLE_B2)
-SET(SRCS_4330 bcmtool_4330b2_w.c)
-ELSEIF (TIZEN_WEARABLE_B3)
-SET(SRCS_4330 bcmtool_4330b3_w.c)
+IF (TIZEN_WEARABLE)
+SET(SRCS_4330B1 bcmtool_4330b1_w.c)
ELSE ()
-SET(SRCS_4330 bcmtool_4330m0_m.c)
-ENDIF (TIZEN_WEARABLE_B2)
+SET(SRCS_4330B1 bcmtool_4330b1_m.c)
+ENDIF (TIZEN_WEARABLE)
-SET(BCMTOOL_4330 ${PROJECT_NAME})
+SET(SRCS_BCMTOOL bcmtool.c)
+
+SET(BCMTOOL_4330B1 ${PROJECT_NAME}_4330b1)
+SET(BCMTOOL ${PROJECT_NAME})
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
@@ -23,9 +24,12 @@ ENDIF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
-ADD_EXECUTABLE(${BCMTOOL_4330} ${SRCS_4330})
+ADD_EXECUTABLE(${BCMTOOL_4330B1} ${SRCS_4330B1})
+ADD_EXECUTABLE(${BCMTOOL} ${SRCS_BCMTOOL})
-TARGET_LINK_LIBRARIES(${BCMTOOL_4330} ${package_LDFLAGS})
+TARGET_LINK_LIBRARIES(${BCMTOOL_4330B1} ${package_LDFLAGS})
+TARGET_LINK_LIBRARIES(${BCMTOOL} ${package_LDFLAGS})
# install binary file
-INSTALL(TARGETS ${BCMTOOL_4330} DESTINATION ${PLUGIN_INSTALL_PREFIX}/bin)
+INSTALL(TARGETS ${BCMTOOL_4330B1} DESTINATION ${PLUGIN_INSTALL_PREFIX}/bin)
+INSTALL(TARGETS ${BCMTOOL} DESTINATION ${PLUGIN_INSTALL_PREFIX}/bin)
diff --git a/tools/bcmtool_4330b3_w.c b/tools/bcmtool.c
index 4bfb72b..c414c4e 100644
--- a/tools/bcmtool_4330b3_w.c
+++ b/tools/bcmtool.c
@@ -1,23 +1,11 @@
-/*
- * Name: bcmtool_4330b3_w.c
- *
- * Description: Download a patchram files for the HCD format
- *
- * Copyright (c) 2012-2013, Broadcom Corp., All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+/*****************************************************************************
+**
+** Name: bcmtool.c
+**
+** Description: Download a patchram files for the HCD format
+**
+** Copyright (c) 2000-2009, Broadcom Corp., All Rights Reserved.
+******************************************************************************/
#include <stdio.h>
#include <errno.h>
@@ -46,6 +34,9 @@
/* Pre baudrate change for fast download */
#define HIGH_SPEED_PATCHRAM_DOWNLOAD TRUE
+/* UART clock setting for patcram download */
+#define UART_CLOCK_SETTING FALSE
+
/* BT_WAKE Polarity - 0=Active Low, 1= Active High */
#define HCILP_BT_WAKE_POLARITY 1
@@ -104,6 +95,7 @@ typedef UINT8 BD_ADDR[BD_ADDR_LEN]; /* Device address */
#define VSC_WRITE_UART_CLOCK_SETTING (0x0045 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_VSC_WRITE_RAM (0x004C | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_VSC_LAUNCH_RAM (0x004E | HCI_GRP_VENDOR_SPECIFIC)
+#define HCI_WRITE_I2SPCM_INTERFACE_PARAM (0x006D | HCI_GRP_VENDOR_SPECIFIC)
#define VOICE_SETTING_MU_LAW_MD 0x0100
#define VOICE_SETTING_LINEAR_MD 0x0060
@@ -167,7 +159,7 @@ UINT8 vsc_for_sco_pcm[5] = { 0x00, 0x01, 0x00, 0x01, 0x01 };
/*
Neverland : PCM, 256, short, master ,master
Volance : PCM, 256, short, master ,master
-
+
Byte1 -- 0 for PCM 1 for UART or USB
Byte2 -- 0 : 128, 1: 256, 2:512, 3:1024, 4:2048 Khz
Byte3 -- 0 for short frame sync 1 for long frame sync
@@ -175,42 +167,27 @@ UINT8 vsc_for_sco_pcm[5] = { 0x00, 0x01, 0x00, 0x01, 0x01 };
Byte5 -- 0 for slave 1 for master
*/
+UINT8 vsc_for_i2c_param[4] = { 0x01, 0x00, 0x00, 0x01 };
+
int fd; /* HCI handle */
BOOLEAN debug_mode = FALSE; /* Debug Mode Enable */
BOOLEAN use_two_stop_bits = FALSE; /* Flag of two stop bits for tty */
-unsigned char buffer[1024];
+/* Flag of delay(50ms) right before starting firmware download for old bcm such as 4334B0 */
+BOOLEAN add_delay_right_before_download = FALSE;
-typedef enum {
- BCM_UNKNOWN = 0,
- BCM4330,
- BCM4334W,
- BCM4343W,
-} bcm_product_type;
-
-bcm_product_type bcm_target_product = BCM_UNKNOWN;
-
-static struct {
- bcm_product_type bcm_product;
- char *name;
-} bcm_product_table[] = {
- { BCM_UNKNOWN, "UNKNOWN"},
- { BCM4330, "BCM4330"},
- { BCM4334W, "BCM4334W"},
- { BCM4343W, "BCM4343W"},
- { 0, NULL }
-};
+unsigned char buffer[1024];
struct termios termios;
-void ChangeBaudRate(UINT32 baudrate);
+void ChangeBaudRate(UINT32 baudrate, BOOLEAN isCan2stopbit);
void exit_err(UINT8 err)
{
#if ( HIGH_SPEED_PATCHRAM_DOWNLOAD == TRUE )
- ChangeBaudRate(115200);
+ ChangeBaudRate(115200, FALSE);
#endif
exit(err);
}
@@ -354,7 +331,7 @@ void DisplayProgress(int total, int val)
#endif
}
-UINT8 DownloadPatchram(char *patchram1)
+UINT8 DownloadPatchram(char *patchram1, UINT32 baudrate)
{
UINT32 len;
char prm[128] = { 0, };
@@ -373,7 +350,7 @@ UINT8 DownloadPatchram(char *patchram1)
alarm(0);
#if ( HIGH_SPEED_PATCHRAM_DOWNLOAD == TRUE )
- ChangeBaudRate(3000000);
+ ChangeBaudRate(baudrate, FALSE);
#endif
strcpy(prm, patchram1);
@@ -390,8 +367,12 @@ UINT8 DownloadPatchram(char *patchram1)
SendCommand(HCI_BRCM_DOWNLOAD_MINI_DRV, 0, NULL);
read_event(fd, buffer);
- usleep(50000);
+ if (add_delay_right_before_download) {
+ DEBUG0("Add delay (50ms) to wait for proper downloading\n");
+ usleep(50000);
+ }
+ /* patchram downloading start */
while (fread(&buffer[1], sizeof(UINT8), 3, pFile)) {
buffer[0] = 0x01;
@@ -411,22 +392,24 @@ UINT8 DownloadPatchram(char *patchram1)
read_event(fd, buffer);
}
+ /* host do not need to send launch ram. becasue there is
+ * Launchram command in the patchram itself */
+
fclose(pFile);
- if (bcm_target_product == BCM4343W) {
- fprintf(stderr, "Delay 200ms for BCM4343W Wireless Charging Feature\n");
- usleep(200000); /*200ms delay */
- } else {
- usleep(100000); /*100ms delay */
- }
+ /* give enough delay like 200ms or more afte patchram downloading,
+ * so chip can reboot and reconfigured */
+ DEBUG0("Delay 200ms\n");
+ usleep(200000); /*200ms delay */
+ /* change to AP baudrate to 115K. because patchram default baudrate is 115K */
tcflush(fd, TCIOFLUSH);
tcgetattr(fd, &termios);
cfmakeraw(&termios);
termios.c_cflag |= CRTSCTS;
- if (use_two_stop_bits)
- termios.c_cflag |= CSTOPB;
+ /* must use 1 stop bit for 115K.
+ * becasue BT chip support 1stop bit only at 115K */
tcsetattr(fd, TCSANOW, &termios);
tcflush(fd, TCIOFLUSH);
@@ -462,29 +445,15 @@ void SetScanEnable(void)
read_event(fd, buffer);
}
-/* This patch has been added to write PCM setting for Ponte */
-void SetAudio_for_PCM(void)
+void SetAudio(void)
{
- fprintf(stderr, "Write Audio parameter for PCM\n");
-
- vsc_for_pcm_config[0] = 0x0;
- vsc_for_pcm_config[1] = 0x0;
- vsc_for_pcm_config[2] = 0x3; /* PCM format 16bit */
- vsc_for_pcm_config[3] = 0x0;
- vsc_for_pcm_config[4] = 0x0;
+ fprintf(stderr, "Write Audio parameterrrr\n");
- DEBUG5("vsc_for_pcm_config = {%d,%d,%d,%d,%d}\n", vsc_for_pcm_config[0],
- vsc_for_pcm_config[1], vsc_for_pcm_config[2],
- vsc_for_pcm_config[3], vsc_for_pcm_config[4]);
-
- SendCommand(VSC_WRITE_PCM_DATA_FORMAT_PARAM, 5,
- (UINT8 *) vsc_for_pcm_config);
+ SendCommand(HCI_WRITE_I2SPCM_INTERFACE_PARAM, 4,
+ (UINT8 *) vsc_for_i2c_param);
read_event(fd, buffer);
-}
-void SetAudio(void)
-{
- fprintf(stderr, "Write Audio parameter\n");
+ SetScoConf(0, 1, 0, 0, 0);
DEBUG5("vsc_for_sco_pcm = {%d,%d,%d,%d,%d}\n", vsc_for_sco_pcm[0],
vsc_for_sco_pcm[1], vsc_for_sco_pcm[2],
@@ -494,6 +463,9 @@ void SetAudio(void)
(UINT8 *) vsc_for_sco_pcm);
read_event(fd, buffer);
+
+
+#if 0
DEBUG5("vsc_for_pcm_config = {%d,%d,%d,%d,%d}\n", vsc_for_pcm_config[0],
vsc_for_pcm_config[1], vsc_for_pcm_config[2],
vsc_for_pcm_config[3], vsc_for_pcm_config[4]);
@@ -501,6 +473,7 @@ void SetAudio(void)
SendCommand(VSC_WRITE_PCM_DATA_FORMAT_PARAM, 5,
(UINT8 *) vsc_for_pcm_config);
read_event(fd, buffer);
+#endif
}
void SetPcmConf(UINT8 p0, UINT8 p1, UINT8 p2, UINT8 p3, UINT8 p4)
@@ -524,18 +497,12 @@ void SetScoConf(UINT8 p0, UINT8 p1, UINT8 p2, UINT8 p3, UINT8 p4)
void HCILP_Enable(BOOLEAN on)
{
/* Host Stack Idle Threshold */
- UINT8 hcilp_idle_threshold = 0x01;
+ UINT8 hcilp_idle_threshold = 0x0A;
/* Host Controller Idle Threshold */
- UINT8 hcilp_hc_idle_threshold = 0x01;
+ UINT8 hcilp_hc_idle_threshold = 0x0A;
- if (bcm_target_product == BCM4343W) {
- hcilp_idle_threshold = 0x0A;
- hcilp_hc_idle_threshold = 0x0A;
- }
-
- fprintf(stderr, "Set Low Power mode %d for %s\n", on,
- bcm_product_table[bcm_target_product].name);
+ fprintf(stderr, "Set Low Power mode\n");
UINT8 data[HCI_BRCM_WRITE_SLEEP_MODE_LENGTH] = {
0x01, /* Sleep Mode algorithm 1 */
@@ -591,12 +558,15 @@ UINT32 uart_speed(UINT32 Speed)
}
}
-void ChangeBaudRate(UINT32 baudrate)
+void ChangeBaudRate(UINT32 baudrate, BOOLEAN isCan2stopbit)
{
UINT8 hci_data[HCI_BRCM_UPDATE_BAUD_RATE_UNENCODED_LENGTH] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+#if ( UART_CLOCK_SETTING == TRUE )
UINT8 uart_clock_24 = 0x2; /* 0x1 - UART Clock 48MHz, 0x2 - UART Clock 24MHz */
UINT8 uart_clock_48 = 0x1; /* 0x1 - UART Clock 48MHz, 0x2 - UART Clock 24MHz */
+#endif
switch (baudrate) {
case 115200:
@@ -607,22 +577,26 @@ void ChangeBaudRate(UINT32 baudrate)
case 1500000:
case 2000000:
case 2500000:
+#if ( UART_CLOCK_SETTING == TRUE )
/* Write UART Clock setting of 24MHz */
DEBUG0("Change UART_CLOCK 24Mhz\n");
SendCommand(VSC_WRITE_UART_CLOCK_SETTING,
VSC_WRITE_UART_CLOCK_SETTING_LEN,
(UINT8 *) & uart_clock_24);
read_event(fd, buffer);
+#endif
break;
case 3000000:
case 4000000:
+#if ( UART_CLOCK_SETTING == TRUE )
/* Write UART Clock setting of 48MHz */
- DEBUG0("Change UART_CLOCK 48Mh\nz");
+ DEBUG0("Change UART_CLOCK 48Mhz\n");
SendCommand(VSC_WRITE_UART_CLOCK_SETTING,
VSC_WRITE_UART_CLOCK_SETTING_LEN,
(UINT8 *) & uart_clock_48);
read_event(fd, buffer);
+#endif
break;
default:
@@ -643,13 +617,16 @@ void ChangeBaudRate(UINT32 baudrate)
(UINT8 *) hci_data);
read_event(fd, buffer);
+ /* change to AP baudrate to the same with BT chip */
tcflush(fd, TCIOFLUSH);
tcgetattr(fd, &termios);
cfmakeraw(&termios);
termios.c_cflag |= CRTSCTS;
- if (use_two_stop_bits)
+ if (isCan2stopbit && use_two_stop_bits) {
+ DEBUG0("Use 2 stop bits\n");
termios.c_cflag |= CSTOPB;
+ }
tcsetattr(fd, TCSANOW, &termios);
tcflush(fd, TCIOFLUSH);
@@ -741,26 +718,6 @@ void EnbleHCI(void)
}
-void SetBcmProductType(char *bcm_product_name)
-{
- int i = 0;
-
- if (bcm_product_name == NULL) {
- bcm_target_product = BCM_UNKNOWN;
- return;
- }
-
- for (i = 0; bcm_product_table[i].name != NULL; i++) {
- if (!strcasecmp(bcm_product_table[i].name,bcm_product_name)) {
- bcm_target_product = bcm_product_table[i].bcm_product;
- fprintf(stderr, "Detected name is %s\n",
- bcm_product_table[i].name);
- }
- }
-
- return;
-}
-
void print_usage(void)
{
fprintf(stderr, "\n");
@@ -771,11 +728,12 @@ void print_usage(void)
fprintf(stderr,
" -FILE Patchram file name EX) -FILE=BCM43xx_xxx.hcd\n");
fprintf(stderr,
+ " -PREBAUD Set Baudrate for patchram downloading EX) -PREBAUD=3000000\n");
+ fprintf(stderr,
" -BAUD Set Baudrate EX) -BAUD=3000000\n");
fprintf(stderr,
" -ADDR BD addr file name EX) -ADDR=.bdaddr\n");
fprintf(stderr, " -SCO Enable SCO/PCM config EX) -SCO\n");
- fprintf(stderr, " -PCM_SETTING Write PCM config EX) -PCM_SETTING\n");
fprintf(stderr,
" -SETSCO SCO/PCM values verify EX) -SETSCO=0,1,0,1,1,0,0,3,3,0\n");
fprintf(stderr, " -LP Enable Low power EX) -LP\n");
@@ -787,7 +745,8 @@ void print_usage(void)
" -ATTACH Attach BT controller to BlueZ stack EX) -ATTACH\n");
fprintf(stderr, " -DEBUG Debug message EX) -DEBUG\n");
fprintf(stderr, " -CSTOPB Set two stop bits for tty EX) -CSTOPB\n");
- fprintf(stderr, " -TYPE BCM Product name EX) -TYPE=BCM4343W\n");
+ fprintf(stderr, " -ADD_DELAY make delay(50ms) right before starting Firmware Download EX) -ADD_DELAY \n");
+ fprintf(stderr, " *required for some specific old model such as 4334B0(Swing)\n");
fprintf(stderr, "\n");
}
@@ -795,6 +754,7 @@ void print_usage(void)
int main(int argc, char *argv[])
{
UINT8 i = 0;
+ UINT32 prebaudrate = 921600; /* Default Download setting */
if (argc < 2) {
print_usage();
@@ -816,8 +776,8 @@ int main(int argc, char *argv[])
cfmakeraw(&termios);
termios.c_cflag |= CRTSCTS;
- if (use_two_stop_bits)
- termios.c_cflag |= CSTOPB;
+ /* must use one stop bits. becasue BT chip default is one stop bits */
+ termios.c_cflag = termios.c_cflag & ~CSTOPB;
tcsetattr(fd, TCSANOW, &termios);
tcflush(fd, TCIOFLUSH);
@@ -841,13 +801,13 @@ int main(int argc, char *argv[])
use_two_stop_bits = TRUE;
DEBUG0("Use two stop bits for tty\n");
- } else if (strstr(ptr, "-TYPE=")) {
- char bcm_product_name[128];
- ptr +=6;
-
- strncpy(bcm_product_name,ptr,8);
-
- SetBcmProductType(bcm_product_name);
+ } else if (strstr(ptr, "-PREBAUD=")) {
+ ptr += 9;
+ prebaudrate = atoi(ptr);
+ DEBUG1("Use Baudrate(%ul) for downloading firmware\n",
+ prebaudrate);
+ } else if (strstr(ptr, "-ADD_DELAY")) {
+ add_delay_right_before_download = TRUE;
}
}
@@ -865,7 +825,7 @@ int main(int argc, char *argv[])
ptr += 6;
strncpy(prm_name, ptr, 127);
- DownloadPatchram(prm_name);
+ DownloadPatchram(prm_name, prebaudrate);
} else if (strstr(ptr, "-BAUD=")) {
UINT32 baudrate;
@@ -873,7 +833,10 @@ int main(int argc, char *argv[])
ptr += 6;
baudrate = atoi(ptr);
- ChangeBaudRate(baudrate);
+ /* This is the state that patchram download is done */
+ /* TRUE mean use 2 stop bit if CSTOPB is given */
+ ChangeBaudRate(baudrate, TRUE);
+
} else if (strstr(ptr, "-ADDR=")) {
char *bdaddr_filename;
FILE *pFile = NULL;
@@ -914,6 +877,9 @@ int main(int argc, char *argv[])
fgets(text, BTUI_MAX_STRING_LENGTH_PER_LINE,
pFile);
+
+ fclose(pFile);
+
sscanf(text, "%02x%02x%02x", &bdaddr[3],
&bdaddr[4], &bdaddr[5]);
@@ -931,9 +897,6 @@ int main(int argc, char *argv[])
fprintf(stderr, "-ADDR: file open fail\n");
exit_err(1);
}
- } else if (strstr(ptr, "-PCM_SETTING")) {
- SetAudio_for_PCM();
-
} else if (strstr(ptr, "-SCO")) {
SetAudio();
@@ -971,8 +934,9 @@ int main(int argc, char *argv[])
sleep(UINT_MAX);
}
} else if (strstr(ptr, "-DEBUG")) {
+ } else if (strstr(ptr, "-PREBAUD")) {
} else if (strstr(ptr, "-CSTOPB")) {
- } else if (strstr(ptr, "-TYPE")) {
+ } else if (strstr(ptr, "-ADD_DELAY")) {
} else {
fprintf(stderr, "Invalid parameter(s)!\n");
exit_err(1);
diff --git a/tools/bcmtool_4330m0_m.c b/tools/bcmtool_4330b1_m.c
index 735d5cd..b456dc9 100644
--- a/tools/bcmtool_4330m0_m.c
+++ b/tools/bcmtool_4330b1_m.c
@@ -1,5 +1,5 @@
/*
- * Name: bcmtool_4330m0_m.c
+ * Name: bcmtool_4330b1.c
*
* Description: Download a patchram files for the HCD format
*
diff --git a/tools/bcmtool_4330b2_w.c b/tools/bcmtool_4330b1_w.c
index c64c8b4..1e4c84c 100644
--- a/tools/bcmtool_4330b2_w.c
+++ b/tools/bcmtool_4330b1_w.c
@@ -1,5 +1,5 @@
/*
- * Name: bcmtool_4330b2_w.c
+ * Name: bcmtool_4330b1.c
*
* Description: Download a patchram files for the HCD format
*