mirror of git://git.sysmocom.de/ofono
huawei: Add Huawei EM770 modem support
Huawei EM770W is a 3G WCDMA modem that supports HSPA/UMTS/EDGE/GPRS/GSM data service and WCDMA/GSM short message services. It also has voice call capability that supports both 2G and 3G network.
This commit is contained in:
parent
7d42e4782d
commit
bf562fd639
|
@ -43,6 +43,13 @@
|
|||
#include <ofono/gprs.h>
|
||||
#include <ofono/gprs.h>
|
||||
#include <ofono/gprs-context.h>
|
||||
#include <ofono/voicecall.h>
|
||||
#include <ofono/call-forwarding.h>
|
||||
#include <ofono/call-settings.h>
|
||||
#include <ofono/call-barring.h>
|
||||
#include <ofono/ssn.h>
|
||||
#include <ofono/phonebook.h>
|
||||
#include <ofono/message-waiting.h>
|
||||
#include <ofono/log.h>
|
||||
|
||||
#include <drivers/atmodem/atutil.h>
|
||||
|
@ -326,12 +333,16 @@ static void huawei_pre_sim(struct ofono_modem *modem)
|
|||
|
||||
ofono_devinfo_create(modem, 0, "atmodem", data->pcui);
|
||||
data->sim = ofono_sim_create(modem, 0, "atmodem", data->pcui);
|
||||
|
||||
if (ofono_modem_get_boolean(modem, "HasVoice") == TRUE)
|
||||
ofono_voicecall_create(modem, 0, "atmodem", data->pcui);
|
||||
}
|
||||
|
||||
static void huawei_post_sim(struct ofono_modem *modem)
|
||||
{
|
||||
struct huawei_data *data = ofono_modem_get_data(modem);
|
||||
struct ofono_netreg *netreg;
|
||||
struct ofono_message_waiting *mw;
|
||||
|
||||
DBG("%p", modem);
|
||||
|
||||
|
@ -348,6 +359,18 @@ static void huawei_post_sim(struct ofono_modem *modem)
|
|||
|
||||
if (data->gprs && data->gc)
|
||||
ofono_gprs_add_context(data->gprs, data->gc);
|
||||
|
||||
if (ofono_modem_get_boolean(modem, "HasVoice") == TRUE) {
|
||||
ofono_call_forwarding_create(modem, 0, "atmodem", data->pcui);
|
||||
ofono_call_settings_create(modem, 0, "atmodem", data->pcui);
|
||||
ofono_call_barring_create(modem, 0, "atmodem", data->pcui);
|
||||
ofono_ssn_create(modem, 0, "atmodem", data->pcui);
|
||||
ofono_phonebook_create(modem, 0, "atmodem", data->pcui);
|
||||
|
||||
mw = ofono_message_waiting_create(modem);
|
||||
if (mw)
|
||||
ofono_message_waiting_register(mw);
|
||||
}
|
||||
}
|
||||
|
||||
static struct ofono_modem_driver huawei_driver = {
|
||||
|
|
|
@ -24,6 +24,10 @@ ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1401", ENV{OFONO_IFACE_NUM}=="02", E
|
|||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1402", ENV{OFONO_IFACE_NUM}=="00", ENV{OFONO_HUAWEI_TYPE}="Modem"
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1402", ENV{OFONO_IFACE_NUM}=="02", ENV{OFONO_HUAWEI_TYPE}="Pcui"
|
||||
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1404", ENV{OFONO_IFACE_NUM}=="00", ENV{OFONO_HUAWEI_TYPE}="Modem"
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1404", ENV{OFONO_IFACE_NUM}=="02", ENV{OFONO_HUAWEI_TYPE}="Pcui"
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1404", ENV{OFONO_HUAWEI_VOICE}="1"
|
||||
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1405", ENV{OFONO_IFACE_NUM}=="03", ENV{OFONO_HUAWEI_TYPE}="Modem"
|
||||
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1405", ENV{OFONO_IFACE_NUM}=="00", ENV{OFONO_HUAWEI_TYPE}="Pcui"
|
||||
|
||||
|
|
|
@ -227,6 +227,14 @@ static void add_huawei(struct ofono_modem *modem,
|
|||
const char *name = udev_list_entry_get_name(entry);
|
||||
type = udev_list_entry_get_value(entry);
|
||||
|
||||
if (g_str_equal(name, "OFONO_HUAWEI_VOICE") == TRUE) {
|
||||
gboolean value = g_str_equal(type, "1");
|
||||
|
||||
ofono_modem_set_boolean(modem, "HasVoice", value);
|
||||
entry = udev_list_entry_get_next(entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_str_equal(name, "OFONO_HUAWEI_TYPE") != TRUE) {
|
||||
entry = udev_list_entry_get_next(entry);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue