Disable command echo for hfp emulators
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(-)
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
@@ -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
@@ -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
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
@@ -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
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 emulatorsgatchat/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