gemian / gemian

24 stars 1 forks source link

Calls-in fails with v4 #17

Open adamboardman opened 3 years ago

dnapla commented 3 years ago

Debug files from rev3 kernel (incoming calls work) rev3_ofono.txt Debug files from rev4 kernel (incoming calls do not work) rev4_ofono.txt

In rev 4 - (near top) a number of these failures are noted (not in rev 3)

May 13 14:40:48 cosmocom kernel: [ 5.814328] (6)[1010:ofonod]binder: 1010:1010 transaction failed 29189/-22, size 32-0 line 3041 May 13 14:40:48 cosmocom kernel: [ 5.814970] (6)[1010:ofonod]binder: 1010:1010 transaction failed 29189/-22, size 32-0 line 3041 ..... May 13 14:41:00 cosmocom kernel: [ 18.006175] (4)[1010:ofonod]binder: 1010:1010 transaction failed 29189/-22, size 32-0 line 3041 May 13 14:41:00 cosmocom kernel: [ 18.006577] (4)[1010:ofonod]binder: 1010:1010 transaction failed 29189/-22, size 32-0 line 3041

dnapla commented 3 years ago

Debug files from rev4 (patched + disabled bluetooth) rev4_ofono_2.txt

No incoming calls. Since move to LXC-Android - has this changed the routing for the modems? Does it look like this (from Sailfish)? oFono (ril driver) <> libgrilio <> ofono-ril-binder-plugin <> libgbinder-radio <> libgbinder <> Android BSP HAL: android.hardware.radio

dnapla commented 3 years ago

cosmopda dbus-daemon[1841]: [session uid=100000 pid=1841] Activating service name='org.freedesktop.Telepathy.Client.TelephonyServiceIndicator' requested by ':1.25' (uid=100000 pid=2275 comm="/usr/lib/telepathy/mission-control-5 " label="u:r:kernel:s0") cosmopda dbus-daemon[1841]: [session uid=100000 pid=1841] Successfully activated service 'org.freedesktop.Telepathy.Client.TelephonyServiceIndicator'

The above is in rev3 - no such call in rev4.... important?

These appear in repowerd when incoming call.... rev3 cosmopda repowerd[1144]: OfonoVoiceCallService: dbus_CallAdded(/ril_0/voicecall01,incoming) cosmopda repowerd[1144]: DefaultStateMachine[1]: handle_update_call_state cosmopda repowerd[1144]: OfonoVoiceCallService: dbus_CallStateChanged(/ril_0/voicecall01,disconnected) cosmopda repowerd[1144]: DefaultStateMachine[1]: handle_update_call_state cosmopda repowerd[1144]: OfonoVoiceCallService: dbus_CallRemoved(/ril_0/voicecall01) cosmopda repowerd[1144]: DefaultStateMachine[1]: handle_update_call_state In rev4 - nothing like this

dnapla commented 3 years ago

rev3 - enhanced ofono debug ofonod[1176]: 2021-05-16 21:07:44 [grilio-binder] slot1 IRadioIndication 2 callStateChanged ofonod[1176]: 2021-05-16 21:07:44 slot1> RESPONSE_CALL_STATE_CHANGED ofonod[1176]: 2021-05-16 21:07:44 slot1> 0000: 04 00 00 00 e9 03 00 00 ........ ofonod[1176]: 2021-05-16 21:07:44ofonod[1176]: drivers/ril/ril_voicecall.c:ril_voicecall_parse_clcc() [id=1,status=4,type=1,number=07xxxyyyyyy,name=] ofonod[1176]: ofonod[1176]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall event, status: incoming (4), id: 1, number: 07xxxyyyyyy called_number: , called_name ofonod[1176]: ofonod[1176]: src/voicecall.c:ofono_voicecall_notify() Did not find a call with id: 1 org.freedesktop.Telepathy.ConnectionManager.ofono[1902]: new call "/ril_0/voicecall01" QMap(("Emergency", QVariant(bool, false))("LineIdentification", QVariant(QString, "07xxxyyyyyy"))("Multiparty", QVariant(bool, false))("Name", QVariant(QString, ""))("RemoteHeld", QVariant(bool, false))("RemoteMultiparty", QVariant(bool, false))("State", QVariant(QString, "incoming"))) ofonod[1176]: drivers/ril/ril_voicecall.c:ril_voicecall_parse_clcc() [id=1,status=4,type=1,number=07xxxyyyyyy,name=]

rev4 - enhanced ofono debug ofonod[964]: 2021-05-16 21:41:56 [grilio-binder] slot1 IRadioIndication 2 callStateChanged ofonod[964]: 2021-05-16 21:41:56 slot1> RESPONSE_CALL_STATE_CHANGED ofonod[964]: 2021-05-16 21:41:56 slot1> 0000: 04 00 00 00 e9 03 00 00 voicecall.c in ofonod is never triggered...... it has seen the initial part of call the same!

dnapla commented 3 years ago

This relates to not receiving incoming texts (as reports by CAM1965 from OESF - but calls working with old versino of droid-hybris. https://www.oesf.org/forum/index.php?topic=36554.0

This commit appears to show NotKit found issue in Halium / Hybris-Patches https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/commit/16efbf31cb3d333add831107ba3f65d857572128

Can confirm replacing libmtk-ril.so with the version from NotKit fixes incoming text messages for this version.

dnapla commented 3 years ago

Ok. From v4 install - and updating codi-app and lxc-android ok... Replacing the libmtk-ril.so from link to NotKit version above appears to solve the dial in problem / receiving texts.

I will flatten my Cosmo again, install V4 and only try to swap this file out (not the rest of other work with old droid-hybris files). @adamboardman - we will need to understand the version of libmtk-ril.so currently included in build... i.e. I'm not sure if this new version will break something that was being patched!

Confirm - new V4 install. Replace only libmtk-ril.so from above commit. (No other updates) Calls in/out - SMS in/out - all appear to work ok

adamboardman commented 3 years ago

NotKit provided both of the fixes needed in mtk-ril, unfortunately I only knew of one of them. I'll put in the dual-patched file just now, but for future reference this might be an alternative work around, also suggested by Nikita: https://github.com/phhusson/vendor_interfaces/commit/f0602f56e3603d92f9f221cf5bf27e1b370f30be Thanks for all your work tracking this down.

dnapla commented 3 years ago

The version of the patched mtk-ril file uploaded to lxc-android does allow for calls in/out - however SMS IN does not appear to work (SMS OUT ok). It does seem to have the lower power consumption fix (was 3% on the file I linked to above from the hybris-patches). So there is still some issue with text messages between this version and the one above.

wretanhewe commented 3 years ago

Just to give some more data/info, I swapped this file on my Cosmo, running V4, and both calls and texts in and out are working as expected. The CODI display lights up when calls come in, though doesn't when texts come in (this may be normal, and for me that's not any problem.)

sturton commented 2 years ago

If you want someone with a spare Cosmo to test code fixes - I can use mine.

I installed the published Gemian onto Cosmo and then swapped it for a Gemini for Sailfish because of system instability.