sonyxperiadev / device-sony-loire

17 stars 40 forks source link

sony: loire: Fix bluetooth pairing issues #97

Closed humberos closed 7 years ago

humberos commented 7 years ago

Bring back PROCFS and disable IOCTL. This change will get fixed BT pairing and [re]connections which is currently broken.

Signed-off-by: Humberto Borba humberos@gmail.com Change-Id: I1602ca24e016c7e1f9cb3e8ffb52dbee055d0782

humberos commented 7 years ago

Ping @Diewi This is fixing my problems with BT pairing related.

@jerpelea nvm about kernel revertions. Actually the kernel patches are still necessary for coherence between BT and FM (ldisc).

oshmoun commented 7 years ago

didn't test pairing, but can confirm that this doesn't break how bt+fm currently work

humberos commented 7 years ago

BT pariring issues:

  1. I lost BT pairing from my watch but my phone is still recognizing my watch as a paired device. No communication, no data transferring,... nothing. Same issue happens in my car's BT system (Blue&Me).

  2. If I am move so far away from my phone then I will lost the BT pairing but it can't reconnect anymore even if I have it in my hands again. The issue happens on my phone and my car.

Using IOCTL I need to restart bluetooth from my phone to fix the pairing process.

So this patch fixes the [re]pairing completely.

humberos commented 7 years ago

@Diewi If you agree then we will need to do some change in kernel since there is no reason to patch serial once procfs will manage BT directly from bluesleep driver.

rcstar6696 commented 7 years ago

does it break fm ?

humberos commented 7 years ago

@rcstar6696 I only have tested it on suzu. Please could you check shinano ? At first patch set I got FM broken due to force assertion notification from libbt which is fixed now. The issue was happening when we get BT on then FM on then BT off.... Now it seems ok.

rcstar6696 commented 7 years ago

ok will test it this night :) i only need the kernel change and the device change or something else ? did you test deep sleep on suzu with those changes

humberos commented 7 years ago

@rcstar6696 Yeah, deep sleep is ok!

humberos commented 7 years ago

This patch requires only this kernel PR:

https://github.com/sonyxperiadev/kernel/pull/1195

rcstar6696 commented 7 years ago

So i tested the commit FM works BT works and both together but if you turn on BT while listening FM radio both gets broken. After try switching ON BT, FM stops and reenable fm shows not available and BT does not turn on at all. Only reboot helps to get both back to work. Same happens when you disable BT while listening FM The interessting thing is that it works if you Start FM without BT and with BT on only switching bt while FM is used both dies But not sure if its related to this patch or it was present before But Paring works again :) will test with some other devices later thx

oshmoun commented 7 years ago

Ok thanks @rcstar6696 @humberos Maybe turning on bt while fm is on also causes a similar assertion error as when turning off bt with fm on?

rcstar6696 commented 7 years ago

For me it does not work in both ways FM on turn BT off Or FM on BT turn off

humberos commented 7 years ago

So I think that we have a diff for BT between platforms. https://plus.google.com/+HumbertoBorba/posts/9i5AhdDgUdS

oshmoun commented 7 years ago

facing same issue as rcstar6696, but on kugo

humberos commented 7 years ago

Thank you @oshmoun and @rcstar6696 Seems that I found the diff..... So I am leaving this change and also kernel one. Since all development was made based on Shinano then we need to use the same BT config on other platforms.

https://github.com/sonyxperiadev/device-sony-loire/pull/98