Create network registration driver for hfpmodem
PATCH 1/1 Create network registration driver for hfpmodem
This driver handles phone informations about registration status, signal strength and roaming status listening +CIEV commands. It also gets the Network Operator name with +COPS commands.
--- Makefile.am | 3 +- drivers/hfpmodem/hfpmodem.c | 2 + drivers/hfpmodem/hfpmodem.h | 3 + drivers/hfpmodem/network-registration.c | 365 +++++++++++++++++++++++++++++++ plugins/hfp.c | 1 + 5 files changed, 373 insertions(+), 1 deletions(-) create mode 100644 drivers/hfpmodem/network-registration.c
Makefile.am +2 -1
@@ -126,7 +126,8 @@ builtin_modules += hfpmodem builtin_sources += drivers/atmodem/atutil.h \ drivers/hfpmodem/hfpmodem.h \ drivers/hfpmodem/hfpmodem.c \ - drivers/hfpmodem/voicecall.c + drivers/hfpmodem/voicecall.c \ + drivers/hfpmodem/network-registration.c builtin_modules += mbmmodem builtin_sources += drivers/atmodem/atutil.h \
drivers/hfpmodem/hfpmodem.c +2 -0
@@ -42,6 +42,7 @@static int hfpmodem_init (void ) {hfp_voicecall_init (); +hfp_netreg_init ();return 0 ; }
@@ -49,6 +50,7 @@ static int hfpmodem_init(void)static void hfpmodem_exit (void ) {hfp_voicecall_exit (); +hfp_netreg_exit (); } OFONO_PLUGIN_DEFINE(hfpmodem, "Hands-Free Profile Driver", VERSION,
drivers/hfpmodem/hfpmodem.h +3 -0
@@ -61,6 +61,9 @@ struct hfp_data {unsigned int cind_val[HFP_INDICATOR_LAST ]; }; +extern void hfp_netreg_init (); +extern void hfp_netreg_exit (); +extern void hfp_voicecall_init ();extern void hfp_voicecall_exit ();
drivers/hfpmodem/network-registration.c new file +365 -0
365 lines not on this page · raw message
plugins/hfp.c +1 -0
@@ -311,6 +311,7 @@ static void hfp_pre_sim(struct ofono_modem *modem)DBG ("%p" , modem);ofono_voicecall_create (modem,0 ,"hfpmodem" , data); +ofono_netreg_create (modem,0 ,"hfpmodem" , data); }static void hfp_post_sim (struct ofono_modem *modem)
Signature · 1 line
1.6.4.4