Commit Graph

656 Commits

Author SHA1 Message Date
Marcel Holtmann f8ef39c96e build: Add example configuration for phonesim plugin 2010-10-25 20:48:55 +02:00
Marcel Holtmann 7738f94451 build: Remove modemconf plugin support 2010-10-25 20:43:05 +02:00
Marcel Holtmann 7c2529077c phonesim: Don't use modem.conf for phonesim modems 2010-10-25 20:12:32 +02:00
Marcel Holtmann 2c863506d3 ifx: Detect when DLC shutdown happens
In case one of the DLCs shuts down, the system has an undefined state
and thus just shutdown the whole device.
2010-10-24 20:15:45 +02:00
Marcel Holtmann 4a5f37dafd ifx: Detect modems stuck in multiplexer mode
When the initial AT commands on the master device don't respond, then
the modem is stuck in multiplexer mode. For now just report an error.
2010-10-24 20:00:32 +02:00
Marcel Holtmann e4b09b3012 ifx: Use PPP based GPRS context if M-RAW_IP is not available 2010-10-23 12:57:42 +02:00
Marcel Holtmann 2c06348356 ifx: Add two GPRS contexts since the modem should support it 2010-10-21 23:51:36 +02:00
Marcel Holtmann f6b92bd2d9 ifx: Use Infineon specific GPRS context driver 2010-10-21 21:54:04 +02:00
Marcel Holtmann cca0782029 ifx: Use Infineon specific phonebook vendor quirk 2010-10-21 20:32:18 +02:00
Marcel Holtmann e74723776a ifx: Assign GPRS DLCs as slaves of the network DLC 2010-10-21 18:51:38 +02:00
Marcel Holtmann 2475d8826c ifx: Wait for DLC creation to settle (internal multiplexer)
When driving the Infineon modem with the builtin multiplexer there is
a small race condition with setting up the channels and sending the
first AT commands. The window here is pretty small, but it seems to be
a modem firmware issue. In case the AT command is send right away it can
happen that the modem does not process any further AT commands. In that
case the setup is stuck and enabling the modem fails.

Just adding a 10 milliseconds delay after DLC creation and before
sending the first AT commands is enough to make this work smoothly.
2010-10-19 22:59:21 +02:00
Marcel Holtmann 93f7bca25f phonesim: Add missing ATE0 when in multiplexer mode 2010-10-19 20:42:29 +02:00
Marcel Holtmann 96c04a744b phonesim: Fix multiplexer setup handling and modem power 2010-10-19 18:50:52 +02:00
Marcel Holtmann 56480ba582 ifx: Separate AT command from multiplexer debug setting 2010-10-17 14:50:45 +02:00
Denis Kenzior c1eb40e979 phonesim: minor whitespace fix 2010-10-14 01:07:44 -05:00
Torgny Johansson 5085e299fd ofono.rules: Add additional MBM rules
Add Ericsson c3607w and HP f3607gw/f3307 devices to udev rules file
2010-10-13 08:53:39 -05:00
Denis Kenzior a6909a227f huawei: Fixup whitespace corruption 2010-10-13 05:04:46 -05:00
Marcel Holtmann 9bc187bd45 ifx: Disable modem UART for power saving
Send AT+XPOW=0,0,0 command when enabling modem to disable UART. This
is done for power saving.
2010-10-13 08:42:45 +03:00
Aki Niemi 9914b2059e Fix smart messaging D-Bus signatures 2010-10-11 16:00:54 +03:00
Aki Niemi 061f61398d isigen: Add dummy ops for enable/disable
Without these the core gets confused. These are actually no-ops, since
enabling and disabling aren't supported with a USB modem.
2010-10-11 15:43:24 +03:00
Pekka Pessi f0ba01543a udev: refactor add_isi
Gather OFONO_ISI_ADDRESS from same udev device node as OFONO_DRIVER.
2010-10-07 15:30:04 +03:00
Pekka Pessi f8f93c34a8 udev: do not use post-143 libudev features
There is no udev_device_get_property_value() in libudev version 143.
2010-10-07 15:30:01 +03:00
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 45a2077e67 udev: Track NDIS port of Huawei devices (if present) 2010-10-05 16:21:19 +02:00
Marcel Holtmann 29e09bf3b9 udev: Fix coding style 2010-10-01 16:44:26 +02:00
Pekka Pessi 951cf0eaef udev: Fix ISI address setting 2010-10-01 17:38:40 +03:00
Kai Vehmanen 618ac2516c n900: Enable audio settings atom 2010-10-01 17:11:25 +03:00
Marcel Holtmann 7a77b292e3 ifx: Remove support for OFONO_IFX_MODEL option
The Infineon modem model is now auto-detected, so there is no longer
any need to specify it in the udev configuration rules.
2010-10-01 15:18:06 +02:00
Marcel Holtmann 0aae76c7aa ifx: Enable audio settings atom support 2010-10-01 13:17:24 +02:00
Marcel Holtmann 004219660f udev: Include "hsi" in the subsystems to watch 2010-10-01 13:01:08 +02:00
Aki Niemi e8d88d48da n900: Fix link target status 2010-10-01 13:55:02 +03:00
Marcel Holtmann 31d3142256 ifx: Fix crash with XGENDATA result callback 2010-10-01 12:31:19 +02:00
Marcel Holtmann e9e901a5ee build: Remove no longer needed plugins/usbpnmodem.c 2010-10-01 09:27:44 +02:00
Marcel Holtmann 6ce4f46273 build: Rename smart_messaging.c to smart-messaging.c 2010-10-01 07:51:43 +02:00
Marcel Holtmann 88f1b3c85e build: Move example plugins to its own directory 2010-10-01 07:44:09 +02:00
Marcel Holtmann a73dd11a87 udev: Some minor coding style updates 2010-10-01 06:57:22 +02:00
Marcel Holtmann be99e80a24 isi: Remove not needed includes for oFono headers 2010-10-01 06:54:27 +02:00
Marcel Holtmann 0ff1a3cb79 isi: Private header files don't need circular inclusion protection 2010-10-01 06:52:38 +02:00
Marcel Holtmann 26210912d9 plugins: Mode fixups for copyrigh headers 2010-10-01 06:51:34 +02:00
Marcel Holtmann b246df78f1 isi: Fix up the copyright headers of modem plugins
It is important that the copyright headers are consistent throughout
the source code. While the copyright might be owned by different
people of companies, the header itself with its license information
should be identical.
2010-10-01 06:46:32 +02:00
Marcel Holtmann 7dbdf46215 ifx: Use XGENDATA for modem model detection
The XGENDATA result contains various strings that also contain the modem
model. Make this command mandatory for the modem bringup and after it
succeeded, check for the XMM6260 string to setup specific audio settings.

This makes using ENV{OFONO_IFX_MODEL}="XMM6260" obsolete, but for now it
is still left as a possible option. It might be removed later.
2010-10-01 06:38:02 +02:00
Aki Niemi 99afae0393 smart_messaging: Remove interface on atom removal 2010-09-30 19:07:51 -05:00
Aki Niemi a7879d4e0c gisi: Remove route adding API 2010-09-30 11:25:48 +03:00
Aki Niemi f6966a3c5e Add udev support for ISI modems 2010-09-30 11:25:48 +03:00
Pekka Pessi 43e9d09a1c modemconf: set up isigen and n900
Allows basic configuration of phonet links.
2010-09-30 11:25:47 +03:00
Pekka Pessi 82894cf58f n900: modem driver plugin for Nokia N900
This patch adds a modem driver plugin for the Nokia N900 internal
modem. It controls the modem using the appropriate GPIO lines and thus
works without the Maemo userspace.

This plugin can run natively on the N900 with either Maemo or Meego
kernels. However, it conflicts with the Maemo userspace, for which
isigen should be used instead.
2010-09-30 11:25:47 +03:00
Pekka Pessi 0fc18e8176 isigen: generic modem driver plugin for ISI
The new isigen modem driver plugin replaces the generic parts in the
isimodem modem driver. This plugin works with recent Nokia modems in
PC suite mode over USB, as well as with the N900 modem using Maemo5
userspace.
2010-09-30 11:25:47 +03: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 2f90ddff3c ifx: Request firmware details on modem init
The firmware details can be requested via AT+XGENDATA. So do this at
modem init to have these in the logs. Currently nothing is done with
this data, but eventually it can be used for modem specific settings
like the audio configuration.
2010-09-29 23:30:39 +09:00
Denis Kenzior ccb8b4fc21 smart_messaging: Add basic skeleton implementation 2010-09-28 23:38:37 -05:00
Denis Kenzior 801264fe03 smart_messaging: Add skeleton plugin 2010-09-28 22:51:47 -05:00
Marcel Holtmann 4d49d0879f ifx: Add support for audio configuration of modem
For the XMM6260 Infineon modem it is possible to use different audio
configuration depending on your platform. Currently the setup of
FULL_DUPLEX, BURSTMODE_48KHZ and BURSTMODE_96KHZ are supported. If
appropiate values for OFONO_IFX_MODEL and OFONO_IFX_AUDIO are set
in the udev rules file, then the audio configuration will be changed
when bringing up the modem.
2010-09-29 07:41:01 +09:00
Marcel Holtmann 5d1b9d5925 udev: Add support for setting IFX audio configuration
This adds three more extra configuration options for IFX specific
hardware setups. They are OFONO_IFX_MODEL, OFONO_IFX_AUDIO and also
OFONO_IFX_LOOPBACK.

An example usage would be like this:

ENV{OFONO_IFX_MODEL}="XMM6260", ENV{OFONO_IFX_AUDIO}="FULL_DUPLEX"

The actual supported values are not defined by the IFX modem
detection code. This is up to the modem plugin to change behavior
if needed.
2010-09-29 07:34:22 +09:00
Frank Gau 197757242e calypso: update power and reset path 2010-09-27 19:08:58 -05: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 592f927495 ifx: Add warning for unknown SIM states 2010-09-26 17:09:25 +09:00
Marcel Holtmann f5eaf8a3fb ifx: Allow +XSIM notification to arrive during AT+XSIMSTATE=1
When not using none_prefix for matching the responses of AT+XSIMSTATE
call, it will consume all notifications. And this includes the initial
SIM state that the modem sends at that point. Without this notification
the SIM will never be marked as inserted.
2010-09-25 14:20:32 +09:00
Marcel Holtmann 1267247f5e ifx: Use internal mutliplexer if line discipline is not specified
If there is no line discipline specified for a kernel based multiplexer,
then fallback to the internal one.
2010-09-25 14:09:40 +09:00
Marcel Holtmann dcbceb249d ifx: Use multiplexer line discipline configuration option
Since the udev support allows to specify a line discipline number as
part of the modem configuration, use that one and report and error if
it has not been set.
2010-09-25 13:21:53 +09:00
Marcel Holtmann d0adc058c4 udev: Add support for setting IFX multiplexer line discipline
The IFX modem plugin uses a kernel based multiplexer. And to support
different line discipline numbers on different target platforms, allow
them to be specified as option:

KERNEL=="ttyIFX[0-9]*", ENV{OFONO_DRIVER}="ifx", ENV{OFONO_IFX_LDISC}="23"

The extra OFONO_IFX_LDISC option specifies to use line discipline 23
for the multiplexer setup. The number is just an example here and the
correct one will be different.
2010-09-25 13:12:36 +09:00
Marcel Holtmann 2a62e28659 ifx: Use SIM state notification for SIM insertion and removal
The +XSIM notifies us about missing or removed SIM. Use that for telling
the core if a SIM card is present or not. Besides that all other states
are treated as when a SIM card got inserted.
2010-09-25 11:49:00 +09:00
Marcel Holtmann 08f0ce6772 ifx: Add support for multiplexer setup
This supports a simple static multiplexer that is activated with setting
the line discipline 23 on the TTY. It is static, because the DLC numbers
are hardcoded.
2010-09-24 22:28:49 +09:00
Marcel Holtmann 12c846637d ifx: Add initial modem plugin implementation
This is a first attempt at the Infineon modem support. The support
is limited since it doesn't handle the setup of the multiplexer or
the different SIM states yet.
2010-09-24 18:32:06 +09:00
Marcel Holtmann 12bfc932f9 calypso: Fix debug for modem callbacks 2010-09-24 14:45:31 +09:00
Marcel Holtmann 69a6323633 calypsomodem: Use better debug strings for DLCs 2010-09-24 14:37:42 +09:00
Marcel Holtmann be1912fe9c Make debug handling with OFONO_AT_DEBUG a bit more consistent 2010-09-24 14:14:04 +09:00
Denis Kenzior 7e32ced1f3 example_history: Update to the new internal API 2010-09-21 08:44:48 -05: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
Yang Gu 5d569e2ee6 hso: Enable phonebook atom 2010-09-19 20:38:13 +09:00
Marcel Holtmann df807d6d0a ifx: Add skeleton for Infineon modem plugin 2010-09-18 22:13:53 +09:00
Marcel Holtmann 3443a7a177 udev: Add support for IFX device detection
The IFX device detection is pretty static, but instead of using
a static configuration file it is important to know when the device
node is actually present. For this udev is perfect. Adding a simple
udev rule is all that it takes:

KERNEL=="ttyIFX[0-9]*", ENV{OFONO_DRIVER}="ifx"

With this rule for every TTY with the kernel name like ttyIFX0, a new
modem will be added and the IFX modem plugin driver requested for it.
2010-09-18 22:08:41 +09:00
Jeevaka Badrappan 0d809cd636 phonesim: set character set to GSM 2010-09-15 13:56:59 -05:00
Pekka Pessi ebb9b3e952 zte: implement Online property 2010-09-09 01:28:39 +02:00
Pekka Pessi 8a7e919578 mbm: implement Online property 2010-09-09 01:24:34 +02:00
Pekka Pessi de4d998e37 ste: implement Online property 2010-09-09 01:24:03 +02:00
Pekka Pessi aac914f656 novatel: implement Online property 2010-09-09 01:21:25 +02:00
Pekka Pessi 6ce4fb3689 hso: implement Online property 2010-09-09 01:19:37 +02:00
Pekka Pessi 9cbff5e19a huawei: implement Online property
Huawei uses +CFUN=5 for offline
2010-09-09 01:16:33 +02:00
Pekka Pessi e28adba8ad atgen: implement Online property 2010-09-09 01:15:10 +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 bafc89a858 udev: Check for valid USB serial numbers 2010-09-04 22:51:38 +02:00
Denis Kenzior bb3df7a66d phonesim: Move the stk atom to post_sim state 2010-09-02 10:45:01 -05:00
Pekka Pessi bbe4cf9f9d mbm: D5530 gets bogus +GCAP, not +CGAP 2010-08-30 11:28:19 -05:00
Marcel Holtmann 58830cb025 udev: Add rule for ZTE MF110 modem 2010-08-28 08:19:02 +02:00
Pekka Pessi 72bc1c7780 mbm: add quirks for Dell D5530
Dell D5530 is an OEM version of F3507g. It has an annoying habit of
announcing itself to world with its own name. Another problem is some weird
+CGAP messages at the same time. It also crashes upon processing received
CBS messages.
2010-08-25 12:18:23 -05:00
Marcel Holtmann a5bb510787 novatel: Use Qualcomm specific quirk for SIM handling 2010-08-23 22:54:34 +02:00
João Paulo Rechi Vita 8ca72b9706 hfp: fix typo 2010-08-23 20:15:28 +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
Pekka Pessi 51a1bae8c7 mbm: fix initial polling for sim
There seems to be no specific error codes returned when SIM is missing.
Poll at least 5 times upon an error and give up after that.
2010-08-23 16:31:36 +02:00
Marcel Holtmann 0488550b55 nokia: Add GPRS handling 2010-08-20 21:27:13 +02:00
Marcel Holtmann a466443f55 zte: Add GPRS handling 2010-08-20 21:19:40 +02:00
Marcel Holtmann e3372f0b04 mbm: Remove registration and bearer specific notifications 2010-08-20 16:51:24 +02:00
Marcel Holtmann 9cdc303574 mbm: Enable notifications for packet switched bearer changes 2010-08-20 16:24:12 +02:00
Marcel Holtmann 132041004b mbm: Enable CFUN and EREG notifications 2010-08-20 15:45:17 +02:00
Marcel Holtmann 3251e7e234 mbm: Fix naming of MBM driver for GPRS context handling 2010-08-20 14:12:01 +02:00
Marcel Holtmann f1e8114f2a mbm: Use proper MBM quirks 2010-08-20 14:09:55 +02:00
Marcel Holtmann 607b21e7e3 ste: Use MBM quirk for network registration 2010-08-20 14:08:12 +02:00
Marcel Holtmann 26213aa1cc ste: Use MBM quirk instead of a STE specific one 2010-08-20 14:07:19 +02:00
Zhenhua Zhang 2084fffed0 udev: Add check for serial before string operation
'serial' could be NULL in some case. So it need to add check before
doing string operation.
2010-08-20 10:20:39 +02:00
Marcel Holtmann 12af4601bd nokia: Add initial plugin for Nokia Datacard support 2010-08-20 03:05:18 +02:00
Marcel Holtmann d05ea32ac2 udev: Add detection for Nokia data cards 2010-08-20 02:20:37 +02:00
Denis Kenzior 7be74dabe2 zte: Use QUALCOMM_MSM quirk for sim driver 2010-08-19 18:20:29 -05:00
Denis Kenzior 56aab76f41 huawei: Use QUALCOMM_MSM quirk for sim driver 2010-08-19 18:20:29 -05:00
Marcel Holtmann 86b58a7e43 hso: Use Qualcomm specific USSD quirk 2010-08-19 21:59:11 +02: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
Andrzej Zaborowski 01cb20f32d calypso: Subscribe to %SIMREM and %SIMINS
These notifications should be emitted on SIM removal and insertion.
These notifications don't work very well though, on the hardware this
has been tested on, the modem never issued %SIMINS, and %SIMREM was
emitted only in some specific circumenstances.
2010-08-18 00:29:37 -05:00
Sjur Brændeland e1cd53476a stemodem: Add polling for SIM ready status
Interim solution until support for SIM 'ready' notification is supported.
2010-08-17 14:57:31 +02:00
Sjur Brændeland 53546e6e23 plugins: Add STE sample to modem.conf 2010-08-17 14:51:31 +02:00
Sjur Brændeland 66f1f3d1d4 modemconf: Add support for Interface for STE plugin 2010-08-17 14:50:31 +02:00
Sjur Brændeland 825a2c2d66 ste: Use SOCK_STREAM for CAIF and enable interface specification 2010-08-17 14:46:01 +02:00
Sjur Brændeland e006d6db04 ste: Add Radio-Settings 2010-08-17 14:42:30 +02:00
Sjur Brændeland 9cbbf1d3ab ste: Add AT Channel configurations 2010-08-17 14:39:46 +02:00
Sjur Brændeland 266a3893a3 ste: SIM - STE registers as MBM to utilize mbm quirks 2010-08-17 14:37:58 +02:00
Denis Kenzior 47253998be phonesim: Should use none_prefix
When only OK is expected
2010-08-16 21:29:19 -05:00
Sjur Brændeland ce46fd322c ste: Include STK support from MBM driver 2010-08-16 23:57:58 +02:00
Marcel Holtmann de363a0056 zte: Use Qualcomm specific USSD quirk 2010-08-16 22:38:57 +02:00
Marcel Holtmann 7e01bef1b4 zte: Add support for sms, cbs, ussd and phonebook atoms 2010-08-16 15:28:31 +02:00
Marcel Holtmann 885880512d zte: Add initial support for devinfo, sim and netreg atoms 2010-08-16 15:16:01 +02:00
Marcel Holtmann 78a304de71 Fix typo in Huawei port detection 2010-08-16 14:49:54 +02:00
Marcel Holtmann 0a18997416 Add udev detection support for ZTE modems 2010-08-16 14:49:04 +02:00
Marcel Holtmann 3e93fbca03 Add skeleton for ZTE modem support 2010-08-16 14:48:41 +02:00
Denis Kenzior 3b34dd44f1 phonesim: Support set_online/post_online 2010-08-12 15:53:59 -05:00
Marcel Holtmann 4e9fc90e8a Use permissive parser for MBM since otherwise STK causes problems 2010-08-10 21:42:00 -04:00
Andrzej Zaborowski 29510815c5 calypso: Create STK atom and reorder initialisation
See comment in the code.  The Sim Toolkit apps seem to work rather
reliably with this, tested on both PIN-enabled and unprotected cards.
2010-08-06 12:07:12 -05:00
Andrzej Zaborowski 8f0b5a13c1 calypso: Enable AT extended error codes
The STK driver tries to interpret the codes.
2010-08-06 12:00:40 -05:00
Andrzej Zaborowski 1ba7fbd3c4 calypso: Check if SIM is present on modem startup
Like in case of MBM modem, the SIM slot is not easily accessible
while the device is running so we assume there's no need to check
for SIM presence after startup.
2010-08-06 11:55:09 -05:00
Andrzej Zaborowski 303394910f phonesim: Don't use VENDOR_PHONESIM for calypso
Also move the STK initialisation to post-sim because it is more logical
there (even if it makes no difference under phonesim).
2010-08-06 11:53:27 -05: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
Gustavo F. Padovan c441ca167d bluetooth: define DBUS_TIMEOUT macro 2010-08-05 10:34:38 -05:00
João Paulo Rechi Vita 4c8e084bf4 huawei: fix double include of GPRS header 2010-08-02 12:16:40 -07:00
Marcel Holtmann d2c8f957c0 Fix Huawei product ID matching in udev rules 2010-07-17 14:46:37 -07:00
Marcel Holtmann 9a72521d7b Add a little bit debug to udev modem detection 2010-07-17 14:43:29 -07:00
Pekka Pessi 99f6c920f5 mbm: poll SIM status when initializing 2010-07-15 09:18:08 -05:00
Yang Gu ce24e7b2c8 Use specific vendor for phonesim stk 2010-07-13 09:55:06 -05: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
Zhenhua Zhang 7d42e4782d huawei: Remove existing Huawei EM770 plugin 2010-07-02 10:38:59 -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
Pekka Pessi e8965f5f8c mbm: use CPIN? to check if SIM is missing
AT+CRSM=242 is not supported by all mbm models.
2010-06-29 12:24:51 -05:00
Denis Kenzior 6f08920c1a Fix huawei udev rules 2010-06-22 09:46:25 -05:00
Denis Kenzior 2f967651fb hfp: Fix style issues 2010-06-21 22:53:05 -05:00
Gustavo F. Padovan f4e1b5ca91 hfp: use bluetooth helpers and remove similar code 2010-06-21 22:49:37 -05:00
Denis Kenzior 8319eee7c0 bluetooth: Various style issues 2010-06-21 22:48:15 -05:00
Gustavo F. Padovan 922d8aed48 bluetooth: add PropertyChanged watch
This one is a bit diferent from the hfp.c one, so a separated patch for
it.
2010-06-21 22:45:50 -05:00
Gustavo F. Padovan 447162185f bluetooth: add watches for service and adapters
Exactly the same code from hfp.c
2010-06-21 22:43:38 -05:00
Gustavo F. Padovan 88ffebf801 bluetooth: add device_properties_cb() and has_uuid() 2010-06-21 22:43:08 -05:00
Gustavo F. Padovan d6154362d3 bluetooth: Move functions from hfp.c to bluetooth.c
The part that call device_properties_cb is commented to permit this patch
compile.
device_properties_cb() will be changed, so it will have separated patch.
2010-06-21 22:40:22 -05:00
Denis Kenzior c3d61c9467 history: Make example_history use Delivery Reports 2010-06-21 15:21:39 -05:00
Arun Ravindran 7aab2d07aa Enabling PDP Context support in atmodem. 2010-06-21 09:32:06 -05:00
Andrzej Zaborowski 4f72a3a1f7 mbm: Use MBM vendor quirk of the sim driver. 2010-06-18 14:14:53 -05:00
Andrzej Zaborowski 56c8033f9f mbm: Register stk driver post sim. 2010-06-18 14:11:26 -05:00
Florian Steinel a769091803 huawei: Import Huawei rules
From 10-Huawei-Datacard.rules (Linux Driver 4.08.01.108.tar.gz)
2010-06-18 12:58:07 -05:00
Denis Kenzior 02a54376c9 hfp: Use bluetooth_parse_properties
Instead of the local version
2010-06-17 05:32:29 -05:00
Denis Kenzior 6ba350cec5 bluetooth: Rename & expose parse_properties 2010-06-17 05:32:29 -05:00
Denis Kenzior cfc9722b13 hfp: Use the bluetooth_send_with_reply
Instead of send_method_call_with_reply
2010-06-17 05:32:29 -05:00
Denis Kenzior 2b2b992c22 bluetooth: Rename send_method_call_with_reply 2010-06-17 05:32:28 -05:00
Gustavo F. Padovan b611316bbe Remove send_method_call from hfp.c 2010-06-17 05:32:12 -05:00
Gustavo F. Padovan 9d543c0719 Move create_path() to bluetooth plugin 2010-06-17 05:07:05 -05:00
Gustavo F. Padovan 4ccb481f4d Add parse properties stuff to bluetooth.c 2010-06-17 05:06:55 -05:00
Gustavo F. Padovan 5bf4bec526 Add send_method_call_with_reply to bluetooth.c 2010-06-17 05:06:51 -05:00
Gustavo F. Padovan 4004433ad4 Add bluetooth plugin skeleton.
The bluetooth plugin has bluetooth_resgister_uuid() and
bluetooth_unresgister_uuid() where bluetooth profiles plugins such as HFP
and DUN can register themselves to get know about BlueZ stuff ( new
devices, bluetoothd shutdown, etc..)
2010-06-17 05:06:39 -05:00
Marcel Holtmann 74791ca805 Remove all voice related atoms from MBM modem support 2010-06-15 14:16:43 +02:00
Marcel Holtmann 66c50b6a72 Add nasty quirk to allow HSO devices to read network code length
The AT+CRSM=192 commands are failing on HSO devices and thus it might
be needed to return its details from a predefined database. Start with
testing this for reading the network code length.
2010-06-13 08:10:13 +02:00
Marcel Holtmann 6a26431f58 Use Qualcomm quirk for CBS on HSO devices 2010-06-13 07:02:55 +02: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
Denis Kenzior 71ea72adf2 udev: Fixup Huawei detection 2010-06-07 19:04:36 -05:00
Florian Steinel 5c0bdac347 udev: Add support for Huawei E176 2010-06-07 16:08:29 -05:00
Marcel Holtmann 0329a6ceaf Reopen the GPRS context channel when the modem closes it after PPP 2010-06-07 02:36:12 -07: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 6ab0b6f29a Fix detection of Huawei E220 and E270 modems 2010-06-06 15:51:36 -07:00
Marcel Holtmann f1c209d973 Move AT_ODO quirk into HSO driver instead of network registration 2010-06-06 15:27:34 -07:00
Marcel Holtmann 360abb0f5b Use hsomodem instead of hso for Option HSO GPRS atom driver 2010-06-06 15:20:48 -07:00
Marcel Holtmann 8a96a250f0 Enable Option specific radio settings 2010-06-06 15:19:32 -07:00
Marcel Holtmann fabf28cf02 Set Novatel quirk also for the GPRS atom 2010-06-06 13:13:02 -07:00
Marcel Holtmann 197d2c08bd Check the supported technologies for Novatel devices on startup 2010-06-06 12:05:10 -07:00
Marcel Holtmann 63d1efdf7f Enable Novatel specific radio settings 2010-06-06 11:08:41 -07:00
Marcel Holtmann 4f4565b33a Add disconnect callback handling to Novatel plugin 2010-06-05 22:37:02 -07:00
Marcel Holtmann e92040671d Use secondary port for everything besides GPRS with Novatel devices
If a Novatel device allows to enable a secondary AT command based
channel, then use that for device information, SIM handling, network
registration etc. and only leave the GPRS context setup to the first
command port.
2010-06-04 21:12:09 -07:00
Marcel Holtmann f6d252cf04 Rename Novatel ports into Primary and Secondary 2010-06-04 19:38:05 -07:00
Marcel Holtmann 78cc0e8efa Enable CBS and USSD for Option HSO based devices 2010-06-04 13:01:32 -07:00
Marcel Holtmann 372a2e306e Add Option specific SMS quirk since ack pdu is broken 2010-06-03 18:16:01 -07:00
Marcel Holtmann 2eec57da65 Enable USSD and CBS support for Novatel based devices 2010-06-03 09:56:42 -07:00
Marcel Holtmann 9b6ec94b21 Enable SMS support for Novatel based devices
The important part here is that the SMS atom needs to be on the second
AT command port since the main port doesn't handle sending correctly. It
never returns any success or error after the submission of the PDU.
2010-06-03 08:57:16 -07:00
Marcel Holtmann 6df182c5db Use new Novatel quirk for network registration 2010-06-03 01:21:44 -07:00
Marcel Holtmann 1261978f56 Add GPRS support for Novatel based devices 2010-06-02 23:18:32 -07:00
Marcel Holtmann d06d87e277 Fix debug channel prefix strings for Huawei plugin 2010-06-02 21:52:03 -07:00
Marcel Holtmann 788b21cfb9 Add support for detecting second port of Novatel devices 2010-06-02 21:45:09 -07:00
Denis Kenzior e8dec14a7c atgen: Don't use sim polling
Some modems get confused by the CSIM commands and reply with an error,
which we treat as sim not inserted.
2010-06-01 14:01:48 -05:00
Pessi Pekka (Nokia-D/Helsinki) 647a2e56b9 Fix: set correct local address for phonet on PCs 2010-05-26 00:06:43 +03: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
Aki Niemi b8ec7553ef Add network time support
Adding a new notify function in the netreg atom for notifying a
received Network Identification and Timezone (NITZ) indication. This
data is consumed via a nettime plugin, of which there is also an
example.
2010-05-19 10:46:18 +03:00
Pekka Pessi 3e07987776 Configure phonet link in usbpnmodem 2010-05-17 13:51:51 +03:00
Pekka Pessi 89cd67f076 Use g_pn_netlink_by_modem() in usbpnmodem plugin 2010-05-17 13:44:11 +03:00
Andrzej Zaborowski bf7afc6130 mbm: Check there's a SIM card inserted. 2010-05-12 13:46:17 -05:00
Andrzej Zaborowski 19ddfb302f mbm: Register sim toolkit atom in mbm plugin. 2010-05-12 13:44:53 -05:00
Zhenhua Zhang af976f7e52 Fix Use hashtable to record udev path
Sometimes, Udev device 'remove' event could not report correct parent
node of current udev_device. Current code replies on the devpath
attached on the parent node to find modem and then remove it.

This fix is to change the way to store the devpath info into a
hashtable. So that we search hashtable to get devpath and remove the
modem.
2010-05-11 09:18:55 -05:00
Zhenhua Zhang 988750898e Fix check data device before register the modem
To avoid the race condition that modem is registered before we retrieve
the data device property.
2010-05-10 15:26:09 -05:00
Torgny Johansson 4c483acbc6 add vid/pid for Dell 5541 and 5542 2010-05-04 11:08:46 +02:00
Denis Kenzior 244ea076cc Fix: Remove easy uses of g_at_chat_shutdown 2010-04-28 17:27:33 -05:00
Zhenhua Zhang e1daf20651 mbm: Add Dell 5530 modem port suffix
Dell 5530 seems to have three tty ports labeled:
"Dell Wireless 5530 HSPA Mobile Broadband Minicard Modem"
"Dell Wireless 5530 HSPA Mobile Broadband Minicard Modem 2"
"Dell Wireless 5530 HSPA Mobile Broadband Minicard GPS Port"
2010-04-21 12:46:47 -05:00
Denis Kenzior 1442b0af46 wavecom: Trivial comment update 2010-04-20 11:54:25 -05:00
Denis Kenzior 9d58e01d96 wavecom: Braces are not necessary 2010-04-20 11:54:25 -05:00
Matthias Günther d8e1a68264 Added Wavecom modem plugin.
The Wavecom WMP100 is a serial based modem, however it assumes CPIN to
be the final response.  This requires some quirking in the sim driver.

Refer to commit 6d28f82dc1 for details.
2010-04-20 11:54:25 -05:00
Pekka Pessi fa3501b8d2 Refactor isimodem and gisi/netlink
Now usbpnmodem plugin is used to register ISI modems.
2010-04-20 17:47:17 +03:00
Pekka Pessi 793710d800 Parse Interface key for isimodem and n900modem 2010-04-20 17:47:16 +03:00
Denis Kenzior 92cb776fae phonesim: Disable polling in phonesim for now
Seems that polling support in phonesim is less than working
2010-04-20 09:12:43 -05:00
Denis Kenzior 53a2520ab8 Trivial: Remove extra ':' from history output 2010-04-20 09:12:43 -05:00
Denis Kenzior cc0ffd1720 Rename ofono_atmodem_poll_enable
This is not official oFono API
2010-04-15 16:49:43 -05:00
Andrzej Zaborowski 14bcca32c0 Implement STATUS polling in atmodem driver. 2010-04-15 16:49:43 -05:00
Andrzej Zaborowski b34c35d822 Add AT driver for STK atom. 2010-04-15 16:49:42 -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
Daniel Wagner 7bbbb6949c Add support for Option iCON 451 2010-04-14 03:36:24 -07:00
Denis Kenzior aadc1d884d Add support for Option iCon 452 2010-04-01 22:32:58 -05:00
Denis Kenzior 4d44103cce Update mbm to use two ports
The second port might be used for a second active context via ppp
2010-03-31 18:36:21 -05:00
Denis Kenzior 149650db8d Fix: MD300 uses two ACM ports, so set one to data 2010-03-31 18:34:32 -05:00
Denis Kenzior b046142044 Fix: Potential crash in modemconf 2010-03-31 08:22:03 -05:00
Denis Kenzior 40a2d9034d Add call-forwarding to mbm driver 2010-03-29 15:38:22 -05:00
Denis Kenzior 21dd4f040a Move erinfo notify to atmodem netreg driver 2010-03-28 23:49:57 -05:00
Denis Kenzior 8b33129bac Add phonesim vendor quirk 2010-03-26 23:00:28 -05:00
Denis Kenzior d994ed1111 Add mbm vendor 2010-03-26 23:00:28 -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
Yang Gu d26e71a06a Add support of Huawei EM770 modem
Comparing with general Huawei modem, EM770 is a full feature modem that
supports voicecall, phonebook, call forwarding, call barring, etc.
2010-03-16 01:33:23 -07:00
Gustavo F. Padovan 400d692e6e hfp: add watch to trigger HUP of the file descriptor 2010-02-15 16:46:17 -06:00
Gustavo F. Padovan f738a84588 hfp: remove modems if bluetoothd exits unexpectedly 2010-02-15 15:03:31 -06:00
Gustavo F. Padovan e66002bbcf hfp: remove duplicated ofono_modem_set_powered 2010-02-15 13:37:34 -06:00
Denis Kenzior 766a0bcfa5 Fix: Unregistering the agent in disable is wrong
What we really want to do here is set a flag that the agent has not been
released yet.  If this is the case we should send the Disconnect call on
disable.
2010-02-12 20:10:29 -06:00
Denis Kenzior 7194bd03a0 Add hfp/ prefix to the path for HFP modems 2010-02-12 19:49:19 -06:00
Denis Kenzior 5d104529f9 Add support for alias changes 2010-02-12 18:42:48 -06:00
Denis Kenzior 8210719201 Set modem name from Bluetooth device alias 2010-02-12 18:30:03 -06:00
Denis Kenzior 546a9fdd14 Fix: Use persistent paths for hfp modems 2010-02-12 18:19:32 -06:00
Denis Kenzior e3016c3bc5 Fix: Store the modem in the uuid hash
The modem is more useful to store than the path, particularly once we
track Aliases
2010-02-12 17:57:20 -06:00
Denis Kenzior 6ec67d79ed Refactor the UUIDs property changed path 2010-02-12 17:52:55 -06:00
Denis Kenzior 9f74296c2b Don't leak user_data in send_method_call_with_reply 2010-02-12 17:51:23 -06:00
Gustavo F. Padovan 4c0790da4f hfp: Don't use Disconnect when agent was released 2010-02-12 17:35:11 -06:00