From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1654534975381732252==" MIME-Version: 1.0 From: Clement Viel Subject: Re: [PATCH 1/3] sim800: adding support for Simcom SIM800 modem Date: Wed, 19 Sep 2018 21:52:05 +0200 Message-ID: <20180919195205.GC3536@turing> In-Reply-To: <2048901537376607@iva4-031ea4da33a1.qloud-c.yandex.net> List-Id: To: ofono@ofono.org --===============1654534975381732252== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2018 at 08:03:27PM +0300, Pi=C4=8Dugins Arsenijs wrote: Hi, I guess I submit it in a hurry and forgot to add the firmware version. BTW, your problem may be related to this. Are you sure your CMUX command is= not returning an error ? Thus preventing ofono from enabling the modem ? I= had this problem and Simcom sent me an updated firmware that supports the = CMUX command. >
Hello!
=C2=A0
> You might want to describe ho= w this is different from sim900 that it
> warrants a fully separate= driver?
=C2=A0
I've tried to apply this patch yesterda= y evening (since I too am
interested in SIM800 integration) and t= ried to apply it, patch 2
doesn't apply on current master for som= e reason. Here's a diff
between current SIM900 and this SIM800:
https://matrix.org/_matri= x/media/v1/download/matrix.org/KqDxbcuYLxrcceUfRorxYgus
=C2= =A0
tl;dr: apart from
=C2=A0
- adding phonebo= ok support (two lines, I don't understand it quite yet)
- the sle= ep() hack
- a comment clarifying a problem with some unknown vers= ion of firmware
- DBG() log calls
- sim900 =3D> sim8= 00 renaming
=C2=A0
it's no different than current SIM90= 0 driver. Unfortunately, that
doesn't solve the problems I'm pers= onally experiencing (hang on
CFUN, for one).
=C2=A0
Cheers!
Arsenijs
=C2=A0
19.09.2018, 19:51, = "Denis Kenzior" <denkenz(a)gmail.com>:

Hi,

On 09/18/2018 03:36 PM, Cl=C3=A9mentViel wrote:

=C2=A0From: clem <vielclement(a)gmail.com>
=C2=A0
=


You might want to describe how this is different from sim900 that = it
warrants a fully separate driver?

If there are only mino= r differences, then this can be handled via UDEV
attributes or queryin= g +CGMM, etc.
=C2=A0

=C2=A0---
=C2=A0=C2=A0=C2=A0M= akefile.am | 4 +
=C2=A0=C2=A0=C2=A0plugins/sim800.c | 424 ++++++++++++= +++++++++++++++++++++++++++++++++++++++++++
=C2=A0=C2=A0=C2=A02 files = changed, 428 insertions(+)
=C2=A0=C2=A0=C2=A0create mode 100644 plugin= s/sim800.c
=C2=A0


<snip>
=C2=A0

=C2=A0+
=C2=A0+static void sim800_post_sim(struct ofono_modem= *modem)
=C2=A0+{
=C2=A0+ struct sim800_data *data =3D ofono_mode= m_get_data(modem);
=C2=A0+ struct ofono_gprs *gprs;
=C2=A0+ struc= t ofono_gprs_context *gc;
=C2=A0+
=C2=A0+ DBG("%p", modem);
= =C2=A0+
=C2=A0+ /* Dirty Hack : give some time to sim800 for multiplex= ing
=C2=A0+ * to be effective and avoid VOICE_DLC to be
=C2=A0+ *= flooded thus leading to a "famine" situation
=C2=A0+ */
=C2=A0+<= br />=C2=A0+ sleep(2);


No sleeps inside plugins. That = blocks the entire daemon and we can't
have that. How does this help yo= u anyway? GAtChat is a queue, so only
1 command is outstanding at a ti= me.
=C2=A0

=C2=A0+ ofono_sms_create(modem, OFONO_VENDOR= _SIMCOM, "atmodem",
=C2=A0+ data->dlcs[SMS_DLC]);
=C2=A0+
=C2=A0+
=C2=A0+ gprs =3D ofono_gprs_create(modem, 0, "atmodem", data-= >dlcs[GPRS_DLC]);
=C2=A0+ if (gprs =3D=3D NULL)
=C2=A0+ return= ;
=C2=A0+
=C2=A0+ gc =3D ofono_gprs_context_create(modem, OFONO_V= ENDOR_SIMCOM,
=C2=A0+ "atmodem", data->dlcs[GPRS_DLC]);
=C2=A0= + if (gc)
=C2=A0+ ofono_gprs_add_context(gprs, gc);
=C2=A0+}
=C2=A0+


Regards,
-Denis
___________________= ____________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.= org/mailman/listinfo/ofono

--===============1654534975381732252==--