[PATCH 2/2] Add custom flow control settings for Telit HE910, UE910, UL865

Daniele Palmas dnlplm at gmail.com
Thu Mar 12 02:15:18 PDT 2015


Hi Aleksander,

2015-03-12 10:00 GMT+01:00 Aleksander Morgado <aleksander at aleksander.es>:
> On Thu, Mar 12, 2015 at 9:15 AM, Daniele Palmas <dnlplm at gmail.com> wrote:
>> Telit HE910, UE910 and UL865 do not support XON/XOFF; defaulting
>> to RTS/CTS
>> ---
>>  plugins/telit/mm-broadband-modem-telit.c | 40 ++++++++++++++++++++++++++++++++
>>  1 file changed, 40 insertions(+)
>>
>> diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c
>> index 5e1dbff..d7ad9f2 100644
>> --- a/plugins/telit/mm-broadband-modem-telit.c
>> +++ b/plugins/telit/mm-broadband-modem-telit.c
>> @@ -175,6 +175,44 @@ load_access_technologies (MMIfaceModem *self,
>>  }
>>
>>  /*****************************************************************************/
>> +/* Flow control (Modem interface) */
>> +
>> +static gboolean
>> +setup_flow_control_finish (MMIfaceModem *self,
>> +                           GAsyncResult *res,
>> +                           GError **error)
>> +{
>> +    /* Completely ignore errors */
>> +    return TRUE;
>
> When you call mm_base_at_command() with a valid callback method you
> also need to always call mm_base_modem_at_command_finish(), even if
> you don't want its output. You can just therefore do:
>
>   /* Completely ignore errors */
>   mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL);
>   return TRUE;
>
> Otherwise, if you just want to send the AT command and don't even wait
> for it to finish, you can do what the generic setup_flow_control()
> method does in MMBroadbandModem, which is calling
> mm_base_modem_at_command() with NULL callback but then setup a
> GSimpleAsyncResult to be completed in an idle, see:
> http://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/mm-broadband-modem.c#n3011
>
>

Thanks for the review, I will come back with a revision 2 of the patch.

Regards,
Daniele


More information about the ModemManager-devel mailing list