Need some help for NFC troubleshooting - LG Optimus 4X HD

Hello everybody!
While experimenting with NFC, I noticed that my phone doesn't recognize the two bundled Tag+. I've already tested almost everything, but couldn't find the root cause of it. I doesn't work on both stock V20A JB and CM10.1 yesterday's nightly.
If you don't want to read all the technical parts and would like to help, please jump to the end of the post.
First I checked the logcat. Every action regarding NFC returns with NFCSTATUS_SUCCESS, so I assume the problem isn't in the userland code. I checked the resistance of the antenna in the back cover. It isn't broken. Then I checked kernel logs. There are some lines there which seem to be suspicious, but I have checked some kernel logs uploaded by other users in kernel threads and they have the same. The first is logged when I turn off NFC:
Code:
<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: I2c error status 0x00000008
<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: no acknowledge from address 0x28
<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: Packet status 0x00010009
<3>[13:06:25 18:04:11.250] pn544_dev_write : i2c_master_send returned -121
Another log which isn't related to NFC, but still doesn't look good:
Code:
<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: I2c error status 0x00000008
<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: no acknowledge from address 0x4c
<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: Packet status 0x00010009
<3>[70:01:01 00:00:07.306] nct1008 4-004c: nct1008_i2c_verify_for_onoff: I2C Error!![num:2], Retry Done.
Thanks to @tosco22 for the log (http://pastebin.com/Zw9PPXkz).
Then I checked NFC Test in the service menu (with the secret code 3845#*880#). Mainly all tests give success, except 'Check SWP Status' which outputs 'TEST SUCCESS: SWIO PASS, PMUVCC FAIL'. When checking through test options, some throw the same kernel log as the first I have posted above. When I try 'Continuous Tag Reading', it outputs:
Code:
<4>[13:06:29 16:48:26.565] ------------[ cut here ]------------
<4>[13:06:29 16:48:26.565] WARNING: at /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/i2c/busses/i2c-tegra.c:737 tegra_i2c_xfer+0x3b4/0x514()
<4>[13:06:29 16:48:26.565] Modules linked in: raw_ip_net gator
<4>[13:06:29 16:48:26.565] [<c001503c>] (unwind_backtrace+0x0/0xec) from [<c06ca104>] (dump_stack+0x20/0x24)
<4>[13:06:29 16:48:26.565] [<c06ca104>] (dump_stack+0x20/0x24) from [<c0068824>] (warn_slowpath_common+0x5c/0x74)
<4>[13:06:29 16:48:26.565] [<c0068824>] (warn_slowpath_common+0x5c/0x74) from [<c0068868>] (warn_slowpath_null+0x2c/0x34)
<4>[13:06:29 16:48:26.565] [<c0068868>] (warn_slowpath_null+0x2c/0x34) from [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514)
<4>[13:06:29 16:48:26.565] [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514) from [<c03fca4c>] (i2c_transfer+0x9c/0xec)
<4>[13:06:29 16:48:26.565] [<c03fca4c>] (i2c_transfer+0x9c/0xec) from [<c03fcb48>] (i2c_master_send+0x4c/0x5c)
<4>[13:06:29 16:48:26.565] [<c03fcb48>] (i2c_master_send+0x4c/0x5c) from [<c03568cc>] (pn544_dev_write+0xac/0xe0)
<4>[13:06:29 16:48:26.565] [<c03568cc>] (pn544_dev_write+0xac/0xe0) from [<c0111aa8>] (vfs_write+0xc4/0x140)
<4>[13:06:29 16:48:26.565] [<c0111aa8>] (vfs_write+0xc4/0x140) from [<c0111d24>] (sys_write+0x4c/0x78)
<4>[13:06:29 16:48:26.565] [<c0111d24>] (sys_write+0x4c/0x78) from [<c000e080>] (ret_fast_syscall+0x0/0x30)
<4>[13:06:29 16:48:26.565] ---[ end trace ab8e02b47e44e432 ]---
<3>[13:06:29 16:48:26.565] tegra-i2c tegra-i2c.0: i2c transfer timed out, addr 0x0028, data 0x05
<3>[13:06:29 16:48:26.565] pn544_dev_write : i2c_master_send returned -110
<4>[13:06:29 16:48:27.565] ------------[ cut here ]------------
<4>[13:06:29 16:48:27.565] WARNING: at /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/i2c/busses/i2c-tegra.c:737 tegra_i2c_xfer+0x3b4/0x514()
<4>[13:06:29 16:48:27.565] Modules linked in: raw_ip_net gator
<4>[13:06:29 16:48:27.565] [<c001503c>] (unwind_backtrace+0x0/0xec) from [<c06ca104>] (dump_stack+0x20/0x24)
<4>[13:06:29 16:48:27.565] [<c06ca104>] (dump_stack+0x20/0x24) from [<c0068824>] (warn_slowpath_common+0x5c/0x74)
<4>[13:06:29 16:48:27.565] [<c0068824>] (warn_slowpath_common+0x5c/0x74) from [<c0068868>] (warn_slowpath_null+0x2c/0x34)
<4>[13:06:29 16:48:27.575] [<c0068868>] (warn_slowpath_null+0x2c/0x34) from [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514)
<4>[13:06:29 16:48:27.575] [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514) from [<c03fca4c>] (i2c_transfer+0x9c/0xec)
<4>[13:06:29 16:48:27.575] [<c03fca4c>] (i2c_transfer+0x9c/0xec) from [<c0347620>] (inv_i2c_read+0x84/0xc4)
<4>[13:06:29 16:48:27.575] [<c0347620>] (inv_i2c_read+0x84/0xc4) from [<c03477c4>] (inv_serial_read+0x9c/0xec)
<4>[13:06:29 16:48:27.585] [<c03477c4>] (inv_serial_read+0x9c/0xec) from [<c034a454>] (mpu6050_read+0x34/0x3c)
<4>[13:06:29 16:48:27.585] [<c034a454>] (mpu6050_read+0x34/0x3c) from [<c034a078>] (inv_mpu_slave_read+0xc0/0x118)
<4>[13:06:29 16:48:27.585] [<c034a078>] (inv_mpu_slave_read+0xc0/0x118) from [<c034505c>] (inv_slave_read+0x60/0xc0)
<4>[13:06:29 16:48:27.585] [<c034505c>] (inv_slave_read+0x60/0xc0) from [<c0345940>] (mpu_dev_ioctl+0x884/0xa14)
<4>[13:06:29 16:48:27.585] [<c0345940>] (mpu_dev_ioctl+0x884/0xa14) from [<c012201c>] (do_vfs_ioctl+0x4f4/0x568)
<4>[13:06:29 16:48:27.585] [<c012201c>] (do_vfs_ioctl+0x4f4/0x568) from [<c01220d8>] (sys_ioctl+0x48/0x6c)
<4>[13:06:29 16:48:27.585] [<c01220d8>] (sys_ioctl+0x48/0x6c) from [<c000e080>] (ret_fast_syscall+0x0/0x30)
<4>[13:06:29 16:48:27.585] ---[ end trace ab8e02b47e44e433 ]---
<3>[13:06:29 16:48:27.585] tegra-i2c tegra-i2c.0: i2c transfer timed out, addr 0x0068, data 0x3b
<3>[13:06:29 16:48:27.585] /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/misc/inv_mpu/mlsl-kernel.c|inv_i2c_read|85 returning -110
<3>[13:06:29 16:48:27.585] /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/misc/inv_mpu/mlsl-kernel.c|inv_serial_read|272 returning -110
Another issue I can think of is that the back cover seems not to be in precise contact with the NFC antenna connectors. The plastic is a bit higher at the connectors and this might be causing the issue.
Of course it can also happen that the bundled Tag+'s are broken.
If anybody knows anything about these, please let me know. I would be very grateful if somebody could perform some simple tests:
Turn NFC on and off.
Go into the service menu by dialling 3845#*880#, going into 'NFC Test' and checking 'Check SWP Status' and 'Continuous Tag Reading' and tell what 'Check SWP Status' outputs. (You can test other things here as well, but do not choose 'Firmware upgrade', it didn't cause issues for me, but it is never good to mess with it.)
Get a logcat and dmesg and attach them here. Use this method as a reference.
Alternatively check if the plastic material is higher near the NFC connectors.
Thank you in advance!

This might be related to this problem.
Sent from my LG-P880

Bump.

Issue resolved! Problem was with the antenna not having been properly connected to the board. Solved with two small curved metal plates.

Related

Proof of Optimus 2X actually utilizing two cores?

I'm not sure that Optimus 2X is actually utilizing the second core with Android 2.2 in any useful fashion.
Kernel reports one core:
cat /proc/cpuinfo | grep processor | wc –l
1
It does however state that the number of BogoMIPS is about 2000 (Nexus S states 1000):
cat /proc/cpuinfo
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1998.84
Pageloads are almost exactly the same as with the Nexus S (2.3 of course, but still...) and it's an equal race in both sunspider and browsermark. Funny thing though, I did have a go with the Motorola XOOM during MWC and it performed 100% better than LG Optimus 2X in Sunspider - about 4000ms vs 2000ms.
Does anyone know more about this? Is there an easy way to tell if two cores are being utilized or not? It sure as hell doesn't feel like it.
And if it does utilize two cores, how does it work? I can't really wrap my head around it since the kernel doesn't seem to be aware of the second core. Isn't that a requirement in order for any higher level applications/services (ie. Dalvik) to actually use it?
Check dmesg. It does say that there are 2 cores. Android 2.2 isnt optimized for 2 cores. However the scheduler should be able to distribute threads to both cores.
kingzero666 said:
Check dmesg. It does say that there are 2 cores. Android 2.2 isnt optimized for 2 cores. However the scheduler should be able to distribute threads to both cores.
Click to expand...
Click to collapse
Output:
Code:
#dmesg | grep -i cpu
<7>[ 4379.373999] CPU0 attaching NULL sched-domain.
<7>[ 4379.374058] CPU1 attaching NULL sched-domain.
<7>[ 4379.437570] CPU0 attaching NULL sched-domain.
<5>[ 4379.442097] CPU1: clean shutdown
<4>[ 4409.047632] CPU1: Booted secondary processor
<7>[ 4409.047688] CPU0 attaching NULL sched-domain.
<7>[ 4409.107329] CPU0 attaching sched-domain:
<7>[ 4409.107340] domain 0: span 0-1 level CPU
<7>[ 4409.107363] CPU1 attaching sched-domain:
<7>[ 4409.107369] domain 0: span 0-1 level CPU
<7>[ 4414.885703] CPU0 attaching NULL sched-domain.
<7>[ 4414.885743] CPU1 attaching NULL sched-domain.
<7>[ 4414.997475] CPU0 attaching NULL sched-domain.
<5>[ 4414.999707] CPU1: clean shutdown
<4>[ 6340.902826] CPU1: Booted secondary processor
<7>[ 6340.902901] CPU0 attaching NULL sched-domain.
<7>[ 6340.987202] CPU0 attaching sched-domain:
<7>[ 6340.987217] domain 0: span 0-1 level CPU
<7>[ 6340.987242] CPU1 attaching sched-domain:
<7>[ 6340.987249] domain 0: span 0-1 level CPU
<7>[ 6348.879559] CPU0 attaching NULL sched-domain.
<7>[ 6348.879601] CPU1 attaching NULL sched-domain.
<7>[ 6348.997274] CPU0 attaching NULL sched-domain.
<5>[ 6348.999688] CPU1: clean shutdown
Is there any way to check if it's actually being used though? I'm yet to see a single benchmark or user case scenario where there are any indications of dual core usage.
Cant check it out for myself. But look here. http://www.anandtech.com/show/4144/...gra-2-review-the-first-dual-core-smartphone/7
JohnRogers said:
Is there any way to check if it's actually being used though? I'm yet to see a single benchmark or user case scenario where there are any indications of dual core usage.
Click to expand...
Click to collapse
Depends on the benchmark. If its not optimized for multi core usage you wont see any difference. A optimized benchmark should run different tasks with multiple threads at the same time. I dont know how current benchmarks on Android are coded. But for example look at Quadrant. You can see how the different tasks are started only after the previous is finished. So its probably not optimized to run on dual cores.
btw do you already have the 2x? Is it the international version or the korean one?
kingzero666 said:
Cant check it out for myself. But look here.
Depends on the benchmark. If its not optimized for multi core usage you wont see any difference. A optimized benchmark should run different tasks with multiple threads at the same time. I dont know how current benchmarks on Android are coded. But for example look at Quadrant. You can see how the different tasks are started only after the previous is finished. So its probably not optimized to run on dual cores.
btw do you already have the 2x? Is it the international version or the korean one?
Click to expand...
Click to collapse
Yes, I have the international version.
While true, it seems that the browser should be a perfect example of where that extra core would come in very handy, yet the performance doesn't differ from what the Nexus S is performing if you compare page loading time.
Any suggestions of benchmarking scripts/apps that are intended for SMP configurations? I would very much like to figure this out.
Some more info from dmesg, pretty much identical with anandtechs model:
Code:
<6>[ 0.000000] Initializing cgroup subsys cpu
<5>[ 0.000000] Linux version 2.6.32.9 ([email protected]) (gcc version 4.4.0 (GCC) ) #1 SMP PREEMPT Mon Feb 7 16:20:46 KST 2011
<4>[ 0.000000] CPU: ARMv7 Processor [411fc090] revision 0 (ARMv7), cr=10c53c7f
<4>[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
<4>[ 0.000000] Machine: Tegra 2 Development System
<4>[ 0.000000] Framebuffer tag with 65536 handle
<4>[ 0.000000] Shmoo tag with 65537 handle
<4>[ 0.000000] Found a warmboot tag!
<4>[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
<7>[ 0.000000] On node 0 totalpages: 98048
<7>[ 0.000000] free_area_init_node: node 0, pgdat c063ecc0, node_mem_map c0746000
<7>[ 0.000000] Normal zone: 766 pages used for memmap
<7>[ 0.000000] Normal zone: 0 pages reserved
<7>[ 0.000000] Normal zone: 97282 pages, LIFO batch:31
<6>[ 0.000000] PERCPU: Embedded 8 pages/cpu @c0a52000 s10560 r8192 d14016 u65536
<6>[ 0.000000] pcpu-alloc: s10560 r8192 d14016 u65536 alloc=16*4096
<6>[ 0.000000] pcpu-alloc: [0] 0 [0] 1
<4>[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 97282
<5>[ 0.000000] Kernel command line: [email protected] [email protected] loglevel=0 muic_state=1 lpj=9994240 CRC=301000339bedb21 vmalloc=256M brdrev=1.0 uniqueid=280410144405557 video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc userdebug=enable tegrapart=recovery:35e00:2800:800,linux:34700:1000:800,mbr:400:200:800,system:600:2bc00:800,cache:2c200:8000:800,misc:34200:400:800,userdata:38700:c0000:800
<4>[ 0.000000] [hee.seo] 1.0
<6>[ 0.000000] muic_state = 1
<6>[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
<6>[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>[ 0.000000] Memory: 383MB = 383MB total
<5>[ 0.000000] Memory: 380672KB available (5900K code, 1305K data, 192K init, 0K highmem)
<6>[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
<6>[ 0.000000] Hierarchical RCU implementation.
<6>[ 0.000000] NR_IRQS:416
<4>[ 0.000000] Console: colour dummy device 80x30
<6>[ 187.294679] Calibrating delay loop (skipped) preset value.. 1998.84 BogoMIPS (lpj=9994240)
<4>[ 187.294773] Mount-cache hash table entries: 512
<6>[ 187.295213] Initializing cgroup subsys cpuacct
<6>[ 187.295236] Initializing cgroup subsys devices
<6>[ 187.295246] Initializing cgroup subsys freezer
<6>[ 187.295273] CPU: Testing write buffer coherency: ok
<6>[ 187.295479] Calibrating local timer... 1.19MHz.
<4>[ 187.404739] CPU1: Booted secondary processor
<6>[ 187.404854] Brought up 2 CPUs
<6>[ 187.404869] SMP: Total of 2 processors activated (3997.69 BogoMIPS).
<7>[ 187.404891] CPU0 attaching sched-domain:
<7>[ 187.404901] domain 0: span 0-1 level CPU
<7>[ 187.404911] groups: 0 1
<7>[ 187.404928] CPU1 attaching sched-domain:
<7>[ 187.404935] domain 0: span 0-1 level CPU
<7>[ 187.404943] groups: 1 0
<6>[ 187.428463] regulator: core version 0.5
You could try starting the same benchmark twice and let them run their tests at the same time, although i dont really know how you would do that on android.
Did you try rooting your phone?
kingzero666 said:
You could try starting the same benchmark twice and let them run their tests at the same time, although i dont really know how you would do that on android.
Did you try rooting your phone?
Click to expand...
Click to collapse
It's already rooted (SuperOneClickv1.7) with busybox installed.
Sorry for my offtopic questions. But it seems like youre one of the first who have the international version of the 2x so i am curious. Hope you dont mind my questions. Did you try to check how the bootloader is secured?
kingzero666 said:
Sorry for my offtopic questions. But it seems like youre one of the first who have the international version of the 2x so i am curious. Hope you dont mind my questions. Did you try to check how the bootloader is secured?
Click to expand...
Click to collapse
No, I'm afraid not. Access is limited.
Back to topic: Has anyone seen anything that indicates dual core usage?
Take a look at this: http://www.youtube.com/watch?v=vJ0CkqKqmts&hd=1
Page loading times doesn't differ at all from the Nexus S, which in some cases actually seems faster - and yes, I know it's a case of Froyo vs Gingerbread, but still?
Shouldn't a dual core CPU be at least 30-40% faster with multithreaded applications? At the very minium?
Try this benchmark on a single and dual core device.
http://forum.xda-developers.com/showthread.php?t=972855
kingzero666 said:
Try this benchmark on a single and dual core device.
http://forum.xda-developers.com/showthread.php?t=972855
Click to expand...
Click to collapse
Thanks.
Smartbench 2011 (Beta 6)
Optimus 2X
Productivity index: 2 492
Games Index: 2 593
Pi: 2 316
Mandelbrot: 2 880
GLTunnel: 2 418
String: 2 353
GLJellyFish: 2 794
Nexus S
Productivity index: 922
Games index: 2 462
Pi: 1 520
Mandelbrot: 596
GLTunnel: 2 557
String: 1 087
GLJellyFish: 2 794
Smartbench 2010
Optimus 2X
Productivity index: 1732
Games Index: 2852
Pi: 2627
Mandelbrot: 1000
GLTunnel: 3550
File IO Small: 1670
File IO Large: 1499
GLJellyFish: 3477
Nexus S
Productivity index: 1183
Games index: 2903
Pi: 752
Mandelbrot: 1255
GLTunnel: 3607
File IO Small: 2005
File IO Large: 2622
GLJellyFish: 2993
It stands pretty clear that it's possible to take advantage of that extra core. With the default Android apps with Android 2.2/Froyo, the gain is really next to none though, probably because they're simply not optimized.
JohnRogers said:
It stands pretty clear that it's possible to take advantage of that extra core. With the default Android apps with Android 2.2/Froyo, the gain is really next to none though, probably because they're simply not optimized.
Click to expand...
Click to collapse
This is true. The Linux Kernel behind the versions of Android shipped on Optimus 2X and Atrix (and Xoom, etc) are compiled with SMP flag on, which means it WILL detect and use additional cores when needed. When Smartbench 2011 is ran, I actually transfer the "fingerprint" of the Linux Kernel which contains this info. So far, I am only seeing these flags on phones that feature dual-cores (which is understandable). And remember, Linux has been supporting SMP for a very long time so its not necessarily because they are newer kernel versions.
And as you mentioned already, 99.9% of all current apps won't run any faster since they are not symmetrically multi-threaded. But if you are already running some background services, then obviously your foreground app will still run faster. Still, it won't be as visible as apps that natively spawn multiple threads like Smartbench 2011.
Smartbench 2011 in fact, keeps 4 thread alive all the time, so when quad-core phones arrive, you will see further improvements in speed.
JohnRogers said:
Take a look at this: http://www.youtube.com/watch?v=vJ0CkqKqmts&hd=1
Page loading times doesn't differ at all from the Nexus S, which in some cases actually seems faster - and yes, I know it's a case of Froyo vs Gingerbread, but still?
Shouldn't a dual core CPU be at least 30-40% faster with multithreaded applications? At the very minium?
Click to expand...
Click to collapse
I don't trust that video. I have seen videos of the NS, the Iphone 4 and the 2X next to next other and the 2X wins by alot. I know all the videos of the 2X doing flash shows the phone blowing away the other phones FPS wise. So that has to be using both cores to do that. Also in that video watch the Wifi signal go up and down all the time on both phones. That could also be effecting the speed at which pages load. Maybe one phone or the other is losing signal at one point. Either way the 2X is far better then the NS. Google should of waited and made the 2X there new Nexus.

[Q] Baffled by Mouse/Keyboard Support

So, I'm going crazy trying to get both a bluetooth keyboard and mouse to work with the nook hd+. With the latest Cyanogenmod, I can get a Logitech K810 to pair, but I can't get any bluetooth mouse to pair. With stock, I can get the same mouse to work, but the K810 won't pair. Am I living in the twilight zone or something??
Anyway, I'm really frustrated. It's clear that - when the devices won't pair, it's because the little dialog box won't display asking me to type in the pin. Best case, I'd like to have the bluetooth mouse pair using Cyanogenmod. So, the Logitech K810 works in Cyanogenmod, but the mouse isn't. Does anyone have any ideas? Also, if you do have a bluetooth mouse that works with Cyanogenmod, please let me know which type and model it is.
jphudy said:
... Also, if you do have a bluetooth mouse that works with Cyanogenmod, please let me know which type and model it is.
Click to expand...
Click to collapse
I have a Lenovo model A300-M bluetooth mouse that works fine with the lastest and previous CM.
I have a Favi mini and it wouldn't pair following the directions. I had to turn the bluetooth on the HD+ off and on a few times then it worked.
jphudy said:
So, I'm going crazy trying to get both a bluetooth keyboard and mouse to work with the nook hd+. With the latest Cyanogenmod, I can get a Logitech K810 to pair, but I can't get any bluetooth mouse to pair. With stock, I can get the same mouse to work, but the K810 won't pair. Am I living in the twilight zone or something??
Anyway, I'm really frustrated. It's clear that - when the devices won't pair, it's because the little dialog box won't display asking me to type in the pin. Best case, I'd like to have the bluetooth mouse pair using Cyanogenmod. So, the Logitech K810 works in Cyanogenmod, but the mouse isn't. Does anyone have any ideas? Also, if you do have a bluetooth mouse that works with Cyanogenmod, please let me know which type and model it is.
Click to expand...
Click to collapse
I too am going through hell getting a bluetooth mouse I just bought paired. Won't pair on the B11 Carbon or latest 7/19 build of verygreen's emmc cyanogenmod. Same mouse pair's fine with my sg3 running paranoid 3.69. But, I bought the mouse for the nook... frustrating. FWIW, it's a Connectland mouse.
See the logcat of the failed bond here:
I/BluetoothBondStateMachine( 1098): Bond address is:00:11:67:00:10:FD
I/BluetoothBondStateMachine( 1098): Entering PendingCommandState State
I/BluetoothBondStateMachine( 1098): bondStateChangeCallback: Status: 0 Address: 00:11:67:00:10:FD newState: 1
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/BluetoothBondStateMachine( 1098): Bond State Change Intent:00:11:67:00:10:FD OldState: 10 NewState: 11
D/BluetoothAdapterService(1091016096)( 1098): Get Bonded Devices being called
I/ ( 1098): vendor op - 7
D/HidService( 1098): Connection state 00:11:67:00:10:FD: 0->1
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
E/wpa_supplicant( 721): Unsupported command: BTCOEXSCAN-START
D/BluetoothAdapterProperties( 1098): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 0 -> 1
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): Get Bonded Devices being called
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/ ( 1098): vendor op - 7
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/ ( 1098): vendor op - 7
E/bt-l2cap( 1098): l2cu_adjust_out_mps bad packet size: 0 will use MPS: 0
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/ ( 1098): vendor op - 7
D/BluetoothDiscoverableEnabler( 3976): handleModeChanged(): mode = 21
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
W/bt-btif ( 1098): info:x0
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
D/CachedBluetoothDevice( 3976): onProfileStateChanged: profile HID newProfileState 1
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
W/bt-sdp ( 1098): process_service_attr_rsp
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
W/bt-sdp ( 1098): process_service_attr_rsp
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
W/bt-btm ( 1098): btm_sec_pin_code_request() rejected - state: 7
I/ ( 1098): vendor op - 7
I/ ( 1098): vendor op - 7
W/bt-l2cap( 1098): L2CAP - cfg rsp - bad ID. Exp: 11 Got: 10
I/BluetoothBondStateMachine( 1098): bondStateChangeCallback: Status: 1 Address: 00:11:67:00:10:FD newState: 0
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): Get Bonded Devices being called
I/BluetoothBondStateMachine( 1098): Bond State Change Intent:00:11:67:00:10:FD OldState: 11 NewState: 10
W/bt-btif ( 1098): btif_hh_upstreams_evt: BTA_HH_OPN_EVT: handle=1, status =12
I/BluetoothBondStateMachine( 1098): StableState(): Entering Off State
D/HidService( 1098): Connection state 00:11:67:00:10:FD: 1->0
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
E/wpa_supplicant( 721): Unsupported command: BTCOEXSCAN-STOP
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterProperties( 1098): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 1 -> 0
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): Get Bonded Devices being called
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothDiscoverableEnabler( 3976): handleModeChanged(): mode = 21
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
W/BluetoothEventManager( 3976): showUnbondMessage: Not displaying any message for reason: 9
I/LocalBluetoothProfileManager( 3976): Failed to connect HID device
D/CachedBluetoothDevice( 3976): onProfileStateChanged: profile HID newProfileState 0
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1091016096)( 1098): getState(): mAdapterProperties: [email protected]
I/ ( 1098): vendor op - 7
E/bt-btm ( 1098): btm_sec_disconnected - Clearing Pending flag
FWIW, here's a logcat of a successful pair with my sg3:
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
I/BluetoothBondStateMachine( 4144): Bond address is:00:11:67:00:10:FD
I/BluetoothBondStateMachine( 4144): Entering PendingCommandState State
I/BluetoothBondStateMachine( 4144): bondStateChangeCallback: Status: 0 Address: 00:11:67:00:10:FD newState: 1
I/BluetoothBondStateMachine( 4144): Bond State Change Intent:00:11:67:00:10:FD OldState: 10 NewState: 11
D/HidService( 4144): Connection state 00:11:67:00:10:FD: 0->1
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterProperties( 4144): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 0 -> 1
V/BluetoothDiscoveryReceiver( 3020): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): Get Bonded Devices being called
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): Get Bonded Devices being called
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]68
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothDiscoverableEnabler( 3020): handleModeChanged(): mode = 21
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/CachedBluetoothDevice( 3020): onProfileStateChanged: profile HID newProfileState 1
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
W/bt-btif ( 4144): info:x0
I/HeadsetService( 2191): Headset=false; Bluetooth=false
W/bt-sdp ( 4144): process_service_attr_rsp
W/bt-sdp ( 4144): process_service_attr_rsp
D/btif_config_util( 4144): btif_config_save_file(L153): in file name:/data/misc/bluedroid/bt_config.new
E/bt-btif ( 4144): services_to_search = 1fffffff
E/bt-btif ( 4144): ****************search UUID = 1200***********
W/bt-btif ( 4144): new conn_srvc id:23, app_id:1
W/bt-btif ( 4144): btif_hh_upstreams_evt: BTA_HH_OPN_EVT: handle=1, status =0
W/bt-btif ( 4144): BTA_HH_OPEN_EVT: Found device...Getting dscp info for handle ... 1
W/bt-btif ( 4144): BTA_HH_GET_DSCP_EVT: status = 49, handle = 17
W/bt-btif ( 4144): btif_hh_upstreams_evt: name = Broadcom Bluetooth HID
W/bt-btif ( 4144): bta_hh_co_send_hid_info: fd = 69, name = [Broadcom Bluetooth HID], dscp_len = 93
W/bt-btif ( 4144): bta_hh_co_send_hid_info: vendor_id = 0x1131, product_id = 0x3501, version= 0x0611,ctry_code=0x00
D/HidService( 4144): Connection state 00:11:67:00:10:FD: 1->2
E/EventHub( 668): could not get driver version for /dev/input/mouse0, Not a typewriter
W/bt-btif ( 4144): bta_hh_co_send_hid_info: fd = 69, dscp_len = 93, result = 0
W/bt-btif ( 4144): Added device 00:11:67:00:10:FD
W/bt-btif ( 4144): BTA_HH_GET_DSCP_EVT: Called add device
W/bt-btif ( 4144): BTA_HH_ADD_DEV_EVT: status = 0, handle = 1
D/CachedBluetoothDevice( 3020): onProfileStateChanged: profile HID newProfileState 2
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterProperties( 4144): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 1 -> 2
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): Get Bonded Devices being called
W/bt-sdp ( 4144): process_service_search_attr_rsp
E/bt-btif ( 4144): services_to_search = 1ffffffe
E/bt-btif ( 4144): ****************search UUID = 0100***********
D/EventHub( 668): No input device configuration file found for device 'Broadcom Bluetooth HID'.
I/EventHub( 668): New device: id=15, fd=237, path='/dev/input/event14', name='Broadcom Bluetooth HID', classes=0x80000008, configuration='', keyLayout='', keyCharacterMap='', buil
tinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true
I/InputReader( 668): Device added: id=15, name='Broadcom Bluetooth HID', sources=0x00002002
I/ActivityManager( 668): Config changes=1400 {0.85 310mcc260mnc en_US ldltr sw360dp w360dp h615dp 320dpi nrml long port finger -keyb/v/h dpad/v s.8 themeResource=null}
W/bt-sdp ( 4144): process_service_search_attr_rsp
E/bt-btif ( 4144): Index: 0 uuid:00001124-0000-1000-8000-00805f9b34fb
I/BluetoothBondStateMachine( 4144): bondStateChangeCallback: Status: 0 Address: 00:11:67:00:10:FD newState: 2
D/btif_config_util( 4144): btif_config_save_file(L153): in file name:/data/misc/bluedroid/bt_config.new
I/BluetoothBondStateMachine( 4144): Bond State Change Intent:00:11:67:00:10:FD OldState: 11 NewState: 12
W/BackupManagerService( 668): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
W/BackupManagerService( 668): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
W/BackupManagerService( 668): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
E/Sensors ( 668): accelHandler 0.226329 5.902525 7.961045
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
I/BluetoothBondStateMachine( 4144): StableState(): Entering Off State
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothDiscoverableEnabler( 3020): handleModeChanged(): mode = 21
I/dalvikvm-heap( 668): Grow heap (frag case) to 20.625MB for 2073616-byte allocation
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothInputDevice( 3020): connect(00:11:67:00:10:FD)
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
E/HidService( 4144): Hid Device not disconnected: 00:11:67:00:10:FD
I/CachedBluetoothDevice( 3020): Failed to connect HID to Bluetooth Optic Mouse
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
I/ActivityManager( 668): Start proc com.tmobile.thememanager for content provider com.tmobile.thememanager/.provider.ThemesProvider: pid=5345 uid=1300 gids={41300, -1, 1028}
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothInputDevice( 3020): connect(00:11:67:00:10:FD)
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
E/HidService( 4144): Hid Device not disconnected: 00:11:67:00:10:FD
I/CachedBluetoothDevice( 3020): Failed to connect HID to Bluetooth Optic Mouse
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): getState(): mAdapterProperties: [email protected]
D/BluetoothAdapterService(1089359680)( 4144): Get Bonded Devices being called
hondoslack said:
I too am going through hell getting a bluetooth mouse I just bought paired. Won't pair on the B11 Carbon or latest 7/19 build of verygreen's emmc cyanogenmod. Same mouse pair's fine with my sg3 running paranoid 3.69. But, I bought the mouse for the nook... frustrating. FWIW, it's a Connectland mouse.
Click to expand...
Click to collapse
I only have Apple magic mouse and it works.
Unless this mouse you have needs a special kernel quirk, it should work too.
FWIW, here's a logcat of a successful pair with my sg3:
...
E/HidService( 4144): Hid Device not disconnected: 00:11:67:00:10:FD
I/CachedBluetoothDevice( 3020): Failed to connect HID to Bluetooth Optic Mouse
Click to expand...
Click to collapse
This does not look too succesful to me?
verygreen said:
I only have Apple magic mouse and it works.
Unless this mouse you have needs a special kernel quirk, it should work too.
This does not look too succesful to me?
Click to expand...
Click to collapse
Well, I'm not sure what role HID plays in device connections (also, note the process ID is different, looks like its tied to something else), but if you scan through both logs, you'll see about midway the second one the successful connection, and addition of the device to "bt_config.new", which I imagine gets renamed to "bt_config.xml" when finished. Ultimately, on my phone and Nexus 7, regardless of that HID failure, the mouse works fine, even the "back" button. Considering all 3 devices are running a variant of the same code base, it's hard to say. Maybe it is a kernel issue, but then, why only this mouse? Frustating...
If you look at the failure log from the Nook, things seem to fall apart after this:
E/wpa_supplicant( 721): Unsupported command: BTCOEXSCAN-START
Maybe it's better to remove the "I" and "D" lines, and focus on the warnings and errors:
Code:
E/wpa_supplicant( 721): Unsupported command: BTCOEXSCAN-START
E/bt-l2cap( 1098): l2cu_adjust_out_mps bad packet size: 0 will use MPS: 0
W/bt-btif ( 1098): info:x0
W/bt-sdp ( 1098): process_service_attr_rsp
W/bt-sdp ( 1098): process_service_attr_rsp
W/bt-btm ( 1098): btm_sec_pin_code_request() rejected - state: 7
W/bt-l2cap( 1098): L2CAP - cfg rsp - bad ID. Exp: 11 Got: 10
W/bt-btif ( 1098): btif_hh_upstreams_evt: BTA_HH_OPN_EVT: handle=1, status =12
E/wpa_supplicant( 721): Unsupported command: BTCOEXSCAN-STOP
W/BluetoothEventManager( 3976): showUnbondMessage: Not displaying any message for reason: 9
E/bt-btm ( 1098): btm_sec_disconnected - Clearing Pending flag
Why would wpa_supplicant be getting invoked for bluetooth? Very strange.
hondoslack said:
Why would wpa_supplicant be getting invoked for bluetooth? Very strange.
Click to expand...
Click to collapse
BTCoexist is a legacy thing to make bt not to conflit with wifi on TI chipsets, no longer used, so you can safely ignore it.
I imagine your mouse is some of the HID-incompatible ones that needs additional quirks set in kernel.
Now the trick is to figure out which specific quirk is it.
I though I enabled most of the useful ones, but perhaps we'd also need some logitech and such that did not look too relevant at first
verygreen said:
BTCoexist is a legacy thing to make bt not to conflit with wifi on TI chipsets, no longer used, so you can safely ignore it.
I imagine your mouse is some of the HID-incompatible ones that needs additional quirks set in kernel.
Now the trick is to figure out which specific quirk is it.
I though I enabled most of the useful ones, but perhaps we'd also need some logitech and such that did not look too relevant at first
Click to expand...
Click to collapse
Understood, and thanks for taking a look at this! If it will help any, when home from work I can post the section from bt_config.xml on my Nexus 7 that contains the vendor ID, device ID, etc. That's too bad we have to hack the kernel for specific bluetooth devices, I thought bluetooth was supposed to be "universal"?
verygreen said:
BTCoexist is a legacy thing to make bt not to conflit with wifi on TI chipsets, no longer used, so you can safely ignore it.
I imagine your mouse is some of the HID-incompatible ones that needs additional quirks set in kernel.
Now the trick is to figure out which specific quirk is it.
I though I enabled most of the useful ones, but perhaps we'd also need some logitech and such that did not look too relevant at first
Click to expand...
Click to collapse
I guess I didn't realize that we're running a 3.0 kernel as opposed to 3.4 like on my other devices. That's like comparing apples to oranges at this point, as I'm sure the bluetooth stack has changed substantially in the kernel since 3.0.
For completeness, here is a logcat of a successful pairing with my mouse from Stock 2.1 running off the sdcard (thanks for that btw, very useful!):
D/BluetoothAdapterStateMachine( 210): PowerOff process message: 1
D/BluetoothAdapterStateMachine( 210): Bluetooth state 10 -> 11
I/bluedroid( 210): bt_enable
I/bluedroid( 210): bt_is_enabled: 0
I/bluedroid( 210): hci_increment_usage
I/bluedroid( 210): hci_is_enabled
I/bluedroid( 210): hci_enable
I/bluedroid( 210): hci_enable
I/bluedroid( 210): set_bluetooth_power
I/bluedroid( 210): Starting uim daemon
I/bluedroid( 210): create_hci_sock
I/SwitchPreference( 3055): parent preference is enabled, so switch enable false
V/SwitchPreference( 3055): progate embedded switch widget change to preference
V/SwitchPreference( 3055): switchpreference seChecked() true
V/SwitchPreference( 3055): Bluetooth:switchPref set to true
V/SwitchPreference( 3055): Bluetooth:switchPref change listener confirms
V/SwitchPreference( 3055): set embedded switch widget state to that of the containing preference, true
E/uim-sysfs( 4023): uim: Inside main
E/uim-sysfs( 4023): uim:ST built into the kernel ?
E/uim-sysfs( 4023): uim:FM driver module un-available...
E/uim-sysfs( 4023): uim:FM driver built into the kernel ?
E/uim-sysfs( 4023): uim:GPS driver module un-available...
E/uim-sysfs( 4023): uim:GPS driver built into the kernel ?
E/uim-sysfs( 4023): uim:FM V4L2 driver module un-available...
E/uim-sysfs( 4023): uim:FM V4L2 driver built into the kernel ?
E/uim-sysfs( 4023): uim:found bluetooth rfkill entry @ 0
E/uim-sysfs( 4023):
E/uim-sysfs( 4023): uim:changed permissions for /sys/class/rfkill/rfkill0/state(0)
E/uim-sysfs( 4023):
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.STATE_CHANGED
I/SwitchPreference( 3055): parent preference is enabled, so switch enable false
E/uim-sysfs( 4023): uim: Inside st_uart_config
E/uim-sysfs( 4023): uim:install set to 1
E/uim-sysfs( 4023): uimpening /dev/ttyO3, while already open
E/uim-sysfs( 4023): uim:cleanup
E/uim-sysfs( 4023): uim: Inside set_baud_rate
E/uim-sysfs( 4023): uim: set_baud_rate() done
E/uim-sysfs( 4023): uim: Setting speed to 3686400
E/uim-sysfs( 4023): uim: Inside read_command_complete
E/uim-sysfs( 4023): uim: Command complete started
E/uim-sysfs( 4023): uim: Inside read_hci_event
E/uim-sysfs( 4023): uim: read_hci_event
E/uim-sysfs( 4023): uim: Command complete done
E/uim-sysfs( 4023): uim: Speed changed to 3686400
E/uim-sysfs( 4023): uim: Inside set_custom_baud_rate
E/uim-sysfs( 4023): uim: Changing baud rate to 3686400, flow control to 1
E/uim-sysfs( 4023): uim: set_custom_baud_rate() done
E/uim-sysfs( 4023): uim: Installed N_TI_WL Line displine
I/bluedroid( 210): Starting bluetoothd deamon
I/bluedroid( 210): set_bt_enabled
I/BluetoothEventLoop.cpp( 210): agent_event_filter: Received method org.bluez.Agent:Release
D/BluetoothService( 210): switchConnectable false
D/BluetoothEventLoop( 210): Property Changed: UUIDs : 7
D/BluetoothAdapterStateMachine( 210): WarmUp process message: 101
D/BluetoothAdapterStateMachine( 210): WarmUp process message: 51
D/BluetoothAdapterStateMachine( 210): HotOff process message: 101
D/BluetoothService( 210): switchConnectable true
D/BluetoothEventLoop( 210): Property Changed: Connectable : true
D/BluetoothAdapterStateMachine( 210): Switching process message: 53
D/BluetoothEventLoop( 210): Property Changed: Pairable : true
D/BluetoothAdapterStateMachine( 210): Bluetooth state 11 -> 12
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.STATE_CHANGED
I/BluetoothA2dpService( 210): Register player - metadata: 1 settings: 1
D/BluetoothService( 210): new handle 10005
D/BluetoothEventLoop( 210): Property Changed: UUIDs : 8
D/BluetoothAdapterStateMachine( 210): BluetoothOn process message: 51
D/BluetoothGattClientService( 210): BT ON
D/BluetoothEventLoop( 210): Property Changed: Discovering : true
D/BluetoothAdapterStateMachine( 210): BluetoothOn process message: 1
W/BluetoothAdapterStateMachine( 210): BluetoothOn received: 1
V/SwitchPreference( 3055): embedded switch widget set to true
V/SwitchPreference( 3055): switchpreference seChecked() true
V/SwitchPreference( 3055): Bluetooth:switchPref set to true
V/SwitchPreference( 3055): Bluetooth:switchPref change listener confirms
V/SwitchPreference( 3055): set embedded switch widget state to that of the containing preference, true
I/SwitchPreference( 3055): parent preference is enabled, so switch enable true
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.DISCOVERY_STARTED
D/DockEventReceiver( 3055): finishStartingService: stopping service
V/BluetoothDiscoveryReceiver( 3055): Received: android.bluetooth.adapter.action.DISCOVERY_STARTED
D/BluetoothService( 210): updateDeviceServiceChannelCache(00:11:67:00:10:FD)
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.FOUND
D/BluetoothEventLoop( 210): Property Changed: Discovering : false
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.DISCOVERY_FINISHED
V/BluetoothDiscoveryReceiver( 3055): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
I/SUIV ( 3055): preparePopup 0x00000000
D/BluetoothEventLoop( 210): Property Changed: Discovering : true
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.DISCOVERY_STARTED
V/BluetoothDiscoveryReceiver( 3055): Received: android.bluetooth.adapter.action.DISCOVERY_STARTED
W/InputManagerService( 210): Window already focused, ignoring focus gain of: [email protected]
D/BluetoothService( 210): updateDeviceServiceChannelCache(00:11:67:00:10:FD)
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.FOUND
D/BatteryService( 210): PROCESSVALUES : update plugged:false was:false stat:3 zone:16 was:16 send low:false
D/BluetoothEventLoop( 210): Property Changed: Discovering : false
V/BluetoothEventManager( 3055): Received android.bluetooth.adapter.action.DISCOVERY_FINISHED
D/dalvikvm( 3055): GC_CONCURRENT freed 1569K, 15% free 13095K/15239K, paused 9ms+16ms
V/BluetoothDiscoveryReceiver( 3055): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
D/BluetoothBondState( 210): setBondState address 11reason: 0
D/BluetoothBondState( 210): 00:11:67:00:10:FD bond state 10 -> 11 (0)
E/bluetooth_common.cpp( 210): Unknown property Vendor
E/bluetooth_common.cpp( 210): parse_property_change: D-Bus error in PropertyChanged: (null) ((null))
E/BluetoothEventLoop.cpp( 210): event_filter: D-Bus error in PropertyChanged: (null) ((null))
E/bluetooth_common.cpp( 210): Unknown property Product
E/bluetooth_common.cpp( 210): parse_property_change: D-Bus error in PropertyChanged: (null) ((null))
E/BluetoothEventLoop.cpp( 210): event_filter: D-Bus error in PropertyChanged: (null) ((null))
E/bluetooth_common.cpp( 210): Unknown property Version
E/bluetooth_common.cpp( 210): parse_property_change: D-Bus error in PropertyChanged: (null) ((null))
E/BluetoothEventLoop.cpp( 210): event_filter: D-Bus error in PropertyChanged: (null) ((null))
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Temporary value: true
D/BluetoothEventLoop( 210): Property Changed: Devices : 1
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.BOND_STATE_CHANGED
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Connected value: true
D/BluetoothGattClientService( 210): Device connected:00:11:67:00:10:FD
D/BluetoothGattClientService( 210): onConnected
D/BluetoothGattClientService( 210): Device 00:11:67:00:10:FD is not connected to GATT. Ignoring
D/BluetoothService( 210): updateDeviceServiceChannelCache(00:11:67:00:10:FD)
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.FOUND
I/BluetoothEventLoop.cpp( 210): agent_event_filter: Received method org.bluez.Agent:RequestPinCode
D/BluetoothBondState( 210): setBondState address 11reason: 0
I/ActivityManager( 210): START {act=android.bluetooth.device.action.PAIRING_REQUEST flg=0x10000000 cmp=com.android.settings/.bluetooth.BluetoothPairingDialog (has extras)} from pid 3055
D/LocalBluetoothManager( 3055): setting foreground activity to null
I/ActivityManager( 210): Displayed com.android.settings/.bluetooth.BluetoothPairingDialog: +265ms
D/dalvikvm( 210): GC_FOR_ALLOC freed 664K, 23% free 14416K/18631K, paused 104ms
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Temporary value: false
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Paired value: true
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Trusted value: false
I/BluetoothEventLoop.cpp( 210): agent_event_filter: Received method org.bluez.Agent:Release
V/SwitchPreference( 3055): embedded switch widget set to true
V/SwitchPreference( 3055): switchpreference seChecked() true
V/SwitchPreference( 3055): Bluetooth:switchPref set to true
V/SwitchPreference( 3055): Bluetooth:switchPref change listener confirms
V/SwitchPreference( 3055): set embedded switch widget state to that of the containing preference, true
I/SwitchPreference( 3055): parent preference is enabled, so switch enable true
D/LocalBluetoothManager( 3055): setting foreground activity to non-null context
D/CallStack( 3055): Flushing caches (mode 0)
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: UUIDs value: 2
D/BluetoothService( 210): updateDeviceServiceChannelCache(00:11:67:00:10:FD)
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.UUID
D/BluetoothBondState( 210): setBondState address 12reason: 0
E/BluetoothPbap( 210): Could not bind to Bluetooth Pbap Service
I/BluetoothDeviceProfileState( 210): Entering ACL Connected state with: -2
W/ActivityManager( 210): Unable to start service Intent { act=android.bluetooth.IBluetoothPbap }: not found
W/ActivityManager( 210): Unbind failed: could not find connection for [email protected]
D/BluetoothBondState( 210): 00:11:67:00:10:FD bond state 11 -> 12 (0)
V/BluetoothService( 210): Untrusting 00:11:67:00:10:FD
V/BluetoothService( 210): setTrust address:00:11:67:00:10:FD value:0
E/bluetooth_common.cpp( 210): Unknown property Vendor
E/bluetooth_common.cpp( 210): Unknown property Product
E/bluetooth_common.cpp( 210): Unknown property Version
D/BluetoothService( 210): updateDeviceServiceChannelCache(00:11:67:00:10:FD)
I/TC ( 571): KPICollector: 1375408221017 platform bt_paired
D/BluetoothEventLoop( 210): Device property changed: 00:11:67:00:10:FD property: Trusted value: false
V/BluetoothEventManager( 3055): Received android.bluetooth.device.action.BOND_STATE_CHANGED
I/BluetoothProfileState( 210): Message:Entering PendingCommandState State
D/CachedBluetoothDevice( 3055): Command sent successfully:CONNECT Address:00:11:67:00:10:FD Profile:HID
D/BluetoothInputProfileHandler( 210): InputDevice state : device: 00:11:67:00:10:FD State:0->1
V/BluetoothEventManager( 3055): Received android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED
D/CachedBluetoothDevice( 3055): onProfileStateChanged: profile HID newProfileState 1
D/BluetoothService( 210): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 0 -> 1
W/ActivityManager( 210): Permission Denial: receiving Intent { act=android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED flg=0x10000010 (has extras) } to ProcessRecord{413e9178 210:system/1000} (pid=586, uid=10000) requires android.permission.BLUETOOTH due to sender android (uid 1000)
E/EventHub( 210): could not get driver version for /dev/input/mouse0, Not a typewriter
D/BluetoothEventLoop( 210): Input Device : Name of Property is: Connected
D/BluetoothInputProfileHandler( 210): InputDevice state : device: 00:11:67:00:10:FD State:1->2
I/BluetoothProfileState( 210): Message:Entering Stable State
I/BluetoothDeviceProfileState( 210): Entering ACL Connected state with: 102
W/ActivityManager( 210): Permission Denial: receiving Intent { act=android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED flg=0x10000010 (has extras) } to ProcessRecord{413e9178 210:system/1000} (pid=586, uid=10000) requires android.permission.BLUETOOTH due to sender android (uid 1000)
D/BluetoothService( 210): CONNECTION_STATE_CHANGE: 00:11:67:00:10:FD: 1 -> 2
I/TC ( 571): KPICollector: 1375408221466 platform bt_connect {"bt_profile_used":"HID"}
V/BluetoothEventManager( 3055): Received android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED
D/CachedBluetoothDevice( 3055): onProfileStateChanged: profile HID newProfileState 2
D/EventHub( 210): No input device configuration file found for device 'Bluetooth Optic Mouse'.
I/EventHub( 210): New device: id=10, fd=268, path='/dev/input/event8', name='Bluetooth Optic Mouse', classes=0x80000008, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader( 210): Device added: id=10, name='Bluetooth Optic Mouse', sources=0x00002002
Unfortunately, stock is not storing the configuration in /data/misc/bluedroid, like cyanogenmod, it is using the older bluetoothd folder. Also, I got the same behavior as OP, where my mouse pairs, but my keyboard doesn't..
Anyway, as promised, here are the relevant contents of bt_config.xml from my Nexus 7 pairing with this mouse:
<N1 Tag="Timestamp" Type="int">1375335898</N1>
<N2 Tag="Name" Type="string">Bluetooth Optic Mouse</N2>
<N3 Tag="DevClass" Type="int">9600</N3>
<N4 Tag="DevType" Type="int">1</N4>
<N5 Tag="LinkKeyType" Type="int">0</N5>
<N6 Tag="PinLength" Type="int">0</N6>
<N7 Tag="LinkKey" Type="binary">8359502074263b527f227a1fd1463bdb</N7>
<N8 Tag="HidAttrMask" Type="int">33269</N8>
<N9 Tag="HidSubClass" Type="int">128</N9>
<N10 Tag="HidAppId" Type="int">1</N10>
<N11 Tag="HidVendorId" Type="int">4401</N11>
<N12 Tag="HidProductId" Type="int">13569</N12>
<N13 Tag="HidVersion" Type="int">1553</N13>
<N14 Tag="HidCountryCode" Type="int">0</N14>
<N15 Tag="HidDescriptor" Type="binary">05010902a10185020901a1000509190129051500250175019505810275039501810105010930093116008026ff7f751095028106a1028502050109381581257f750895018106c0a1028502050c0a38021581257f750895018106c0c0c0</N15>
<N16 Tag="Service" Type="string">00001124-0000-1000-8000-00805f9b34fb </N16>
Connectland Mouse
It's great to know that some others are working at this. At this point, I've tried both the Connectland CL-MOU23014 and Gigabyte GM-M7700B mice, but neither works. It's a shame because both pair on my S3 running cyanogenmod. I really want to use my nook for RDP, but it's useless without a mouse.

Bluetooth Amazon FireTV Stick Remote

I have made some progress in finding out whats wrong but no idea how to fix it.
After installing evtest I get the following:
Code:
OpenELEC:~ # cat /proc/bus/input/devices
I: Bus=0005 Vendor=1949 Product=0404 Version=011b
N: Name="Amazon Fire TV Remote"
P: Phys=00:1a:7d:da:71:13
S: Sysfs=/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:71/0005:1949:0404.0001/input/input0
U: Uniq=a0:02:dc:e0:f9:d7
H: Handlers=kbd event0
B: PROP=0
B: EV=10001b
B: KEY=10000 1110 40000800 1681 0 0 0
B: ABS=100 0
B: MSC=10
Code:
OpenELEC:~ # evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x1949 product 0x404 version 0x11b
Input device name: "Amazon Fire TV Remote"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 96 (KEY_KPENTER)
Event code 103 (KEY_UP)
Event code 105 (KEY_LEFT)
Event code 106 (KEY_RIGHT)
Event code 108 (KEY_DOWN)
Event code 139 (KEY_MENU)
Event code 158 (KEY_BACK)
Event code 164 (KEY_PLAYPAUSE)
Event code 168 (KEY_REWIND)
Event code 172 (KEY_HOMEPAGE)
Event code 208 (KEY_FASTFORWARD)
Event type 3 (EV_ABS)
Event code 40 (ABS_MISC)
Value 0
Min 0
Max 255
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Property type 20 (EV_REP)
Property code 0 (REP_DELAY)
Value 1000
Property code 1 (REP_PERIOD)
Value 33
Testing ... (interrupt to exit)
***********************************************
This device is grabbed by another process.
No events are available to evtest while the
other grab is active.
In most cases, this is caused by an X driver,
try VT-switching and re-run evtest again.
***********************************************
So something is capturing the input and not letting it go through. Any idea how to fix this?
Just an update. Connected a Bluetooth keyboard and that worked fine and gave the same evtest output saying something else was grabbing the input which would mean that's not the problem with the Amazon remote.
Again, any help is welcomed!
This has been bugging me for the last day or two as well; and to be honest - still is.
The below will work but just seems "wrong" to have to use eventlircd for this...
/storage/.config/eventlircd.d/aftvsremote.evmap
(copy /etc/eventlircd.d to /storage/.config/eventlircd.d)
Code:
KEY_KPENTER = KEY_OK
KEY_UP = KEY_UP
KEY_LEFT = KEY_LEFT
KEY_RIGHT = KEY_RIGHT
KEY_DOWN = KEY_DOWN
KEY_MENU = KEY_EPG
KEY_BACK = KEY_EXIT
KEY_PLAYPAUSE = KEY_PLAY
KEY_REWIND = KEY_REWIND
KEY_HOMEPAGE = KEY_MEDIA
KEY_FASTFORWARD = KEY_FASTFORWARD
/storage/.config/autostart.sh
Bind mount because I'm too lazy to rebuild the openelec squashfs image
Code:
mount --bind /storage/.config/eventlircd.d/ /etc/eventlircd.d/
/storage/.config/udev.rules.d/99-eventlircd.rules
Code:
SUBSYSTEMS=="bluetooth", GOTO="begin-bluetooth"
GOTO="end-bluetooth"
LABEL="begin-bluetooth"
ATTRS{name}=="Amazon Fire TV Remote", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="aftvsremote.evmap"
LABEL="end-bluetooth"
Thank you so much!!! I got a chance to enter the code today and it works perfectly! I had to repair after the initial reboot but it keeps pairing after that for all other reboots. I hope they put this into openelec from here on out.
Again thanks!

[Q][Dev] Module static fields and handleLoadPackage

Hello,
I've found myself in a situation I can't solve myself, so I hope I can find some help here
In my module, I've got a static field "VERSION_CODE".
In one of my hooks I register a BroadcastReceiver for AfterBootCompleted in which I set the field's value (I use the system Context object).
Then, in handleLoadPackage, when I try to read the field "VERSION_CODE", it has it's default value.
I don't understand this. Are there separate JVMs or something? How do I make that field absolutely global?
If it's a final field (constant) of primitive type (int, boolean, etc.) you won't be able to change it since compiler doesn't use variable but inlines value directly everywhere it's used.
C3C076 said:
If it's a final field (constant) of primitive type (int, boolean, etc.) you won't be able to change it since compiler doesn't use variable but inlines value directly everywhere it's used.
Click to expand...
Click to collapse
It isn't declared final.

BT Calling Robotic Audio

Hi Guys,
As you may notice from my signature, I'm actually an LG G4 owner (attempting ) to assist with the development of Oreo roms for the G4. @kessaras and @steadfasterX have done a magnificent job so far and we have two bugs left - the torch tile in quick settings doesn't work (not a big deal right now, we just recommend an app as a workaround) and also we have robotic bt calling with a hands free set.
I have been browsing the hammerhead forums and noticed that this exact problem is also plaguing the Nexus 5 (and we share the same broadcom 4339 bt/wifi chipset, so I would imagine this is why we suffer from the same issue), and I was wondering whether it would be a good idea to share any ideas here as to how we could fix it - we have tweaked a lot of bluetooth settings so far but it has either made no difference or killed the bluetooth entirely.
@amaces I noticed you mentioned in your Unlegacy Android thread that you got it to work in a hardcoded and messy way - would it be possible for you to share it? I know you said it wasn't good for a production build, but if we could see how you got it working then it would definitely help us to find a proper fix.
Thanks for any help
I have that same problem. (android 8.1 or 9.0)
Nexus 5 D820
The issue is probably caused by the HIDLization and the introduction of eSCO command set. Prior to Oreo vendor specific commands(VSCs) were sent to the controller which would trigger I2S/PCM sco configuration.
When the HIDLization started the VSC for the sco configuration was removed 796523d and later on with the introduction of eSCO command setup these calls to the broadcom's libbt-vendor(pre-SCO setup) were completely removed a9152a2.
I tried retrieving retrieving these calls removed by eSCO(3/5), yet I cant get it working.
Here's what I've done so far:
system/bt stack
fb1d404
47f50f8-a2df04b
hardware/interfaces
dd21c98
The issue is either the way I attempt to send the VSC via send_command method, or in some of the methods which are supposed to notify the AG that the pre-sco is done.
So far I noticed that the code of bta_ag_ci_sco_open_continue method is never reached, but things could've went south even before this method, I dunno.
Looking at the snoop log nothing is even sent to the controller about this.
@steadfasterX @ThePiGuy if you guys are still interested in fixing this issue, you should really focus on retrieving these calls imho.
Would be good if anyone tries this c0d86fb. What I am trying is basically to avoid the need of hw_set_audio_state() call from bt stack to configurare SCO over PCM.
Should be accompanied by this commit in order to work.
 @amaces @razorloves
Hi there,
Sorry for delay. I was a bit busy today. Here is my workaround for bt issue:
1) android_hardware_broadcom_libbt
2) device tree
Honestly this workaround is terrible (explanations will be provided below) and disabled by default. You should add two parameters to vendor config in order to activate it:
1) BTHW_FW_EXTENDED_CONFIGURATION - Enable/disable the fix. TRUE/FALSE. Default value is FALSE.
2) BTHW_FW_EXTENDED_SCO_CODEC - SCO codec. Use the numeric value from the sco_codec_t enum. Default value is SCO_CODEC_CVSD.
Seems that the problem lies in firmware for our BT chip and eSCO command set. Controller have invalid audio configuration or doesn't have any audio configuration at all after firmware upload. That was not a problem before this change (Thanks @Sashko98 for research). I've tried a solution proposed by @Sashko98 but nothing changed. After a couple of days playing with different parameters in configs i noticed interesting line in logcat:
Code:
W/bt_hci:
filter_incoming_event command complete event with no matching command (opcode: [B]0xfc6d[/B])
0xfc6d is a HCI_VSC_WRITE_I2SPCM_INTERFACE_PARAM constant defined here and used inside of the hw_sco_i2spcm_config method. Seems that bt controller responds to HCI_VSC_WRITE_I2SPCM_INTERFACE_PARAM command. But why we still have an issue with audio? The answer is simple: SCO configuration can not be completed because bt_hci blocks events and callbacks are not called at all! If device uses SCO_INTERFACE_PCM bus interface then hw_sco_i2spcm_config method will send 3 commands: HCI_VSC_WRITE_I2SPCM_INTERFACE_PARAM, HCI_VSC_WRITE_SCO_PCM_INT_PARAM, HCI_VSC_WRITE_PCM_DATA_FORMAT_PARAM. Each next command will be sent only if previous was sent successfully and controller responded with correct status. Сontroller responds, but bt_hci blocks the very first event and SCO configuration fails.
We have 2 possible solutions here:
1) Understand why bt_hci blocks events... This is ideal solution, but not easy! bt_hci is a part of system bluetooth stack and bluetooth stack is huge!
2) Send all the necessary commands without waiting for response from bt controller. Yep, i know how it sounds but it works! At least for now...
I've implemented solution #2. Look at hw_config_continue_sco_setup method. It works just like the hw_set_SCO_codec method but doesn't wait for response from bt controller. Why the hw_set_SCO_codec? Because it sends one more command related to WBS before calling the hw_sco_i2spcm_config.
As i said before i think this solution is terrible. Here are my concerns about it:
1) Uncontrolled commands sent to bt controller. Who knows how long this will work...
2) Can be applied only for broadcom chips.
That's all I found at the moment. I will try to implement the solution #1, but I can't tell whether it will work. Feel free to contact me if you have any questions/ideas/improvements.
Many thank to devs who still support our old hammy! @razorloves, @amaces, @EnesSastim, @voidz777, @KiD3991, @Hannibal226, @hhrokarvi, @Sashko98 and many other! You guys are awesome! Thanks a lot for your work!!! All this would be impossible without you!!!
PS: Sorry for my terrible english
z3DD3r said:
We have 2 possible solutions here:
1) Understand why bt_hci blocks events... This is ideal solution, but not easy! bt_hci is a part of system bluetooth stack and bluetooth stack is huge!
2) Send all the necessary commands without waiting for response from bt controller. Yep, i know how it sounds but it works! At least for now...
As i said before i think this solution is terrible. Here are my concerns about it:
1) Uncontrolled commands sent to bt controller. Who knows how long this will work...
2) Can be applied only for broadcom chips.
Click to expand...
Click to collapse
If i understand correctly this is just a warning that the hci module doesn't recognize the command, which I believe is normal since the call is not made from the bt stack( which is not quite needed at this point anyway).
What is curious to me is why are the VSCs even required. I mean I tried to replicate the exact clock/codec etc.. configuration as it would've been configured if the VSCs were send, in the vnd config and there was no change at all. Probably there is something in the hcd patch about this, which would explain why my attempt in the post above works for Galaxy Note 3 and doesn't work for us.(if i am right than your hack could be considered just as extended of the hcd patch.)
Broadcom's libbt-vendor is pretty much obsolete, thus it will be easier to maintain this hack in further OS versions. Changes to bt-stack to get this work would be just too much time consuming to maintain considering that the guys from Google working on the AOSP want as less VSCs as possible.
Read this https://source.android.com/devices/bluetooth just to see how the Bluetooth works,if you plan to retrieve the VSCs to bt stack.
Sashko98 said:
If i understand correctly this is just a warning that the hci module doesn't recognize the command, which I believe is normal since the call is not made from the bt stack( which is not quite needed at this point anyway).
Click to expand...
Click to collapse
This is partly true. This warning means that HCI received event for command which was not sent from bt stack. Some commands are send directly from the VendorInterface class and should be handle only here.
Sashko98 said:
What is curious to me is why are the VSCs even required. I mean I tried to replicate the exact clock/codec etc.. configuration as it would've been configured if the VSCs were send, in the vnd config and there was no change at all.
Click to expand...
Click to collapse
It is not enough to just setup the vnd config. U still need to call hw_sco_i2spcm_config or hw_set_SCO_codec. But as i described above these methods fails.
Sashko98 said:
Probably there is something in the hcd patch about this, which would explain why my attempt in the post above works for Galaxy Note 3 and doesn't work for us.(if i am right than your hack could be considered just as extended of the hcd patch.)
Click to expand...
Click to collapse
You are right! This issue can be fixed new firmware or additional firmware prepatch. But we will never receive such update) I did one experiment. Your fixes + custom firmware for our chip downloaded from here = working bt calls But this way is more crazy that my current hack)))
Sashko98 said:
Broadcom's libbt-vendor is pretty much obsolete, thus it will be easier to maintain this hack in further OS versions. Changes to bt-stack to get this work would be just too much time consuming to maintain considering that the guys from Google working on the AOSP want as less VSCs as possible.
Read this https://source.android.com/devices/bluetooth just to see how the Bluetooth works,if you plan to retrieve the VSCs to bt stack.
Click to expand...
Click to collapse
Looks like we don't need to change anything in bt stack. Seems i have found the real issue. Look at VendorInterface::HandleEvent method. Seems that this is an entry point for all events sent from controller. This method uses the internal_command to determine how the received event should be handled. internal_command is populated inside of transmit_cb which is called from the libbt-vendor. So, what happens if someone will send 2 commands one after another? First command will be recorded into the internal_command var and the second command will be recorded to internal_command var. Second command will overwrite the infrormation about first. And since the communication is made via UART, controller will sent us response for first command (which is already gone) and then response for second command. Thats why nothing works! Thats why i saw that strange lines in logcat!!!
All that means that your fix should work. U just need to improve it a bit:
1. android_hardware_interfaces. Move lib_interface_->op(BT_VND_OP_SCO_CFG, nullptr); right after the lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
2. c0d86f. Call the hw_set_SCO_codec for PCM instead of hw_sco_i2spcm_config
I have not tried it myself yet. But logs and logic seems correct. Bt calls issue may be not fixed cos of initialization sequence, but all callbacks should be called correctly.
---------- Post added at 08:47 AM ---------- Previous post was at 08:37 AM ----------
Hmm, seems that based on my finding i can improve my initial solution. At least i can made controllable configuration of the SCO with all required callbacks! Will try it today...
z3DD3r said:
This is partly true. This warning means that HCI received event for command which was not sent from bt stack. Some commands are send directly from the VendorInterface class and should be handle only here.
Click to expand...
Click to collapse
The VendorInterface still comunicates with the bt stack via the hci_layer.
z3DD3r said:
It is not enough to just setup the vnd config. U still need to call hw_sco_i2spcm_config or hw_set_SCO_codec. But as i described above these methods fails.
You are right! This issue can be fixed new firmware or additional firmware prepatch. But we will never receive such update) I did one experiment. Your fixes + custom firmware for our chip downloaded from here = working bt calls But this way is more crazy that my current hack)))
Click to expand...
Click to collapse
In ideal case the hcd patch wouldn't need VSCs for such configuration, because It would've already been configured(what you tried with the custom patch just proves it). Appereantly Xperia Z3(shinano) is using its own solution by configuring the controller using bt drivers link. Perhaps this is why it is the only device I know of with BCM4339 Wifi/bt chip which didn't have any issues with bt-sco. Their code compiles perfectly with our kernel, but there are many init changes needed to happen to make it work.
z3DD3r said:
Looks like we don't need to change anything in bt stack. Seems i have found the real issue. Look at VendorInterface::HandleEvent method. Seems that this is an entry point for all events sent from controller. This method uses the internal_command to determine how the received event should be handled. internal_command is populated inside of transmit_cb which is called from the libbt-vendor. So, what happens if someone will send 2 commands one after another? First command will be recorded into the internal_command var and the second command will be recorded to internal_command var. Second command will overwrite the infrormation about first. And since the communication is made via UART, controller will sent us response for first command (which is already gone) and then response for second command. Thats why nothing works! Thats why i saw that strange lines in logcat!!!
Click to expand...
Click to collapse
If there is any race happening I think it should be handled by the VendorInterface, thought looking at the VendorInterface::HandleIncomingEvent method in vendor_interface.cc it is already handling such cases.
On Nougat the I2S/PCM interface was configured only when sco connection was established, if you look at the first eSCO commit you'll see that the initial idea was to keep the pre-SCO vendor setup link, thus I I used to be focused pretty much on bringing this back, till I understood there is no point, as it would require changes not only to the bt stack, but to Bluetooth app aswell.
As I said its just consumes too much time, not only to do it successfully, but to maintain it.
z3DD3r said:
All that means that your fix should work. U just need to improve it a bit:
1. android_hardware_interfaces. Move lib_interface_->op(BT_VND_OP_SCO_CFG, nullptr); right after the lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
2. c0d86f. Call the hw_set_SCO_codec for PCM instead of hw_sco_i2spcm_config
..
Click to expand...
Click to collapse
hw_set_SCO_codec is useless at this point, as everything goes back to hw_sco_i2spcm_config to configure sample rate for the required codec. The clock rate is the same regardless of the codec.
On my local builds I moved lib_interface_->op(BT_VND_OP_SCO_CFG, nullptr); to the end of the method. Just for the tests once I put it even in VendorInterface;;Open, doesn't really matter where it is as long as it is called. The problem is that the callback methods arent reached. I tried sending BT_VND_OP_SET_AUDIO_STATE opcode command to start the whole sequene, but it doesnt get past the first send VSC(HCI_VSC_ENABLE_WBS) I believe it was, exactly due to the cbacks.
Sashko98 said:
In ideal case the hcd patch wouldn't need VSCs for such configuration, because It would've already been configured(what you tried with the custom patch just proves it). Appereantly Xperia Z3(shinano) is using its own solution by configuring the controller using bt drivers . Perhaps this is why it is the only device I know of with BCM4339 Wifi/bt chip which didn't have any issues with bt-sco. Their code compiles perfectly with our kernel, but there are many init changes needed to happen to make it work.
Click to expand...
Click to collapse
I know another device - LG G2. Own bt driver can work, but it looks very complicated to me...
Sashko98 said:
If there is any race happening I think it should be handled by the VendorInterface, thought looking at the VendorInterface::HandleIncomingEvent() method in vendor_interface.cc it is already handling such cases.
Click to expand...
Click to collapse
I don't see any race conditions here. Just a simple mistake. Only one variable is used instead of queue. Maybe this interface wasn't designed to handle such cases...
Sashko98 said:
On Nougat the I2S/PCM interface was configured only when sco connection was established, if you look at the first eSCO commit you'll see that the initial idea was to keep the pre-SCO vendor setup [url=https://github.com/LineageOS/android_system_bt/commit/86f1b61e614b4110d953b91d1eee3812802c1f34#diff-91f58eb08ce9dea17af6a8fd5d3b313aR478]link
Click to expand...
Click to collapse
Sashko98 said:
, thus I I used to be focused pretty much on bringing this back, till I understood there is no point, as it would require changes not only to the bt stack, but to Bluetooth app aswell.
As I said its just consumes too much time, not only to do it successfully, but to maintain it.
Click to expand...
Click to collapse
Fully agree with you. Maintaining all those changes will be painful...
Sashko98 said:
hw_set_SCO_codec is useless at this point, as everything goes back to hw_sco_i2spcm_config to configure sample rate for the required codec. The clock rate is the same regardless of the codec.
Click to expand...
Click to collapse
Who knows. I'm using it cos BT_VND_OP_SET_AUDIO_STATE command actually call hw_set_SCO_codec and not the hw_sco_i2spcm_config. hw_set_SCO_codec sends one additional command to enable/disable WBS. It may be not necessary for Nexus 5, but it can be necessary for other devices. In any case i think we should make this behavior configurable.
Sashko98 said:
On my local builds I moved lib_interface_->op(BT_VND_OP_SCO_CFG, nullptr); to the end of the method. Just for the tests once I put it even in VendorInterface:pen(), doesn't really matter where it is as long as it is called. The problem is that the callback methods arent reached. I tried sending BT_VND_OP_SET_AUDIO_STATE opcode command to start the whole sequene, but it doesnt get past the first send VSC(HCI_VSC_ENABLE_WBS) I believe it was.
Click to expand...
Click to collapse
This is very strange. Look at my logcat (LOS wit BT fix):
Code:
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: set SCO related hardware settings
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: set SCO codec: 0x1
06-18 09:06:15.850 D/[email protected](7282): buffer_alloc_cb pts: 0x9f483e60, size: 14
[B]06-18 09:06:15.850 D/[email protected](7282): transmit_cb opcode: 0xfc7e, ptr: 0x9f483e60, cb: 0x8b2cfcf9 - First opcode from hw_set_SCO_codec[/B]
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: set SCO I2S/PCM codec: 0x1
06-18 09:06:15.850 D/[email protected](7282): buffer_alloc_cb pts: 0x9f483e60, size: 15
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: I2SPCM config {0x0, 0x0, 0x0, 0x4}
06-18 09:06:15.850 D/[email protected](7282): transmit_cb opcode: 0xfc6d, ptr: 0x9f483e60, cb: 0x8b2cfcf9
06-18 09:06:15.850 D/[email protected](7282): buffer_alloc_cb pts: 0x9f483e60, size: 16
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: SCO PCM configure {0x0, 0x4, 0x0, 0x0, 0x0}
06-18 09:06:15.850 D/[email protected](7282): transmit_cb opcode: 0xfc1c, ptr: 0x9f483e60, cb: 0x8b2cfcf9
06-18 09:06:15.850 D/[email protected](7282): buffer_alloc_cb pts: 0x9f483e60, size: 16
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: SCO PCM data format {0x0, 0x0, 0x3, 0x0, 0x0}
06-18 09:06:15.850 D/[email protected](7282): transmit_cb opcode: 0xfc1e, ptr: 0x9f483e60, cb: 0x8b2cfcf9
06-18 09:06:15.850 I/bt_hwcfg(7282): hw_config_continue_sco_setup: finish
06-18 09:06:15.850 D/[email protected](7282): firmware_config_cb result: 0
06-18 09:06:15.850 D/[email protected](7282): OnFirmwareConfigured result: 0
06-18 09:06:15.850 I/[email protected](7282): Firmware configured in 0.635s
06-18 09:06:15.850 D/[email protected](7282): OnFirmwareConfigured: lpm_timeout_ms 1500
06-18 09:06:15.850 I/bt_hci (7282): event_finish_startup
06-18 09:06:15.850 D/[email protected](7282): buffer_alloc_cb pts: 0x9f495958, size: 23
06-18 09:06:15.850 I/bt_core_module(7282): module_start_up Started module "hci_module"
06-18 09:06:15.850 D/[email protected](7282): transmit_cb opcode: 0xfc27, ptr: 0x9f495958, cb: 0x8b2cf4f9
06-18 09:06:15.850 D/[email protected](7282): OnFirmwareConfigured Calling StartLowPowerWatchdog()
06-18 09:06:15.851 D/[email protected](7282): sco_config_cb result: 0
06-18 09:06:15.851 D/[email protected](7282): OnScoConfigured result: 0
06-18 09:06:15.851 D/[email protected](7282): buffer_free_cb ptr: 0x9f483e50
[b]06-18 09:06:15.851 D/[email protected](7282): internal_command_event_match internal_command.opcode = FC27 opcode = fc7e - First event from bt controller[/b]
06-18 09:06:15.851 I/bt_osi_thread(7282): run_thread: thread id 7330, thread name bt_workqueue started
06-18 09:06:15.851 D/[email protected](7282): event_cb_ called
06-18 09:06:15.851 W/bt_hci (7282): filter_incoming_event command complete event with no matching command (opcode: 0xfc7e).
06-18 09:06:15.851 I/ (7282): [0618/090615.851280:INFO:btu_task.cc(107)] Bluetooth chip preload is complete
06-18 09:06:15.851 I/ (7282): [0618/090615.851843:INFO:gatt_api.cc(948)] GATT_Register 81818181-8181-8181-8181-818181818181
06-18 09:06:15.851 I/ (7282): [0618/090615.851972:INFO:gatt_api.cc(968)] allocated gatt_if=1
06-18 09:06:15.852 I/ (7282): [0618/090615.852038:INFO:gatt_api.cc(161)] GATTS_AddService
06-18 09:06:15.852 I/ (7282): [0618/090615.852094:INFO:gatt_api.cc(265)] GATTS_AddService: service parsed correctly, now starting
06-18 09:06:15.852 I/ (7282): [0618/090615.852276:INFO:gatt_api.cc(948)] GATT_Register 82828282-8282-8282-8282-828282828282
06-18 09:06:15.852 I/ (7282): [0618/090615.852333:INFO:gatt_api.cc(968)] allocated gatt_if=2
06-18 09:06:15.852 I/ (7282): [0618/090615.852402:INFO:gatt_api.cc(161)] GATTS_AddService
06-18 09:06:15.852 I/ (7282): [0618/090615.852455:INFO:gatt_api.cc(265)] GATTS_AddService: service parsed correctly, now starting
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_HCI : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_L2CAP : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_RFCOMM : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_AVDT : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_AVRC : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_A2D : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_BNEP : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_BTM : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_HID_HOST : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_PAN : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_SDP : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_SMP : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_HID_DEV : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_BTAPP : Level 2
06-18 09:06:15.852 I/bt_bte (7282): BTE_InitTraceLevels -- TRC_BTIF : Level 2
06-18 09:06:15.853 I/bt_osi_thread(7282): run_thread: thread id 7331, thread name btu message loop started
[B]06-18 09:06:15.853 D/[email protected](7282): internal_command_event_match internal_command.opcode = FC27 opcode = fc6d - Second one[/B]
06-18 09:06:15.853 D/[email protected](7282): event_cb_ called
06-18 09:06:15.853 W/bt_hci (7282): filter_incoming_event command complete event with no matching command (opcode: 0xfc6d).
06-18 09:06:15.853 D/[email protected](7282): internal_command_event_match internal_command.opcode = FC27 opcode = fc1c
06-18 09:06:15.853 D/[email protected](7282): event_cb_ called
06-18 09:06:15.853 W/bt_hci (7282): filter_incoming_event command complete event with no matching command (opcode: 0xfc1c).
06-18 09:06:15.853 D/[email protected](7282): internal_command_event_match internal_command.opcode = FC27 opcode = fc1e
06-18 09:06:15.853 D/[email protected](7282): event_cb_ called
06-18 09:06:15.853 W/bt_hci (7282): filter_incoming_event command complete event with no matching command (opcode: 0xfc1e).
06-18 09:06:15.853 D/[email protected](7282): internal_command_event_match internal_command.opcode = FC27 opcode = fc27
06-18 09:06:15.853 I/bt_osi_thread(7282): run_thread: thread id 7332, thread name module_wrapper started
06-18 09:06:15.853 D/[email protected](7282): internal_command.bc called
internal_command.opcode doesn't match to the opcode received from bt controller. All events related to sco configuration will be handled by HCI. But HCI doesn't know anything about these commands and events (filter_incoming_event command complete event with no matching command in the log). Actually FC27 is HCI_VSC_WRITE_SLEEP_MODE. Seems that someone else sends this opcode to controller. I think that this can happens only after firmware configuration. We can try to postpone call of the initialize_complete_cb_ until sco configuration finish.
z3DD3r said:
This is very strange. Look at my logcat (LOS wit BT fix):
internal_command.opcode doesn't match to the opcode received from bt controller. All events related to sco configuration will be handled by HCI. But HCI doesn't know anything about these commands and events (filter_incoming_event command complete event with no matching command in the log). Actually FC27 is HCI_VSC_WRITE_SLEEP_MODE. Seems that someone else sends this opcode to controller. I think that this can happens only after firmware configuration. We can try to postpone call of the initialize_complete_cb_ until sco configuration finish.
Click to expand...
Click to collapse
Its probably because you sent the VSCs directly from libbt-vendor, rather than sending an opcode command from VendorInterface, which then sends VSCs, and thus the VendorInterface considers the last internal opcode(BT_VND_OP_LPM_SET_MODE in this case) saved, as the next opcode commands which are being received.
If these logs bug you so much, just edit small part of the bt_vendor_brcm.c and include named by you opcode command which points to the hw_config_continue method, then call it from the VendorInterface.
If you do this then you should partially revert your commit, and set the firmware configuration as it was before, but then again it doesn't matter where the I2S/PCM interface is configured, what matters most is that it is configured.
Sashko98 said:
Its probably because you sent the VSCs directly from libbt-vendor, rather than sending an opcode command from VendorInterface, which then sends VSCs, and thus the VendorInterface considers the last internal opcode(BT_VND_OP_LPM_SET_MODE in this case) saved, as the next opcode commands which are being received.
If these logs bug you so much, just edit small part of the bt_vendor_brcm.c and include named by you opcode command which points to the hw_config_continue method, then call it from the VendorInterface.
If you do this then you should partially revert your commit, and set the firmware configuration as it was before, but then again it doesn't matter where the I2S/PCM interface is configured, what matters most is that it is configured.
Click to expand...
Click to collapse
Seems that we a talking about different things. It really doesn't matter where the I2S/PCM interface is configured. It matters when!
Good news!
I've managed to improve initial solution!
Commit:
78d62ad58da101371822cee107f7759841d2744b
Changes:
No more memory leaks.
No more uncontrolled commands to bt chip. Each sent command receives callback and handles it appropriately.
Ability to configure codec configuration through the vnd config. We can use only i2spcm or wbs+i2spcm.
@razorloves, what do you think about it?
I can share a test build if anyone is interested.
z3DD3r said:
Seems that we a talking about different things. It really doesn't matter where the I2S/PCM interface is configured. It matters when!
Good news!
I've managed to improve initial solution!
Commit:
78d62ad58da101371822cee107f7759841d2744b
Changes:
No more memory leaks.
No more uncontrolled commands to bt chip. Each sent command receives callback and handles it appropriately.
Ability to configure codec configuration through the vnd config. We can use only i2spcm or wbs+i2spcm.
@razorloves, what do you think about it?
I can share a test build if anyone is interested.
Click to expand...
Click to collapse
Thank you very much Man @z3DD3r
You Rock :fingers-crossed: :highfive:
z3DD3r said:
Seems that we a talking about different things. It really doesn't matter where the I2S/PCM interface is configured. It matters when!
Good news!
I've managed to improve initial solution!
Commit:
78d62ad58da101371822cee107f7759841d2744b
Changes:
No more memory leaks.
No more uncontrolled commands to bt chip. Each sent command receives callback and handles it appropriately.
Ability to configure codec configuration through the vnd config. We can use only i2spcm or wbs+i2spcm.
@razorloves, what do you think about it?
I can share a test build if anyone is interested.
Click to expand...
Click to collapse
I will try to adapt this to the LG g4 and if that works I will kiss your feet , really .. It tried since months to get that working (we have the same chipset) and tested almost everything I could think of .. But you're way ahead of me.. Thanks for taking the time to explain everything and ofc for the fix
Sent from my OnePlus 6T using XDA Labs
Hi @steadfasterX,
This should work for all devices with broadcom bluetooth chip. At least i don't see any reasons not to work... Just get the latest code of the libbt and configure your vnd config.
I think i should rebase libbt to have only one commit with actual description...
---------- Post added at 08:17 PM ---------- Previous post was at 08:17 PM ----------
Hi @steadfasterX,
This should work for all devices with broadcom bluetooth chip. At least i don't see any reasons not to work... Just get the latest code of the libbt and configure your vnd config.
I think i should rebase libbt to have only one commit with actual description...
z3DD3r said:
Hi @steadfasterX,
This should work for all devices with broadcom bluetooth chip. At least i don't see any reasons not to work... Just get the latest code of the libbt and configure your vnd config.
I think i should rebase libbt to have only one commit with actual description...
---------- Post added at 08:17 PM ---------- Previous post was at 08:17 PM ----------
Hi @steadfasterX,
This should work for all devices with broadcom bluetooth chip. At least i don't see any reasons not to work... Just get the latest code of the libbt and configure your vnd config.
I think i should rebase libbt to have only one commit with actual description...
Click to expand...
Click to collapse
Yea I strongly believe it will work especially as we have the exact same chip model.
Would be nice if you rebase but if not then not .. I can test it tomorrow first so ..
Thanks again you have no idea how long the ppl are waiting for such a fix..
Sent from my OnePlus 6T using XDA Labs
@steadfasterX, @razorloves
Rebased:
broadcom libbt
hammerhead device tree
z3DD3r said:
@steadfasterX, @razorloves
Rebased:
broadcom libbt
hammerhead device tree
Click to expand...
Click to collapse
you are incredible @z3DD3r , @Sashko98 .. it really works.. I mean.. over 1 year no one was able to solve that f*** ! You're the saviour .. :highfive:
where the hell is your f*** donation addr @z3DD3r ??? :laugh: I am serious about that q
I recognized one little thing: one letter is not coming through in both directions: Z (german spoken like "zwei") or the C like in "niCe" or "intelligenCe". Its like it gets lost. I have tested with WBS active atm and will do some further tests with maybe clock rate etc. Just wanted to let you know. its still an awesome thing and when you speak out the character very loud it comes through btw.
UPDATE:
ok with or without preferred WBS makes no diff on that lost char issue
UPDATE2:
Log with WBS pref to FALSE (issue still there): https://paste.omnirom.org/view/28af9d55
(stopping audio server, starting it, incoming call, accept call, while talking log is silent)
.. and to clarify its hard to track that "lost char" issue. I am testing with 2 headsets, 1 connected to my main phone (OP6T) and the other to my G4. I mute always one of the both and then talking the little delay in transmitting the voice allows to hear that issue when you know it. so the impact of that here is not big I think but if you have any idea what to try let me know.
.-
z3DD3r said:
@steadfasterX, @razorloves
Rebased:
broadcom libbt
hammerhead device tree
Click to expand...
Click to collapse
This is unnecessary if you want to send HCI_VSC_ENABLE_WBS just route through it. We set the codecs manually anyway.
Code:
#if (BTHW_FW_EXTENDED_CONFIGURATION_ONLY_I2SPCM_CONFIG == FALSE)
hw_config_extended_set_SCO_codec(BTHW_FW_EXTENDED_CONFIGURATION_SCO_CODEC);
#else
hw_config_extended_sco_i2spcm_config(BTHW_FW_EXTENDED_CONFIGURATION_SCO_CODEC);
#endif // (BTHW_FW_EXTENDED_CONFIGURATION_ONLY_I2SPCM_CONFIG)
This could be re-worked
Code:
#if (BTHW_FW_EXTENDED_CONFIGURATION == FALSE)
static void hw_config_extended_start(void)
{
if (bt_vendor_cbacks)
{
bt_vendor_cbacks->fwcfg_cb(BT_VND_OP_RESULT_SUCCESS);
}
}
#else
static void hw_config_extended_finish(uint8_t result)
..........................
into
Code:
case HW_CFG_SET_BD_ADDR:
ALOGI("vendor lib fwcfg completed");
bt_vendor_cbacks->dealloc(p_buf);
#if (BTHW_FW_EXTENDED_CONFIGURATION == TRUE)
hw_config_extended_start();
#else
bt_vendor_cbacks->fwcfg_cb(BT_VND_OP_RESULT_SUCCESS);
#endif
Also since you figured out the callbacks, consider using your idea on the existing methods. No need for all this re-definitions.
The changes in the device tree are unnecessary
BTM_WBS_INCLUDED was removed since Oreo
BTIF_HF_WBS_PREFERRED was removed later on on Pie
steadfasterX said:
ok with or without preferred WBS makes no diff on that lost char issue
UPDATE2:
Log with WBS pref to FALSE (issue still there): https://paste.omnirom.org/view/28af9d55
(stopping audio server, starting it, incoming call, accept call, while talking log is silent)
.. and to clarify its hard to track that "lost char" issue. I am testing with 2 headsets, 1 connected to my main phone (OP6T) and the other to my G4. I mute always one of the both and then talking the little delay in transmitting the voice allows to hear that issue when you know it. so the impact of that here is not big I think but if you have any idea what to try let me know.
Click to expand...
Click to collapse
Try setting the BTHW_FW_EXTENDED_CONFIGURATION_SCO_CODEC as SCO_CODEC_MSBC, if that doesn't work maybe try this 540b42c
Sashko98 said:
Try setting the BTHW_FW_EXTENDED_CONFIGURATION_SCO_CODEC as SCO_CODEC_MSBC
Click to expand...
Click to collapse
thx dude..
already tried that - no change
I also tried setting the SCO rate to force 8K - no change
I will test that commit asap
@Sashko98 ok I tried that commit and this resulted in outgoing = distorted sound, incoming = silence
log: https://paste.omnirom.org/view/c7134f75
.-
steadfasterX said:
thx dude..
already tried that - no change
I also tried setting the SCO rate to force 8K - no change
I will test that commit asap
@Sashko98 ok I tried that commit and this resulted in outgoing = distorted sound, incoming = silence
log: https://paste.omnirom.org/view/c7134f75
Click to expand...
Click to collapse
Send your local vnd config just in case, perhaps there is something in there which effects everything. Other possibility is the mixer_paths or the audio_platform_info.
I see that you get good logs from the ACDB loader. if Nougat or stock rom didn't have such issue establish sco connection and look for line similar to this
Code:
D ACDB-LOADER: ACDB -> send_voice_cal, acdb_rx = 22, acdb_tx = 21,
acdb_rx = SND_DEVICE_OUT_BT_SCO <acdb_id>
acdb_tx = SND_DEVICE_IN_BT_SCO_MIC <acdb_id>
Perhaps something in the acdb mapping has changed. Check if on Nougat/stock rom different acdbs are being used for receiving and transmitting, and if by any change different acdbs are used, map them via the audio_platform_info

Categories

Resources