Skip to contentSkip to conversation

Disable command echo for hfp emulators

PATCH In review Frédéric Dalleau 2 participants 4 messages Feb 23, 2011

lore
Share & tools
lore
#0 lore raw

cover Disable command echo for hfp emulators

This is the default asked by HSP and HFP specifications, which is the opposite of what v250 is asking.

Frédéric Dalleau (2):
gatchat: Add function to enable/disable echo
emulator: Disable echo for hfp emulators

 gatchat/gatserver.c |   10 ++++++++++
 gatchat/gatserver.h |    1 +
 src/emulator.c      |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/2 gatchat: Add function to enable/disable echo

---
 gatchat/gatserver.c |   10 ++++++++++
 gatchat/gatserver.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
gatchat/gatserver.c +10 -0
index b092a68..d9b1592 100644
@@ -1235,6 +1235,16 @@ gboolean g_at_server_shutdown(GAtServer *server)
 	return TRUE;
 }
 
+gboolean g_at_server_set_echo(GAtServer *server, gboolean echo)
+{
+	if (server == NULL)
+		return FALSE;
+
+	server->v250.echo = echo;
+
+	return TRUE;
+}
+
 gboolean g_at_server_set_disconnect_function(GAtServer *server,
 						GAtDisconnectFunc disconnect,
 						gpointer user_data)
gatchat/gatserver.h +1 -0
index a42c8b5..bb0ae84 100644
@@ -80,6 +80,7 @@ void g_at_server_unref(GAtServer *server);
 
 gboolean g_at_server_shutdown(GAtServer *server);
 
+gboolean g_at_server_set_echo(GAtServer *server, gboolean echo);
 gboolean g_at_server_set_disconnect_function(GAtServer *server,
 					GAtDisconnectFunc disconnect,
 					gpointer user_data);
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 emulator: Disable echo for hfp emulators

In reply to Frédéric Dalleau
---
 src/emulator.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
src/emulator.c +2 -0
index dcfd296..7007882 100644
@@ -203,6 +203,8 @@ void ofono_emulator_register(struct ofono_emulator *em, int fd)
 
 	if (em->type == OFONO_EMULATOR_TYPE_DUN)
 		g_at_server_register(em->server, "D", dial_cb, em, NULL);
+	else if (em->type == OFONO_EMULATOR_TYPE_HFP)
+		g_at_server_set_echo(em->server, FALSE);
 }
 
 static void emulator_remove(struct ofono_atom *atom)
Signature · 1 line
1.7.1
#3 lore raw
In reply to Frédéric Dalleau

Hi Frédéric,

Quoted 11 lines · Frédéric Dalleau

This is the default asked by HSP and HFP specifications, which is the opposite of what v250 is asking.

Frédéric Dalleau (2):
gatchat: Add function to enable/disable echo
emulator: Disable echo for hfp emulators

 gatchat/gatserver.c |   10 ++++++++++
 gatchat/gatserver.h |    1 +
 src/emulator.c      |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)

Both patches have been applied, thanks.

Regards,
-Denis