Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MSM8996 BLUETOOTH/FM QCA6174A Bluetooth 4.1
- Bluetooth device Lite-on QCA6174A [04ca:3016]
- Sort out
- Commits on Dec 2, 2016 - op3: Make qcacld driver a module
- https://github.com/LineageOS/android_device_oneplus_oneplus3/commit/7bb7b226f7f7cfda2520f45fd5789d3390d8e380
- Commits on Jan 22, 2017 - Revert "op3: Make qcacld driver a module"
- https://github.com/LineageOS/android_device_oneplus_oneplus3/commit/4d67c8e37f4f7d58c626ea977cbe23fc793551d4
- # bluetooth----------------------
- [ 2.400848] Bluetooth: HCI device and connection manager initialized
- [ 2.401214] Bluetooth: HCI socket layer initialized
- [ 2.401367] Bluetooth: L2CAP socket layer initialized
- [ 2.401855] Bluetooth: SCO socket layer initialized
- Description of concepts
- https://android.googlesource.com/kernel/msm.git/+/android-msm-flo-3.4-l-preview/drivers/bluetooth/Kconfig
- bluetooth
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2016-10-02.log.html
- https://github.com/Keij0/droid-config-sirius/blob/master/sparse/usr/bin/droid/droid-wlan-fix.sh
- # Make sure that the /etc/firmware directory is linked
- if [ ! -d /etc/firmware/ ]; then
- ln -s /system/etc/firmware /etc/
- fi
- !!! using hciuart for control, not hcismd
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-07-26.log.html
- Must See!
- https://public.etherpad-mozilla.org/p/faq-hadk#lineNumber=559
- CONFIG_BT_HCIUART
- https://cateee.net/lkddb/web-lkddb/BT_HCIUART.html
- !!! (most likely the right decision)
- sparse/lib/systemd/system/hciattach.service
- https://github.com/mer-hybris/droid-config-hammerhead/blob/master/sparse/lib/systemd/system/hciattach.service
- https://groups.google.com/forum/#!category-topic/beaglebone/ngcGap8-G8s
- drivers/staging/qcacld-2.0
- https://github.com/MotorolaMobilityLLC/readme/blob/master/MMI-NCC25.106-11.txt
- https://emmaus.pro:3000/emmaus/android_kernel_zuk_msm8996/src/1272e8866408585e7052336e3dcab100740026fe/arch/arm64/configs/z2_row_defconfig
- make android kernel
- https://stackoverflow.com/questions/28565640/build-kernel-with-aarch64-linux-gnu-gcc
- Prima
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2016-07-07.log.html
- https://code.fairphone.com/gerrit/gitweb?p=fp2-dev/platform/vendor/qcom-opensource/wlan/prima.git;a=blob;f=Android.mk;h=6bb1ec639545498f41193c394fbd168eda51d452;hb=refs/heads/fp2-sibon#l109
- Perfd Manual - "perfd is a system performance daemon that provides real-time access to system performance metrics,
- locally or remotely."
- !!! Oneplus3-Sailors/droid-config-oneplus3
- https://github.com/Oneplus3-Sailors/droid-config-oneplus3
- list files (What files we take from the drain)
- http://4pda.ru/forum/lofiversion/index.php?t720349-800.html
- Bluetooth audio with BlueZ 5
- https://github.com/ev3dev/ev3dev/issues/198
- piggz falcon
- https://github.com/mer-hybris/droid-config-falcon/tree/master/sparse/etc/bluetooth
- #bluetooth
- https://github.com/mlehtima/droid-config-fp2-sibon/blob/master/sparse/lib/systemd/system/wlan-module-load.service
- https://raw.githubusercontent.com/mer-hybris/droid-config-onyx/master/sparse/usr/bin/droid/droid-hcismd-up.sh
- https://bugs.launchpad.net/ubuntu/+source/bluetooth-touch/+bug/1285146
- BTS402x
- hadk/hardware/qcom/bt/msm8996/libbt-vendor
- BOARD_HAVE_BLUETOOTH_QCOM
- !!!View Initiation bluetooth:
- http://biancheng.dnbcw.net/linux/413347.html
- http://www.itdadao.com/articles/c15a168725p0.html
- https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-sdk/30021
- https://public.etherpad-mozilla.org/p/faq-hadk#lineNumber=126
- msm9660 (821) QCA6174A Chipset
- https://www.qualcomm.com/products/qca6174a-dual-band-wi-fi
- Bluetooth interface uart
- for uart bluetooth:
- rpm/dhd/helpers/build_packages.sh --mw=https://github.com/mer-hybris/bluetooth-rfkill-event --spec=rpm/bluetooth-rfkill-event-hciattach.spec
- [root@Sailfish rfkill0]# /system/bin/hci_qcomm_init -vvv -e
- /system/bin/hci_qcomm_init -d /dev/ttyHS0 -s 3000000 -i 115200 -r 32000000 -p 0 -P 1
- ro.qualcomm.bt.hci_transport not set
- bt_hci_qcomm_pfal_powerup: not configured to power up BT QSoC
- Failed to open the /sys/devices/platform/wcnss_wlan.0/smd_channel_ready
- bt_hci_qcomm_pfal_changebaudrate: new rates 115200, 115200
- bt_hci_qcomm_pfal_changebaudrate: new baud 115200 FAILED, got 0x1000
- Done intiailizing UART
- bt_hci_qcomm_init : Started
- bt_hci_qcomm_init: Detecting BT SOC firmware at baud rate 115200
- CMD: 01 00 FC 01 06
- EVT: 04 FF 48 00 02 45 20 20 20 20 52 65 6C 65 61 73 65 20 36 2E 30 33 2E 30 20 28 42 75 69 6C 64 20 30 36 30 32 29 20 5B 50 46 3D 51 43 41 36 31 37 34 20 42 42 3D 30 36 30 32 20 4C 4D 50 3D 30 36 30 32 20 43 46 47 3D 52 41 4D 5D
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_vs_getappversion : Succeeded
- CMD: 01 00 FC 06 0D 34 00 00 8C 04
- EVT: 04 FF 0B 00 01 34 00 00 8C 04 EF BE AD DE
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_vs_gethwversion : Succeeded
- bt_hci_qcomm_init : Found QSoC type 20.
- get_bdaddr: before: 0x3a.0x1d.0xfe.0xc6.0xa0.0x00
- get_bdaddr: after: 46.e5.22.2d.65.94
- bt_nv_cmd failed to get NV_BT_SOC_REFCLOCK_TYPE_I from NV, code 1
- bt_nv_cmd failed to get NV_BT_SOC_CLK_SHARING_TYPE_I from NV, code 1
- bt_hci_qcomm_pfal_get_wlan_type: 0
- bt_hci_qcomm_init - Clock=32Mhz ClockSharing=No Logging=No SOC=BT2.1 xo_support=No
- bt_hci_qcomm_init - Opened NVM module.
- bt_hci_qcomm_download_nvm - Sending NVM tag #2 (size 9)
- CMD: 01 0B FC 09 01 02 06 46 E5 22 2D 65 94
- EVT: 04 FF 0A 0B 01 02 06 46 E5 22 2D 65 94
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_download_nvm - Sending NVM tag #95 (size 5)
- CMD: 01 0B FC 05 01 5F 02 00 0B
- EVT: 04 FF 62 0B 01 5F 5E 00 0B 01 0D 00 00 00 02 00 02 02 00 00 10 33 73 33 33 07 00 02 00 01 23 D7 03 EC 01 DA 00 66 06 33 13 FE 04 00 00 36 00 21 00 00 10 00 28 00 00 0A 01 14 64 0A 00 72 01 2B 2B 44 4A 47 45 45 45 43 44 58 57 55 54 5A 59 25 40 28 28 39 3D 39 3A 3A 3A 38 39 44 44 43 42 45 45 24 36 19 48
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_download_nvm - Sending NVM tag #83 (size 6)
- CMD: 01 0B FC 06 01 53 03 07 07 07
- EVT: 04 FF 0C 0B 01 53 08 07 07 07 00 01 03 05 07
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_download_nvm - Sending NVM tag #36 (size 15)
- CMD: 01 0B FC 0F 01 24 0C FF 03 07 09 09 09 00 00 09 09 04 00
- EVT: 04 FF 10 0B 01 24 0C FF 03 07 09 09 09 00 00 09 09 04 00
- EVT: 04 0E 04 01 00 00 00
- bt_hci_qcomm_download_nvm - Finished sending NVM data.
- bt_hci_qcomm_init - NVM download completed, doing HCI Reset...
- CMD: 01 0B FC 08 01 11 05 0A 01 0E 00 00
- EVT: 04 FF 0C 0B 01 11 08 0A 01 0E 00 00 02 0A 00
- EVT: 04 0E 04 01 00 00 00
- Binary file: 6.03.0_0602Flowing-off the SOC...
- CMD: 01 03 0C 00
- bt_hci_qcomm_pfal_changebaudrate: new rates 3000000, 3000000
- bt_hci_qcomm_pfal_changebaudrate: new baud 3000000 FAILED, got 0x1000
- EVT: 04 0E 04 01 03 0C 00
- bt_hci_qcomm_init - Successful
- BTS402x initialized successfully
- BTS_DEVICE=/dev/ttyHS0;
- BTS_BAUD=3000000;
- BTS_TYPE=qualcomm;
- BTS_ADDRESS=94:65:2d:22:e5:46;
- export BTS_DEVICE BTS_BAUD BTS_TYPE BTS_ADDRESS;
- [root@Sailfish nemo]# hciattach /dev/ttyHS0 qualcomm 3000000
- Qualcomm module LMP version : 0x07
- Qualcomm module LMP sub-version : 0x025a
- Opening firmware file: /etc/firmware/6.03.0_0602.bin
- Could not open firmware file /etc/firmware/6.03.0_0602.bin: No such file or directory (2).
- CONFIG_QCA_CLD_WLAN = CONFIG_PRONTO_WLAN
- https://partner.nameless-rom.org/gitlab/OSS/android_kernel_oneplus_msm8996/commit/030150d28c8a50c68dab1fab8c18f99200eea6b5
- load module bluetooth-power.ko manually (kernel config v11)
- in sparse/usr/lib/modules-load.d/droid-hal-oneplus.conf
- add line: bluetooth-power
- /etc/firmware/tlv.conf
- [General]
- patcher = hciattach
- uart_dev = /dev/ttyHS0
- type_id = qualcomm
- baud_rate = 3000000
- flow = 1
- tosleep = 1
- up_hci = 1
- reg_hci = 1
- no_flush = 1
- use_lpm = 1
- #bdaddr = /data/misc/bluetooth/bluetooth_bdaddr
- !!!Sort out
- add in kernel CONFIG_WIL6210=m
- CONFIG_WIL6210_WRITE_IOCTL=y
- (OnePlus 5)
- https://github.com/xreact
- !!! Need talk with "krnlyng" for bluetooth
- maybe "krnlyng" from the sfos-porters channel can help you with the bt issue. As far as I know was it he, who fixed it for the "Sony xperia X". Hope this information is new and helpful to you.
- !!!Instructions:
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-10-22.log.html
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-10-12.log.html
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-09-09.log.html
- #bluez
- https://git.merproject.org/mer-core/bluez5
- https://git.merproject.org/mgrover/bluez (modified with rome - bluez4)
- discussion:
- https://www.spinics.net/lists/linux-bluetooth/mail2.html
- https://www.spinics.net/lists/linux-bluetooth/msg73746.html
- patches (Most likely on bluez4 and it is not clear works or not)
- https://portland.source.codeaurora.org/patches/external/wlan/Automotive/3rdparty/fsl3-10/Release_1_12_23/
- found information on the topic:
- https://askubuntu.com/questions/791584/bluetooth-not-working-in-ubuntu-16-04-with-0cf33004-atheros-adapter
- + https://wiki.gentoo.org/wiki/Qualcomm_Atheros_QCA6174
- https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1542743
- https://patchwork.kernel.org/patch/9956893/
- https://ubuntuforums.org/showthread.php?t=2323812
- https://bbs.archlinux.org/viewtopic.php?id=213500
- + https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/net/wireless/cnss/Kconfig
- edit in bluetooth_rfkill_event.c
- link: https://github.com/mer-hybris/bluetooth-rfkill-event/blob/master/bluetooth-rfkill-event/bluetooth_rfkill_event.c
- /* list of all supported chips:
- name is defined in the kernel driver implementing rfkill interface for power */
- #define BCM_RFKILL_NAME "bcm43xx Bluetooth\n"
- #define BCM_43341_UART_DEV "/dev/ttyMFD0"
- #define BD_ADD_FACTORY_FILE "/factory/bluetooth_address"
- char factory_bd_add[18];
- char default_bd_addr[18];
- #define DEFAULT_CONFIG_FILE "/etc/firmware/bcm43341.conf"
- #define HCIATTACH_TYPE_ID_DEFAULT "bcm43xx"
- http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-11-21.log.html
- link: https://github.com/Lyokanthrope/bluetooth-rfkill-event/tree/master/bluetooth-rfkill-event
- QCA bluetooth (ghosalmartin)
- https://github.com/ghosalmartin/android_device_lge_bullhead/blob/cm-13.0/BoardConfig.mk
- ?: ghosalmartin: you managed to start bluetooth (QCA)?
- + Enable Qualcomm's Bluetooth Software In-Band Sleep UART protocol
- HCI_IBS (HCI In-Band Sleep) is Qualcomm's power management protocol extension to H4.
- https://github.com/ghosalmartin/android_kernel_lge_bullhead/commit/27ae706ceeb1c1cf7754b8afda59f8e9cfa2ac74#diff-a68c2acb00b0f732e44918a51ada503d
- ?? check:
- BT_HCIUART_IBS in kernel config file
- Prompt: HCI_IBS protocol support
- docs: https://www.digi.com/resources/documentation/digidocs/90001548/reference/bsp/6ul/r_bluetooth_6ul.htm
- check in kernel config file
- BT_ATH3K - Atheros firmware download driver
- BT_HCIUART_ATH3K - Atheros AR300x serial support
- According to the protocol HCI_UART_IBS (!!!I will use it) (HCI_UART_QCA for kernel 4.4):
- /* QCA ROME */
- { "qca", 0x0000, 0x0000, HCI_UART_IBS, 115200, 115200, FLOW_CTL, DISABLE_PM, NULL, NULL, qca, NULL },
- По протоколу HCI_UART_H4:
- /* QCA ROME */
- { "qca", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, DISABLE_PM, NULL, NULL, qca, NULL },
- Understand what protocol should be used, I think it is preferable - HCI_UART_IBS
- HCI_UART_IBS (in MSM kernel 3.x ) = HCI_UART_QCA (in Linux kernel 4.x)
- in file btattach.c
- in MSM kernel 3.x
- drivers/bluetooth/hci_uart.h
- #define HCI_UART_IBS 6
- in Linux kernel 4.x
- drivers/bluetooth/hci_uart.h
- #define HCI_UART_QCA 8
- link: http://www.merproject.org/logs/%23sailfishos-porters/%23sailfishos-porters.2017-10-22.log.html#t2017-10-22T14:59:00
- Roma files path in drivers/bluetooth/ath3k.c
- CONFIG_BT_HCIUART_ATH3K
- link: https://git.bricked.de/Bricked/mako/commit/8939f38015856a47b266ed768001ab7083868cad?view=parallel
- In a pure core Linux 4.x (not MSM)
- patch kernel BT_QCA, HCI_UART_QCA , BT_QCOMSMD
- BT_QCOMSMD - it is necessary
- https://github.com/torvalds/linux/blob/master/drivers/bluetooth/hci_qca.c
- patch (old for example):
- !!!+ https://www.spinics.net/lists/linux-bluetooth/msg63488.html
- in the end I'll patch bluez5 until I decide! Maybe a better kernel
- need a patch for BT_QCA ...
- # Bluetooth
- - bluez5-tools
- - bluetooth-rfkill-event-hciattach
- type_id = qualcomm
- hciattach /dev/ttyHS0 qualcomm
- /sys/devices/soc/7570000.uart/tty/ttyHS0/hci0/address
- service config_bt_addr /system/bin/btnvtool -O
- /persist/bluetooth/.bt_nv.bin - file with address
- tools/btattach
- https://manpages.debian.org/testing/bluez/btattach.1.en.html
- #OP msm8998
- https://github.com/OnePlusOSS/android_kernel_oneplus_msm8998
- I'll try to take from there bluetooth driver
- branch oneplus/QC8998_N_7.1
- https://github.com/OnePlusOSS/android_kernel_oneplus_msm8998/tree/oneplus/QC8998_N_7.1
- таже надо добавить в ядро
- config BT_QCOMSMD, берем из нового ядра Linux
- https://github.com/torvalds/linux
- CHROMIUM: Bluetooth: update stack to bluetooth-next
- https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/322027
- https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18/drivers/bluetooth/
- 1. https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ae3fa0331ff5a31e427ac54076c285a721fcbd7b%5E%21/#F1
- + (began with him) 2. https://chromium.googlesource.com/chromiumos/third_party/kernel/+/585993a62ad8b8f393841129c8c55e2ab59de681
- # Bluetooth subsystem in linux and BlueZ
- https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/mgmt-api.txt
- # firmware
- http://lists.busybox.net/pipermail/buildroot/2017-July/196690.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement