:: Re: [maemo-leste] Hack for ofono go…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Merlijn Wajer
Päiväys:  
Vastaanottaja: Tony Lindgren
Kopio: Pavel Machek, Sebastian Reichel, maemo-leste
Aihe: Re: [maemo-leste] Hack for ofono gobi qmi interface for droid4
Hi,

Works for me -- inline

On 06/04/2020 00:21, Tony Lindgren wrote:
> Hi,
>
> Adding also maemo-leste@??? to Cc.
>
> * Tony Lindgren <tony@???> [200401 07:50]:
>> * Merlijn Wajer <merlijn@???> [200401 09:54]:
>>> I think they probably use these patches (patch 5 apparently adds voice
>>> calls to ofono with qmi):
>>>
>>> https://gitlab.com/postmarketOS/pmaports/-/tree/master/temp/ofono
>>
>> OK thanks for the link! I gave those patches a try with my earlier droid4
>> qmi detection patch and get the following error trying to make a voicecall:
>
> Anyways, so I did some more experiments with qmimodem, and looks
> like we cannot use qmi for voice and sms. At least for incoming
> notifications qmimodem don't seem to work for droid4. This is
> probably because the motorola firmware may have some hardcoded
> hacks that prevent notifications from being rerouted.
>
> For example, drivers/qmimodem/sms.c function get_routes_cb()
> attempts to reroute in coming sms notifications to ofono, but
> looks like the updated NVRAM values are just ignored by the
> motorola firmware.
>
> But we can still use drivers/qmimodem for a bunch of stuff like data
> and network registration and sim stuff. So I combined my earlier qmi
> changes and Pavel's earlier motorolamodem changes into a new branch
> for testing at [0][1] :)


I had some trouble building -- a change in configure.ac is missing a
statement to define MOTOROLAMODEM [1].

Otherwise, seems to work. It registered to the network with the test
Lycamobile SIM card I bought last week:

# mdbus2 -s org.ofono /motmdm_0 org.ofono.NetworkRegistration.GetProperties
({'Status': <'roaming'>, 'Mode': <'auto'>, 'LocationAreaCode': <uint16
0>, 'CellId': <uint32 107[stripped by Merlijn]>, 'MobileCountryCode':
<'204'>, 'MobileNetworkCode': <'08'>, 'Name': <'Lycamobile
(Lycamobile)'>, 'Strength': <byte 0x28>},)

Sim manager works:

# mdbus2 -s org.ofono /motmdm_0 org.ofono.SimManager.GetProperties
({'Present': <true>, 'CardIdentifier': <'[stripped by merlijn]'>,
'SubscriberIdentity': <'[stripped by merlijn]'>, 'ServiceProviderName':
<'Lycamobile'>, 'FixedDialing': <false>, 'BarredDialing': <false>,
'MobileCountryCode': <'204'>, 'MobileNetworkCode': <'09'>,
'SubscriberNumbers': <@as []>, 'LockedPins': <@as []>, 'ServiceNumbers':
<{'VOICEMAIL': '1233', 'OPWAARDEREN': '1244', 'KLANTENSERVICE': '1200',
'BELTEGOED ZIEN': '*101#', 'BELTEGOED HOREN': '1244', 'BELTEGOED SMS':
'1244', 'EIGEN NUMMER ZIEN': '*102#'}>, 'PreferredLanguages': <['nl',
'en', 'fr', 'es', 'de', 'pl', 'sv', 'no', 'da', 'it']>, 'PinRequired':
<'none'>, 'Retries': <{'pin': byte 0x03, 'pin2': 0x03, 'puk': 0x0a,
'puk2': 0x0a}>, 'CardSlotCount': <uint32 1>, 'ActiveCardSlot': <uint32 1>},)

And making a call works:

# mdbus2 -s org.ofono /motmdm_0 org.ofono.VoiceCallManager.Dial
"+316[stripped by merlijn]" disabled
('/motmdm_0/voicecall01',)


And it is visible on the interface in dbus, too:

# mdbus2 -s org.ofono /motmdm_0 org.ofono.VoiceCallManager.GetCalls
([('/motmdm_0/voicecall01', {'State': <'dialing'>, 'LineIdentification':
<'+316[stripped by merlijn]'>, 'Name': <''>, 'Multiparty': <false>,
'RemoteHeld': <false>, 'RemoteMultiparty': <false>, 'Emergency':
<false>})],)

So that's all pretty awesome.

I have a few more things to debug in connui-cellular, but I will try to
push that to beowulf-devel ASAP, and then also have this ofono be
available for the droid 4 in beowulf-devel, so that it'll be easier to
play with.

Cheers,
Merlijn



[1] AC_ARG_ENABLE(motorolamodem, AC_HELP_STRING([--disable-motorolamodem],
                               [disable Motorola device modem]),
                                       [enable_motmodem=${enableval}])


AM_CONDITIONAL(MOTOROLAMODEM, test "${enable_motorolamodem}" != "no")