<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono">
    <title>gmane.comp.handhelds.ofono</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14718"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14717"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14716"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14715"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14714"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14713"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14712"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14711"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14710"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14709"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14708"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14707"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14706"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14705"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14704"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14703"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14702"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14701"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14700"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14699"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14718">
    <title>oFono upstream test results_20130603</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14718</link>
    <description>&lt;pre&gt;Hello all,

 

Please find the test report of oFono v1.12 commit 53a0fa8.

 

During this testing, we ran 197 functional positive cases. 144 cases passed,
1 failed and 52 are blocked due to missing software/missing hardware/Feature
not supported. No new issue has been found.

 

If you have any comment about this report, contact me please.

 

 

Test Objective

 

As there was only few changes (3) since the previous tests cycle, the aim of
this session was to validate the state of oFono upstream by testing only
major tests of most important features and all tests of features impacted by
last commits (GSM shortcut of Supplementary Services and STK) over all
material we had (according to what feature was supported and by priority
order: PR3, Network Simulator, 3G dongle, phonesim). oFono has been
installed and tested on PR3 running Tizen 2.1 and Ubuntu 12.04 device.

 

 

Test Environment

 

For all Setup:

oFono: v1.12 (updated to commit 53a0fa8)

 

-      Smartphone device Setup:

Image: Tizen Mobile 2.1&lt;/pre&gt;</description>
    <dc:creator>Nicolas Paccou</dc:creator>
    <dc:date>2013-06-03T15:22:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14717">
    <title>Re: [PATCH] common: Fix parsing SS control string</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14717</link>
    <description>&lt;pre&gt;Hi Lucas,

On 05/22/2013 04:28 PM, Lucas De Marchi wrote:

Funny how it is hiding in plain sight and nobody has found it in over 4 
years.  And I think you just got an award for finding the oldest bug :P

Patch has been applied, thanks.


Regards,
-Denis
&lt;/pre&gt;</description>
    <dc:creator>Denis Kenzior</dc:creator>
    <dc:date>2013-05-23T02:42:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14716">
    <title>Re: [PATCH 2/2] gitignore: Ignore file generated by Automake 1.13</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14716</link>
    <description>&lt;pre&gt;Hi Lucas,

On 05/22/2013 06:01 PM, Lucas De Marchi wrote:

Patch has been applied, thanks.

Regards,
-Denis

&lt;/pre&gt;</description>
    <dc:creator>Denis Kenzior</dc:creator>
    <dc:date>2013-05-23T02:39:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14715">
    <title>Re: [PATCH 1/2] stk: Fix sizeof on memcpy</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14715</link>
    <description>&lt;pre&gt;Hi Lucas,

On 05/22/2013 06:01 PM, Lucas De Marchi wrote:

Patch has been applied, thanks.

Regards,
-Denis

_______________________________________________
ofono mailing list
ofono&amp;lt; at &amp;gt;ofono.org
https://lists.ofono.org/mailman/listinfo/ofono
&lt;/pre&gt;</description>
    <dc:creator>Denis Kenzior</dc:creator>
    <dc:date>2013-05-23T02:38:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14714">
    <title>[PATCH 1/2] stk: Fix sizeof on memcpy</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14714</link>
    <description>&lt;pre&gt;src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
  memcpy(&amp;amp;e.cbs_pp_download.page, msg, sizeof(msg));
                                               ^
---
 src/stk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stk.c b/src/stk.c
index 7974751..01c95b5 100644
--- a/src/stk.c
+++ b/src/stk.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -280,7 +280,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void __ofono_cbs_sim_download(struct ofono_stk *stk, const struct cbs *msg)
 
 e.type = STK_ENVELOPE_TYPE_CBS_PP_DOWNLOAD;
 e.src = STK_DEVICE_IDENTITY_TYPE_NETWORK;
-memcpy(&amp;amp;e.cbs_pp_download.page, msg, sizeof(msg));
+memcpy(&amp;amp;e.cbs_pp_download.page, msg, sizeof(*msg));
 
 err = stk_send_envelope(stk, &amp;amp;e, stk_cbs_download_cb,
 ENVELOPE_RETRIES_DEFAULT);
&lt;/pre&gt;</description>
    <dc:creator>Lucas De Marchi</dc:creator>
    <dc:date>2013-05-22T23:01:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14713">
    <title>[PATCH 2/2] gitignore: Ignore file generated by Automake 1.13</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14713</link>
    <description>&lt;pre&gt;Automake &amp;gt;= 1.13 enables parallel-tests option by default which uses a
test-driver script (copied by automake). Ignore this file and the files
generated by this script.
---
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index 91668c7..b9c23a0 100644
--- a/.gitignore
+++ b/.gitignore
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,6 +22,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ltmain.sh
 missing
 stamp-h1
 autom4te.cache
+test-driver
+test-suite.log
 
 ofono.pc
 include/ofono
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +44,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; unit/test-mux
 unit/test-caif
 unit/test-stkutil
 unit/test-cdmasms
+unit/test-*.log
+unit/test-*.trs
 
 tools/huawei-audio
 tools/auto-enable
&lt;/pre&gt;</description>
    <dc:creator>Lucas De Marchi</dc:creator>
    <dc:date>2013-05-22T23:01:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14712">
    <title>Re: [PATCH] common: Fix parsing SS control string</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14712</link>
    <description>&lt;pre&gt;On Wed, May 22, 2013 at 6:28 PM, Lucas De Marchi
&amp;lt;lucas.demarchi-Y3ZbgMPKUGA34EUeqzHoZw&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

this is actually caught later in the function:

for (i = 0; i &amp;lt; strlen(*sc); i++)
        if (!g_ascii_isdigit((*sc)[i]))
                goto out;

But fixing the check would be good.


Lucas De Marchi
&lt;/pre&gt;</description>
    <dc:creator>Lucas De Marchi</dc:creator>
    <dc:date>2013-05-22T22:52:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14711">
    <title>[PATCH] common: Fix parsing SS control string</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14711</link>
    <description>&lt;pre&gt;It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
---
 src/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common.c b/src/common.c
index 94d70dd..17d1d58 100644
--- a/src/common.c
+++ b/src/common.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -554,7 +554,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gboolean parse_ss_control_string(char *str, int *ss_type,
 
 cur = 1;
 
-if (str[1] != '*' &amp;amp;&amp;amp; str[1] != '#' &amp;amp;&amp;amp; str[1] &amp;gt; '9' &amp;amp;&amp;amp; str[1] &amp;lt; '0')
+if (str[1] != '*' &amp;amp;&amp;amp; str[1] != '#' &amp;amp;&amp;amp; (str[1] &amp;gt; '9' || str[1] &amp;lt; '0'))
 goto out;
 
 if (str[0] == '#' &amp;amp;&amp;amp; str[1] == '*')
&lt;/pre&gt;</description>
    <dc:creator>Lucas De Marchi</dc:creator>
    <dc:date>2013-05-22T21:28:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14710">
    <title>Re: Randomly SMS sent passes or fails</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14710</link>
    <description>&lt;pre&gt;Hello,

I think I found a solution about this issue !

If I set the bearer for SMS at "cs-only", it works perfectly.

Therefore, I think there an problem in the firmware of my chip about the 
"cs-prefered" mode.

I will see this with simcom and update my conclusion with their answer.

Regards,
Anthony Viallard.
&lt;/pre&gt;</description>
    <dc:creator>Viallard Anthony</dc:creator>
    <dc:date>2013-05-21T14:20:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14709">
    <title>Re: Problem when disable GPRS context and try to re-enable it</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14709</link>
    <description>&lt;pre&gt;Hi Denis,

On 21. 05. 13 15:24, Denis Kenzior wrote:

AT&amp;amp;C0 fixes the wrong behavior. Thanks !

Regards,
Anthony.
&lt;/pre&gt;</description>
    <dc:creator>Viallard Anthony</dc:creator>
    <dc:date>2013-05-21T14:11:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14708">
    <title>Re: Problem when disable GPRS context and try to re-enable it</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14708</link>
    <description>&lt;pre&gt;Hi Anthony,

On 05/17/2013 05:33 AM, Viallard Anthony wrote:

I think I've seen this before, or something similar.  It may be that 
when the modem hangs up the PPP link it also hangs up the serial port 
(e.g. using a HUP).  GAtChat thinks that the port has been closed and 
things no longer work.

On most devices this behavior can be turned off by sending AT&amp;amp;C0 init 
string.  Try that?


Regards,
-Denis
&lt;/pre&gt;</description>
    <dc:creator>Denis Kenzior</dc:creator>
    <dc:date>2013-05-21T13:24:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14707">
    <title>Re: Telit HE910 : how to get the network interface name</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14707</link>
    <description>&lt;pre&gt;Hi Etienne,

On 05/21/2013 05:05 AM, Etienne Mabille wrote:

The interface name is given by oFono when the context is activated.  See 
the 'Interface' entry in the 'Settings' dictionary of the 
ConnectionContext interface (doc/connman-api.txt)

If the context is deactivated / lost, then the interface is either 
destroyed or ifdown-ed by oFono.


Those are implementation details and are subject to change.


Regards,
-Denis

&lt;/pre&gt;</description>
    <dc:creator>Denis Kenzior</dc:creator>
    <dc:date>2013-05-21T13:17:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14706">
    <title>Telit HE910 : how to get the network interface name</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14706</link>
    <description>&lt;pre&gt;Hi everyone,

I am using ofono and the Telit HE910, configured and running fine.
I am now working on a program thats monitors the connection and initiates
the reconnection when it is lost.

This program uses the network interface name : usually ppp0.
I am looking for a clean way of getting this name for the telit, and not
just hard-code it in case this name changes.

I see that in several modems (hs0 and samsung at least), this is done in
the setup_* function in udevng.c
For these modems, the NetworkInterface field is retrieved from the device.
However, in the telit documentation, it specifies that out of the seven
devices created for the modem (/dev/ttyACM0-6)
only 2 can be used : the data port for ppp connections and the generic port
for AT commands.

Is there another way of retrieving this information ?

I saw that it appears in gatchat/ppp_net.c: in the function ppp_net_new
where it submits the name "ppp%d".
My understanding is that the kernel (or pppd) fills out the number with the
first one available.
&lt;/pre&gt;</description>
    <dc:creator>Etienne Mabille</dc:creator>
    <dc:date>2013-05-21T10:05:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14705">
    <title>oFono upstream test results_20130517</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14705</link>
    <description>&lt;pre&gt;Hello all,

 

Please find the test report of oFono v1.12 commit 1c75edf.

Due to Network Simulator License issue, no report has been sent last month,
I'm sorry for the inconvenience. This problem is now resolved.

 

During this testing, we ran 462 functional positive cases. 372 cases passed,
1 failed and 89 are blocked due to missing software/missing hardware/Feature
not supported. The pass rate is 81% (=) which is equal than previous test
cycle (v1.12 commit 4fcd084). No new issue has been found.

 

If you have any comment about this report, contact me please.

 

 

Test Objective

 

The aim of this test cycle was to validate the state of oFono upstream by
testing all its features over all material we had (according to what feature
was supported and by priority order: Smartphone with real SIM or with
Network Simulator, on Laptop with 3G dongle or with Phonesim). oFono has
been installed and tested on smartphone device running Tizen 2.0 and Ubuntu
12.04 device.

 

 

Test Environment

 

For all Setup:&lt;/pre&gt;</description>
    <dc:creator>Nicolas Paccou</dc:creator>
    <dc:date>2013-05-17T13:52:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14704">
    <title>Problem when disable GPRS context and try to re-enable it</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14704</link>
    <description>&lt;pre&gt;Hello,

I start a new thread about a bad thing I seen. I can't re-enable a 
previously disabled context.

Here the command to reproduce the issue:

---------------------------
dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:false

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true
---------------------------

and bellow, the log:

---------------------------
ofonod[10347]: Modem: &amp;gt; AT+CGDCONT=1,"IP","gprs.swisscom.ch"\r
ofonod[10347]: Modem: &amp;lt; \r\nOK\r\n
ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
ofonod[10347]: Modem: &amp;gt; AT+CGDATA="PPP",1\r
ofonod[10347]: Modem: &amp;lt; \r\nCONNECT 115200\r\n
ofonod[1&lt;/pre&gt;</description>
    <dc:creator>Viallard Anthony</dc:creator>
    <dc:date>2013-05-17T10:33:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14703">
    <title>[RFC 18/22] emulator: Resend +BCS after receive AT+BAC</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14703</link>
    <description>&lt;pre&gt;If the AG receives AT+BAC as a response to an unsolicited +BCS, it
will resend +BCS based on new list of available codecs.
---
 src/emulator.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index a228df4..7f6604a 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -541,6 +541,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void bac_cb(GAtServer *server, GAtServerRequestType type,
 struct ofono_emulator *em = user_data;
 GAtResultIter iter;
 int codec, codecs = 0;
+gboolean bcs = em-&amp;gt;bcs;
 
 em-&amp;gt;bcs = FALSE;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -558,6 +559,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void bac_cb(GAtServer *server, GAtServerRequestType type,
 em-&amp;gt;r_codecs = codecs;
 
 g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
+
+if (bcs)
+em-&amp;gt;audiosetup_source = g_timeout_add_seconds(0,
+setup_codec_connection, em);
+
 break;
 
 default:
&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14702">
    <title>[RFC 22/22] emulator: Implement AG card .Connect() for HFP 1.6</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14702</link>
    <description>&lt;pre&gt;---
 src/emulator.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 54 insertions(+), 4 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index c468452..8b4fd80 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -90,6 +90,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct ofono_emulator {
 gboolean bcs;
 int pns_id;
 struct ofono_handsfree_card *card;
+struct cb_data *codec_data;
 };
 
 struct indicator {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -485,6 +486,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean notify_ring(void *user_data)
 return TRUE;
 }
 
+static void call_card_connect_callback(struct ofono_emulator *em,
+GAtServerResult result)
+{
+struct cb_data *cbd = em-&amp;gt;codec_data;
+ofono_handsfree_card_connect_cb_t cb;
+
+if (cbd == NULL)
+return;
+
+cb = cbd-&amp;gt;cb;
+
+if (result == G_AT_SERVER_RESULT_OK)
+CALLBACK_WITH_SUCCESS(cb, cbd-&amp;gt;data);
+else
+CALLBACK_WITH_FAILURE(cb, cbd-&amp;gt;data);
+
+g_free(cbd);
+em-&amp;gt;codec_data = NULL;
+}
+
 static gboolean setup_synchronous_connection(void *user_data)
 {
 struct ofono_emulator *em = user_data;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14701">
    <title>[RFC 17/22] emulator: Add AT+BCS support</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14701</link>
    <description>&lt;pre&gt;This commit verifies if the codec id sent by HF is the same as
previous sent by AG.

It also verifies if the emulator is expecting a AT+BCS command. If not,
returns an ERROR.

We also need to unset the bcs flag in AT+BAC handler because it is a
valid +BCS response.
---
 src/emulator.c |   40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index 96e6ad1..a228df4 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,6 +64,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct ofono_emulator {
 guint audiosetup_source;
 gboolean clip;
 gboolean ccwa;
+gboolean bcs;
 int pns_id;
 struct ofono_handsfree_card *card;
 };
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -450,6 +451,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean notify_ring(void *user_data)
 return TRUE;
 }
 
+static void bcs_cb(GAtServer *server, GAtServerRequestType type,
+GAtResult *result, gpointer user_data)
+{
+struct ofono_emulator *em = user_data;
+GAtResultIter iter;
+int codec;
+
+if (!em-&amp;gt;bcs)
+goto fail;
+
+em-&amp;gt;bcs = FALSE;
+
+switch (type) {
+case G_AT_SER&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14700">
    <title>[RFC 15/22] emulator: Add AT+BCC support</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14700</link>
    <description>&lt;pre&gt;This commit verifies the conditions where the AT+BCC command will fail.

The codec connection setup is missing.
---
 src/emulator.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index 24c5e48..f358a0e 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -871,6 +871,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fail:
 }
 }
 
+static void bcc_cb(GAtServer *server, GAtServerRequestType type,
+GAtResult *result, gpointer user_data)
+{
+struct ofono_emulator *em = user_data;
+
+switch(type) {
+case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
+if (!em-&amp;gt;slc)
+goto fail;
+
+if (!(em-&amp;gt;l_features &amp;amp; HFP_AG_FEATURE_CODEC_NEGOTIATION) &amp;amp;&amp;amp;
+!(em-&amp;gt;r_features &amp;amp; HFP_HF_FEATURE_CODEC_NEGOTIATION))
+goto fail;
+
+g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
+break;
+
+default:
+fail:
+g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR);
+break;
+}
+}
+
 static void emulator_add_indicator(struct ofono_emulator *em, const char* name,
 int min, int max, int dfl&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14699">
    <title>[RFC 16/22] emulator: Setup codec connection</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14699</link>
    <description>&lt;pre&gt;This commit sends an unsolicited +BCS command with the selected codec
when the AG receives with success a AT+BCC command.

Currently the codec is hardcoded to CVSD.
---
 src/emulator.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index f358a0e..96e6ad1 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -61,6 +61,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct ofono_emulator {
 unsigned char cmee_mode;
 GSList *indicators;
 guint callsetup_source;
+guint audiosetup_source;
 gboolean clip;
 gboolean ccwa;
 int pns_id;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -449,6 +450,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean notify_ring(void *user_data)
 return TRUE;
 }
 
+static gboolean setup_codec_connection(void *user_data)
+{
+struct ofono_emulator *em = user_data;
+char str[16];
+
+DBG("");
+
+sprintf(str, "+BCS: %d", HFP_CODEC_CVSD);
+g_at_server_send_unsolicited(em-&amp;gt;server, str);
+
+em-&amp;gt;audiosetup_source = 0;
+
+return FALSE;
+}
+
 static void brsf_cb(GAtServer *server, GAtServerRequestType type,
 GAtResult *result, gpoint&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.handhelds.ofono/14698">
    <title>[RFC 21/22] emulator: Copy callback mechanism from atutil.h</title>
    <link>http://permalink.gmane.org/gmane.comp.handhelds.ofono/14698</link>
    <description>&lt;pre&gt;atutil.h needs GAtChat and GAtResult definitions and we do not have
these definitions inside emulator.c.
---
 src/emulator.c |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index 2ce1542..c468452 100644
--- a/src/emulator.c
+++ b/src/emulator.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,6 +47,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #define HFP_16_AG_DRIVER "hfp16-ag-driver"
 
+#define CALLBACK_WITH_FAILURE(cb, args...)\
+do {\
+struct ofono_error cb_e;\
+cb_e.type = OFONO_ERROR_TYPE_FAILURE;\
+cb_e.error = 0;\
+\
+cb(&amp;amp;cb_e, ##args);\
+} while (0)\
+
+#define CALLBACK_WITH_SUCCESS(cb, args...)\
+do {\
+struct ofono_error e;\
+e.type = OFONO_ERROR_TYPE_NO_ERROR;\
+e.error = 0;\
+cb(&amp;amp;e, ##args);\
+} while (0)
+
+struct cb_data {
+void *cb;
+void *data;
+};
+
 struct ofono_emulator {
 struct ofono_atom *atom;
 enum ofono_emulator_type type;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -80,6 +102,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct indicator {
 gboolean mandatory;
 };
 
+static inline struct cb_da&lt;/pre&gt;</description>
    <dc:creator>Paulo Borges</dc:creator>
    <dc:date>2013-05-16T17:16:41</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.handhelds.ofono">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.handhelds.ofono</link>
  </textinput>
</rdf:RDF>
