* [PATCH] Add vendor quirk for SIMCOM
2013-02-28 15:43 [PATCH] Add GPRS, mux, volume control support in SIMCOM sim900 modem module r.r.zaripov
@ 2013-02-28 15:43 ` r.r.zaripov
2013-02-28 16:44 ` Denis Kenzior
0 siblings, 1 reply; 7+ messages in thread
From: r.r.zaripov @ 2013-02-28 15:43 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
From: Renat Zaripov <r.r.zaripov@gmail.com>
---
drivers/atmodem/gprs-context.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index 3694c27..c5a0ae7 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
return;
}
- sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+ if (gcd->vendor == OFONO_VENDOR_SIMCOM)
+ memcpy(buf, "ATD*99#", 7);
+ else
+ sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+
if (g_at_chat_send(gcd->chat, buf, none_prefix,
at_cgdata_cb, gc, NULL) > 0)
return;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add vendor quirk for SIMCOM
2013-02-28 15:43 ` [PATCH] Add vendor quirk for SIMCOM r.r.zaripov
@ 2013-02-28 16:44 ` Denis Kenzior
0 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2013-02-28 16:44 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 975 bytes --]
Hi Renat,
On 02/28/2013 09:43 AM, r.r.zaripov(a)gmail.com wrote:
> From: Renat Zaripov<r.r.zaripov@gmail.com>
>
> ---
> drivers/atmodem/gprs-context.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
> index 3694c27..c5a0ae7 100644
> --- a/drivers/atmodem/gprs-context.c
> +++ b/drivers/atmodem/gprs-context.c
> @@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
> return;
> }
>
> - sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> + if (gcd->vendor == OFONO_VENDOR_SIMCOM)
> + memcpy(buf, "ATD*99#", 7);
At lease use strcpy, since you're not copying the '\0' here actually.
> + else
> + sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> +
> if (g_at_chat_send(gcd->chat, buf, none_prefix,
> at_cgdata_cb, gc, NULL)> 0)
> return;
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Add vendor quirk for SIMCOM
@ 2013-03-12 14:40 r.r.zaripov
2013-03-12 15:18 ` Viallard Anthony
2013-03-12 17:59 ` Denis Kenzior
0 siblings, 2 replies; 7+ messages in thread
From: r.r.zaripov @ 2013-03-12 14:40 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
From: Renat Zaripov <r.r.zaripov@gmail.com>
---
drivers/atmodem/gprs-context.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index 3694c27..0fb63c4 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
return;
}
- sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+ if (gcd->vendor == OFONO_VENDOR_SIMCOM)
+ strcpy(buf, "ATD*99#\0");
+ else
+ sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
+
if (g_at_chat_send(gcd->chat, buf, none_prefix,
at_cgdata_cb, gc, NULL) > 0)
return;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add vendor quirk for SIMCOM
2013-03-12 14:40 [PATCH] Add vendor quirk for SIMCOM r.r.zaripov
@ 2013-03-12 15:18 ` Viallard Anthony
2013-03-12 18:02 ` Denis Kenzior
2013-03-12 17:59 ` Denis Kenzior
1 sibling, 1 reply; 7+ messages in thread
From: Viallard Anthony @ 2013-03-12 15:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]
On 12. 03. 13 15:40, r.r.zaripov(a)gmail.com wrote:
> From: Renat Zaripov<r.r.zaripov@gmail.com>
>
> ---
> drivers/atmodem/gprs-context.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
> index 3694c27..0fb63c4 100644
> --- a/drivers/atmodem/gprs-context.c
> +++ b/drivers/atmodem/gprs-context.c
> @@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
> return;
> }
>
> - sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> + if (gcd->vendor == OFONO_VENDOR_SIMCOM)
> + strcpy(buf, "ATD*99#\0");
> + else
> + sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> +
> if (g_at_chat_send(gcd->chat, buf, none_prefix,
> at_cgdata_cb, gc, NULL)> 0)
> return;
Hello Renat,
I watched the AT commands set for my SIM5216 and I found AT+CGDATA.
There isn't this command for sim900 ?
And, I saw "ATD*99#" cryptic command was already used in
gatchat/gsmdial.c if bluetooth is enabled.
Maybe, it's a specific command for your purpose ? I mean, do you need
this command to "establish communication between the TE and the network
using one or more Packet Domain PDP types." ? If it's the case, the
quirk is only for your device and so, it's not a vendor quirk.
Otherwise, why this \0 after ATD*99# ? :)
Regards,
Anthony.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add vendor quirk for SIMCOM
2013-03-12 14:40 [PATCH] Add vendor quirk for SIMCOM r.r.zaripov
2013-03-12 15:18 ` Viallard Anthony
@ 2013-03-12 17:59 ` Denis Kenzior
1 sibling, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2013-03-12 17:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
Hi Renat,
On 03/12/2013 09:40 AM, r.r.zaripov(a)gmail.com wrote:
> From: Renat Zaripov<r.r.zaripov@gmail.com>
>
> ---
> drivers/atmodem/gprs-context.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
> index 3694c27..0fb63c4 100644
> --- a/drivers/atmodem/gprs-context.c
> +++ b/drivers/atmodem/gprs-context.c
> @@ -208,7 +208,11 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
> return;
> }
>
> - sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> + if (gcd->vendor == OFONO_VENDOR_SIMCOM)
> + strcpy(buf, "ATD*99#\0");
The embedded null character is not necessary, strcpy will take care of
that for you.
> + else
> + sprintf(buf, "AT+CGDATA=\"PPP\",%u", gcd->active_context);
> +
> if (g_at_chat_send(gcd->chat, buf, none_prefix,
> at_cgdata_cb, gc, NULL)> 0)
> return;
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add vendor quirk for SIMCOM
2013-03-12 15:18 ` Viallard Anthony
@ 2013-03-12 18:02 ` Denis Kenzior
2013-03-12 18:51 ` Renat Zaripov
0 siblings, 1 reply; 7+ messages in thread
From: Denis Kenzior @ 2013-03-12 18:02 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
Hi Anthony,
> And, I saw "ATD*99#" cryptic command was already used in
> gatchat/gsmdial.c if bluetooth is enabled.
>
This is a legacy operation for entering into data mode. Refer to 27.007
Section 10.2.1.1. It can be used as a shortcut for CGDCONT/CGDATA, and
it seems that some modems do not implement CGDATA at all.
> Otherwise, why this \0 after ATD*99# ? :)
>
Good spot ;)
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add vendor quirk for SIMCOM
2013-03-12 18:02 ` Denis Kenzior
@ 2013-03-12 18:51 ` Renat Zaripov
0 siblings, 0 replies; 7+ messages in thread
From: Renat Zaripov @ 2013-03-12 18:51 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
Hello Anthony, Denis,
2013/3/12 Denis Kenzior <denkenz@gmail.com>
> Hi Anthony,
>
> And, I saw "ATD*99#" cryptic command was already used in
>> gatchat/gsmdial.c if bluetooth is enabled.
>>
>>
> This is a legacy operation for entering into data mode. Refer to 27.007
> Section 10.2.1.1. It can be used as a shortcut for CGDCONT/CGDATA, and it
> seems that some modems do not implement CGDATA at all.
>
>
Yes, sim900 supports AT+CGDATA command, but unfortunately I can't make it
work. I get no error messages, but the connection is not being established.
I wrote about this issue to SIMCOM, but with my local distributor this is
long story.
> Otherwise, why this \0 after ATD*99# ? :)
>>
>>
> Good spot ;)
>
>
If I get answer from SIMCOM about AT+CGDATA and make it work properly, I
promise that never send again patch with this funny mistake;)
Anyway, Denis wrote some time ago, we can implement quirks for separating
various models of modem modules of one manufacturer. Like this:
OFONO_VENDOR_SIMCOM_SIM900
OFONO_VENDOR_SIMCOM_SIM5216E
> Regards,
> -Denis
>
> ______________________________**_________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/**listinfo/ofono<http://lists.ofono.org/listinfo/ofono>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2349 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-12 18:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 14:40 [PATCH] Add vendor quirk for SIMCOM r.r.zaripov
2013-03-12 15:18 ` Viallard Anthony
2013-03-12 18:02 ` Denis Kenzior
2013-03-12 18:51 ` Renat Zaripov
2013-03-12 17:59 ` Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2013-02-28 15:43 [PATCH] Add GPRS, mux, volume control support in SIMCOM sim900 modem module r.r.zaripov
2013-02-28 15:43 ` [PATCH] Add vendor quirk for SIMCOM r.r.zaripov
2013-02-28 16:44 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.