Commit Graph

99 Commits

Author SHA1 Message Date
Marcel Holtmann 5101702583 huawei: Use modem interface only if NDIS support is not available 2010-10-05 16:50:09 +02:00
Marcel Holtmann acc1f1d6af huawei: Add support for enabling NDIS GPRS driver if supported 2010-10-05 16:38:23 +02:00
Marcel Holtmann 190be6348c huawei: Add support for specific audio settings 2010-09-30 00:01:14 +09:00
Marcel Holtmann 461ef8ad97 huawei: Remove pointless vendor quirk 2010-09-29 23:59:50 +09:00
Marcel Holtmann 815b3e592d huawei: Use specific voice call atom driver 2010-09-27 12:44:09 +09:00
Marcel Holtmann c201ffd197 huawei: Move voice call init to post_sim phase
Seems like that making emergency voice calls without SIM present is
not really possible. Move the voice call init to post_sim phase instead.
2010-09-27 00:05:52 +09:00
Marcel Holtmann 1b640f6a45 huawei: Remove voice call notifications from modem plugin 2010-09-27 00:03:36 +09:00
Marcel Holtmann be1912fe9c Make debug handling with OFONO_AT_DEBUG a bit more consistent 2010-09-24 14:14:04 +09:00
Kalle Valo 78842faa30 huawei: fix online logic
The recently introduced online support to huawei didn't work with my
Huawei E1552. The problem was that with command AT+CFUN=1;+CFUN=5
the modem didn't initialise the sim state properly.

To fix this I changed the logic so that CFUN=5 is called only after the sim
state has switched to a valid state. Now my Huawei E1552 works with connman
again.

PIN locked SIMs still won't work. The problem is that it takes some time for
the sim state to go to a valid state:

Sep 20 15:01:57 dell-m520 ofonod[12451]: Pcui:< \r\n+CPIN: READY\r\n\r\nOK\r\n
[...]
Sep 20 15:02:00 dell-m520 ofonod[12451]: huawei: invalid sim state in post online (0)
[...]
Sep 20 15:02:01 dell-m520 ofonod[12451]: Pcui:< \r\n^SIMST:1\r\n

I don't know why it takes so long to get a valid state.

There is also another issue, in "cold start" case the phonebook
initialisation fails:

Sep 20 14:34:24 dell-m520 ofonod[11939]: Pcui:> AT+CPBS=?\r
Sep 20 14:34:24 dell-m520 ofonod[11939]: Pcui:< \r\n+CME ERROR: SIM busy\r\n

But in "warm start" it seems to work:

Sep 20 14:38:59 dell-m520 ofonod[12091]: Pcui:> AT+CPBS=?\r
Sep 20 14:38:59 dell-m520 ofonod[12091]: Pcui:< \r\n+CPBS: ("SM","EN","ON")\r\n\r\nOK\r\n

I consider this as a minor issue and didn't investigate it at all.
2010-09-21 02:08:45 +09:00
Kalle Valo 940eaffa72 huawei: poll sim state
On my Huawei E1552 when I plug in the modem (ie. cold start) with PIN locked
SIM, the sim state is 255 (HUAWEI_SIM_STATE_NOT_EXISTENT). As the modem
doesn't send ^SIMST notifications, poll the sim state until it's ready.

In theory it might be possible to do this better, for example follow
^BOOT notifications or something, but it's unknown what parameter we
should check for.
2010-09-21 02:08:24 +09:00
Pekka Pessi 9cbff5e19a huawei: implement Online property
Huawei uses +CFUN=5 for offline
2010-09-09 01:16:33 +02:00
Marcel Holtmann ad5fb5ddda huawei: Decode voice call notifications 2010-09-05 21:54:55 +02:00
Marcel Holtmann 92916affea huawei: Decode voice channel settings 2010-09-05 20:50:30 +02:00
Marcel Holtmann ba532ae192 huawei: Check for voice call support 2010-09-04 23:43:59 +02:00
Marcel Holtmann c2cf902d03 huawei: Query AT^U2DIAG and AT^GETPORTMODE settings
Just to make the values show up in the AT command debug logs, query them
when enabling the device.
2010-08-23 17:43:20 +02:00
Denis Kenzior 56aab76f41 huawei: Use QUALCOMM_MSM quirk for sim driver 2010-08-19 18:20:29 -05:00
Marcel Holtmann d0fdaa7f72 huawei: Add support for switching USSD mode
Some newer Huawei modems have support for ^USSDMODE command which seems
to be default to 1. In that mode the text USSD is not working. Switching
it to 0 and text USSD works just fine. Assumption is that with this command
the modem switches between text and PDU mode for USSD. Currently it is
unclear on how the PDU mode is suppose to work all. So default to text mode
if this command is supported.
2010-08-19 21:01:21 +02:00
João Paulo Rechi Vita f01de438bd huawei: Fix SIM state logic
Add support for voice-only SIM cards and enable phonebook atom for
non-voice modems.
2010-08-05 14:19:56 -05:00
João Paulo Rechi Vita 4c8e084bf4 huawei: fix double include of GPRS header 2010-08-02 12:16:40 -07:00
Zhenhua Zhang bf562fd639 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.
2010-07-02 10:40:13 -05:00
Denis Kenzior 494ce09c49 huawei: cleanup warnings from the previous patch 2010-06-29 14:44:20 -05:00
Kalle Valo 39382730d7 huawei: reopen the GPRS context on hup
Huawei always closes the tty port after PPP disconnect. Handle this in
huawei plugin, similarly as done with novatel. Now there's no need
to unplug the modem after disconnection.

Tested with Huawei E1552.

Based on a patch by Marcel Holtmann:

commit 0329a6ceaf
Author: Marcel Holtmann <marcel@holtmann.org>
Date:   Mon Jun 7 02:36:12 2010 -0700

    Reopen the GPRS context channel when the modem closes it after PPP
2010-06-29 14:01:16 -05:00
Marcel Holtmann 118759d5ba Enable Qualcomm specific CBS quirk for Novatel and Huawei devices 2010-06-09 18:42:09 -07:00
Denis Kenzior cc6a43c477 huawei: Rework huawei plugin
- Use the PCUI (event) port for all commands unrelated to ppp
- Use the Modem port for ppp
2010-06-07 19:07:05 -05:00
Marcel Holtmann edc33cfdb3 Use event channel for SMS, CBS and USSD with Huawei devices 2010-06-06 18:22:03 -07:00
Marcel Holtmann d990308c69 Enable CBS and USSD for Huawei modems 2010-06-06 15:52:02 -07:00
Marcel Holtmann d06d87e277 Fix debug channel prefix strings for Huawei plugin 2010-06-02 21:52:03 -07:00
Kalle Valo 53d70bc137 huawei: remove voicecall support
These modems don't support voicecall anyway. Recommended by Denis.
2010-05-25 09:47:18 -05:00
Kalle Valo 99e4200c64 huawei: send a prefix with AT commands 2010-05-25 09:47:03 -05:00
Kalle Valo 2d3c0cd3b0 huawei: properly notify sim state to ofono
Instead of using ofono_modem_set_powered(), use ofono_sim_inserted_notify()
which is the proper way to notify about sim state changes.

Now the problem is that voicecall commands fail with my Huawei E1552:

ofonod[12395]: > AT+CRC=1\r
ofonod[12395]: src/sim.c:ofono_sim_add_state_watch() 0x1bf8e50
ofonod[12395]: src/sim.c:ofono_sim_add_state_watch() 0x1bf8e50
ofonod[12395]: < \r\n+CME ERROR: SIM busy\r\n
ofonod[12395]: > AT+CLIP=1\r
ofonod[12395]: < \r\n+CME ERROR: SIM busy\r\n
ofonod[12395]: > AT+COLP=1\r
ofonod[12395]: < \r\n+CME ERROR: SIM busy\r\n
ofonod[12395]: > AT+CCWA=1\r
ofonod[12395]: < \r\n+CME ERROR: SIM busy\r\n
ofonod[12395]: drivers/atmodem/voicecall.c:at_voicecall_initialized()
  voicecall_init: registering to notifications
ofonod[12395]: src/sim.c:ofono_sim_add_state_watch() 0x1bf8e50
ofonod[12395]: > AT^SYSINFO\r
ofonod[12395]: < \r\n^SYSINFO:0,0,0,0,255,,0\r\n\r\nOK\r\n
ofonod[12395]: > AT+CGMI\r
ofonod[12395]: < \r\nhuawei\r\n\r\nOK\r\n
ofonod[12395]: EventChannel: < \r\n^STIN:0,0,0\r\n
ofonod[12395]: > AT+CLCC\r
ofonod[12395]: < \r\n+CME ERROR: SIM busy\r\n

But as I can't make voice calls with this modem anyway, I don't worry
about them right now.
2010-05-25 09:46:37 -05:00
Kalle Valo 3cdbed3c37 huawei: use g_at_result_iter_skip_next() 2010-05-25 09:45:18 -05:00
Marcel Holtmann 1ff130d66e Some minor cleanups for the Huawei plugin 2010-05-25 11:13:48 +02:00
Kalle Valo 160e4fe122 huawei: follow sim state change notifications
With Huawei E1552 I got sim busy errors when I plugged in the modem
and ofono was already running:

May 24 17:02:04 tukki ofonod[7619]: > AT+CRC=1\r
May 24 17:02:04 tukki ofonod[7619]: < \r\n+CME ERROR: SIM busy\r\n
May 24 17:02:04 tukki ofonod[7619]: > AT+CLIP=1\r
May 24 17:02:04 tukki ofonod[7619]: < \r\n+CME ERROR: SIM busy\r\n

Fix this by following sim state changes with ^SIMST notification and
only enable modem after SIM is ready. In case SIM is already ready
and we miss the notification for some reason, also use AT^SYSINFO
to check the state during enable phase.

Also change huawei_enable() to return -EINPROGRESS to make sure that
ofono modem is not powered too early. I believe this was a bug.
2010-05-25 11:11:11 +02:00
Kalle Valo 36e9803cdc huawei: add gprs context
Tested with Huawei E1552 HSDPA USB stick using a finnish Saunalahti prepaid
SIM.
2010-05-19 23:09:21 -05:00
Kalle Valo 6f4b3c31fd huawei: detect possible secondary device 2010-05-19 23:08:33 -05:00
Denis Kenzior 244ea076cc Fix: Remove easy uses of g_at_chat_shutdown 2010-04-28 17:27:33 -05:00
Andrzej Zaborowski ddfe8acf11 Drivers can notify core of SIM insertion / removal
Add ofono_sim_inserted_notify function to notify the core of SIM
insertion / removal.

Make every plugin generate a sim inserted event on start.  For devices
with removable card, the event should be emitted after the
plugin detects such event.  For devices that need to wait for SIM card
initialization, they can emit this event later.
2010-04-15 16:49:40 -05:00
João Paulo Rechi Vita c0c682d5c0 huawei: use GSM permissive parser instead of V1.
With V1 parser the driver fails to detect when a SMS is successfully
sent and keeps re-trying until Max retries.
2010-03-18 16:06:07 -05:00
Jussi Kukkonen ebe8904f39 Add quirk for cid and lac handling for Huawei 2010-01-20 10:09:54 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior 4dc8c0aa80 Fix: Convert Huawei plugin to new world order 2009-12-02 19:11:35 -06:00
Marcel Holtmann 0333ad8580 Move g_at_chat_add_terminator after chat object is verified 2009-11-24 18:08:46 +01:00
Yang Gu 4bc444e9a8 Support Huawei specific terminator 2009-11-24 18:06:45 +01:00
Denis Kenzior 446b9e645d Fix: modem _disable needs to send the CFUN
For Huawei driver
2009-11-18 12:09:42 -06:00
Denis Kenzior 27e32f12cd Fix: Rename G1 quirk to QUALCOMM_MSM 2009-11-10 16:29:23 -06:00
Marcel Holtmann 32ffbf915e Enable a few extra atoms in the Huawei plugin 2009-10-02 13:23:26 +02:00
Denis Kenzior 79cb80c7eb Update plugins to the new g_at_tty_open API 2009-10-01 17:01:15 -05:00
Denis Kenzior 12e77a3c70 Convert all the modem drivers to the new API 2009-09-17 10:15:34 -05:00
Marcel Holtmann bdad83d831 Add basic support for Huawei based devices 2009-09-03 00:22:06 -07:00