Hi,
We are trying to port qca9377.lea_.1.0_qdn_r1000015.2.tgz driver to an ARM based board.
Since the only document available for compiling the driver is for x86 platform, we are trying to cross-compile the package component wise.
We got bluez5.19 patched and built. We also have the linux kernel 4.4 also patched with the available patches and built.
But when we try
hciattach /dev/ttymxc0 qca
it loads the firmware and rampatch with lot of prints. And at the end after setting N_HCI line discipline it fails.
It says "Can't set device: Protocol not supported"
log : https://pastebin.com/raw/NcHBqdqb
And when we looked into the code we found that in hciattach code it is trying to set HCI_UART_IBS protocol when "qca" type is specified in the command line invocation.
But in the kernel driver there is no mention of this protocol and thus the ioctl call fails.
We could not find a patch that would add this protocol to the kernel driver.
The file backports.sh is trying to download some patch files to build the kernel driver with the In Band Sleep feature. But those files are getting downloaded as 0KB files. For example,
wget https://source.codeaurora.org/external/thundersoft/kernel/msm-3.10/patch... -O 0007-Bluetooth-add-Qualcomm-In-Band-Sleep-support-to-hci_.patch
is downloading a 0KB file.
How can we get this to work? Do you have any other set of patches for the kernel driver? Is there any document for cross compiling the qca9377.lea_.1.0_qdn_r1000015.2.tgz driver package?
Could you please share the bluez5.19 patch, need to cross check.
Thank you for looking into the isssue.
There is a set of patches. So I have uploaded on google drive as an archive.
link : https://drive.google.com/file/d/13o9mBm9AUMY3K7se2S1lMBL9EeyLENdC/view?u...
1. hciattach /dev/ttymxc0 qca 3000000 -t 120 flow
Yeilded same result as before. "Can't set device: Protocol not supported" and no hci device present.
2. hciattach /dev/ttymxc0 qca 115200 noflow
qca
frame_hci_cmd_pkt: Sending EDL_PATCH_VER_REQ_CMD
HCI-CMD -1: 0x1 0x0 0xfc 0x1 0x19
read_vs_hci_event: Wait for HCI-Vendor Specfic Event from SOC
wait_for_data: Timing out on select for 3 secs.
hci_send_vs_cmd: Failed to get HCI-VS Event from SOC
Failed to attach the patch payload to the Controller!
qca_soc_init: Fail to get Rome Version (0xffffff92)
Can't initialize device: Success
Kernel patches link: https://drive.google.com/open?id=1fcCA6CV4MMGus9YrBPqpdmxzARyOVeHm
Hi matadeen,
Do you have any updates on the issue?
Hi matadeen,
Can you confirm that qca9377 has been tested with bluetooth 4.2 + HS support in an ARM-linux environment?
Can you confirm that all the relevant source code, rampatch and firmware are included in the release "qca9377.lea_.1.0_qdn_r1000015.2.tgz" to bring up the qca9377 in a linux environment with bluetooth 4.2 + HS support?
Hi suhas,
I am trying to replicate the issue locally. Please give me some time. By default it is with the Fluoride stack not Bluez.
We have tested and released for x86 platform, not on the ARM linux environment.
yes it have Bluetooth 4.2 +HS support.
Regards,
Matadeen Mishra
Could you find /dev/ttymxc0?
Can you please upload the kernel logs also.
Hi Matadeen,
We are able to access /dev/ttymxc0.
btattach -B /dev/ttymxc0 will bring up the hci0 device too. But without loding the rampatch/firmware. Bluetooth is in 4.1 mode.
btattach -B /dev/ttymxc0 -P qca fails. This will try to load some rampatch/firmware but names are different. Even if we rename the available files to match, it won't load.
Kernel log link : https://pastebin.com/raw/u9eqVHA2
Hi Matadeen,
Is there any update on the issue?
Hi suhas,
Could you please change below in your file it should fix the issue.
/tools/hciattach.c
Hello,
Is my first post in this forum, i am not sure is the best way to post my problem to an existing post but I get a message that I cannot post new content on this forum.
And this post is the closest it gets to my current issue.
I am working wih QCA9378 chip and want to enable Bluetooth interface. The hardware is based on imx6ul CPU and I try to enable the interface on several kernels: 4.6.x, 4.8.x, 4.12.x, Th e only one it works is 4.1.15
I have ported bluetooth and parts of usb stack to the old 4.1.15 kernel but still is crashing. I am beginning to think maybe there is an issue with bluez 5.19 which I see the gentleman that opened this post experiencd also.
I get the following output after long time when doing a hciattach:
# hciattach /dev/ttyACM0 bcsp
Does anybody know if there could be bluez issues and why it works only with 4.1.15 kernel. This issue has been reproduces by several engineers worldwide on different ARM platforms.
Thanks,
Mihaita
Hi Mihaita,
Could you please share the patch you have applied to the Kernel and BlueZ.
Also share the kernel logs and terminal logs of (hciattach /dev/ttyACM0 bcsp).
Regards,
Matadeen Mishra
Hi,
I am having the same issue as suhas.kunnath on my arm platform. I have patched and built bluez using bluez.sh from qca9377.lea_.3.0_qdn_r3000017.1.tgz.
Running
outputs
There are no outputs on dmesg.
Editing tools/hciattach.c does not change the result for me.
* Are there any guides available aside from "QCA6174A/QCA9377 WLAN and Bluetooth on Linux x86 Porting Guide"?
* Is there a way to use official bluez without patches?
* I have copied nvm_tlv_3.2.bin and rampatch_tlv_3.2.tlv to /lib/firmware/ar3k, is that correct? And is more firmware needed?
Have a nice day
Dear silvia,
You can refer the Doc#80-YC321-9.
if you are getting still issue, please share the dmesg logs.
Regards,
Matadeen Mishra
Dear Matadeen,
where can I find this document?
Attempting hciattach produces no output on dmesg.
Regards,
Silvia
It will be available on the createpoint (https://createpoint.qti.qualcomm.com/dashboard/public/productkit#public/product-kit/search)
if in dmesg you are not getting any logs, something going worng , please check it.
Had u able to port the 9377 driver to arm based board . currently im working on it . can u breifly elaborate the steps required for it
had u able to port the driver to arm based , can u elaborate or brief me the steps required for it