Commit Graph

1516 Commits

Author SHA1 Message Date
Jonas Bonn f4b8d4d30b ublox: query device model
This patch adds a call to CGMM into the modem_enable path in order to
establish the specific device model.  From this device model string, a
model-specific capabilities structure can be selected.
2019-03-13 16:22:51 -05:00
Jonas Bonn 55bec598b6 ublox: make device selection more flexible
Many ublox modems can sit on either the USB bus or talk directly to a
UART.  The udev plugin mostly takes care of figuring out what ports to
talk to and the protocol is common for all devices after that.

This patch simplifies the setup a bit:
i)  There must always be an aux channel for communication with the modem
ii)  The aux channel may be found behind the string Aux for USB modems
or Device for serial modems
iii)  If the Modem string is set, use it; if not set, assume it's not
available.
2019-03-13 13:22:53 -05:00
Jonas Bonn 4f5ce95d41 ublox: drop vendor type for Toby L2 model 2019-03-13 13:20:43 -05:00
Antara Borwankar cefba0c26f xmm7modem: Change in xmm7mode plugin for multiple PDP
Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
2019-02-13 08:38:18 -06:00
Antara Borwankar fae77b52c6 udevng: Detect multiple network interfaces for xmm7xxx 2019-02-13 08:33:58 -06:00
Pičugins Arsenijs 1b0adea8dd sim800: fix typo in model check code
Fixing a copy-paste error in SIM800 code
that results in a SIM900 modem being
detected as a SIM800 modem.
2019-02-08 14:10:11 -06:00
Khaled Romdhani 4462bde1f2 gemalto: Move atoms to post_online
when the voice call driver is probing, I noticed sometimes
a CME Error with the code = 4 (operation not supported)
related to AT commands "AT+CSSN=1,1" and "AT^SLCC=1".

In the current voice call implementation for Gemalto modems
the ofono_voicecall_create() is called on the gemalto_pre_sim().
The sim is not totaly readed by the module, it is not yet
online which is causing a sporadic problem at driver
intialization also when launching some outgoing/incoming calls.

This change moves the ofono_voicecall_create() to the
gemalto_post_online() to be sure that sim is well registred
and online.  Several other call related atoms are also moved to
post_online state.
2019-01-03 17:13:58 -06:00
Denis Kenzior a10f444a3e xmm7xxx: Various style cleanups 2018-12-13 10:11:00 -06:00
Antara Borwankar 06d16faeda xmm7modem: implemnetation of coexistence functionality
Added coex implementation in xmm7modem plugin
2018-12-13 10:03:05 -06:00
Nandini Rebello 68ea576628 xmm7xxx: Adding case for SIM PIN locked state
Handling the case when SIM PIN is enabled for xmm7xxx modem.
2018-11-27 08:44:07 -06:00
Clement Viel 3f6f108a16 sim800: add sim800 support 2018-11-14 14:33:37 -06:00
Nandini Rebello 157258eb2d udevng: enhance udev detection for intel 7xxx modems
Handle newer 7xxx modem enumeration based on ProductId.
Preserving the previous gen support too.
2018-10-31 14:20:00 -05:00
Denis Kenzior 814f7fc744 gemalto: Use GEMALTO vendor for netreg 2018-10-29 15:03:03 -05:00
Giacinto Cifelli edac159aa5 cinterion: use Gemalto vendor in netreg 2018-10-29 15:01:22 -05:00
Giacinto Cifelli 261a30f799 gemalto: Use Gemalto vendor for LTE atom 2018-10-29 14:59:23 -05:00
Jonas Bonn ab4460690d mbim: remove unused modem data
Neither the Vendor nor Model strings are used by the mbim plugin.
2018-10-29 13:34:07 -05:00
Giacinto Cifelli c8c718a46e gemalto: added voice support
The plugin for Gemalto modems is enriched with all voice-related atoms,
as well as USSD.
All except the voicecall itself are from the atmodem, while the
voicecall is from gemaltomodem.
2018-10-17 17:03:18 -05:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Denis Kenzior 37d856c071 phonesim: Fix memory leak 2018-10-12 13:45:01 -05:00
Antara d9e3329f55 netmon: Enabled netmon atom for xmm7modem plugin
enabling netmon atom to report current serving cell measurements
for xmm7modem
2018-10-09 12:54:27 -05:00
Giacinto Cifelli a5bdf48ca7 mbpi: support for auth NONE
support of 'none' in mbpi:
the default method remains CHAP, but it is overridden by NONE after
parsing the entire key for the apn and detecting no username/password
2018-10-09 10:44:17 -05:00
Giacinto Cifelli a5aa268747 file-provision: support for auth type of NONE 2018-10-09 10:43:31 -05:00
Anirudh Gargi 3317cc6f45 xmm7xxx: enable sms and phonebook support 2018-10-03 11:42:51 -05:00
Pavel Machek 33be5732f1 udevng: Move debug print to more useful place
in setup_gobi()
2018-09-27 17:26:49 -05:00
Giacinto Cifelli 8077e61ee5 gemalto: Use GEMALTO vendor for sms 2018-09-25 09:44:50 -05:00
Giacinto Cifelli 635085b30e gemalto: Use GEMALTO vendor instead of CINTERION
The sim atom is now created with the GEMALTO vendor instead of
CINTERION.  This is because GEMALTO has superceeded CINTERION and the
gemalto plugin will be updated to handle (legacy) modems from cinterion
as well as current gemalto devices.
2018-09-25 09:40:18 -05:00
Anirudh Gargi f2ebcf35d7 udev:fix seg fault in case of vid and pid is NULL
In some case linux report 'driver' as valid yet vid and pid as NULL.
Adding NULL check to prevent seg fault.

Log:
ofonod[23829]: plugins/udevng.c:udev_start()
ofonod[23829]: plugins/udevng.c:enumerate_devices()
ofonod[23829]: plugins/udevng.c:check_usb_device() hub [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() usb [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() usbhid [03f0:034a]
ofonod[23829]: plugins/udevng.c:check_usb_device() usbhid [03f0:034a]
ofonod[23829]: plugins/udevng.c:check_usb_device() usb [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() cdc_acm [(null):(null)]
ofonod[23829]: Aborting (signal 11) [./src/ofonod]
2018-09-10 11:04:11 -05:00
Martin Hundebøll 92a80db13f udevng: fix removal of serial devices
Since the merge of udev.c into udevng.c all cleanup function must handle
both usb devices and serial devices. Add this distinction to
check_remove(), so that is doesn't try to iterate the .serial member as
if it were a .devices list.
2018-08-24 11:26:42 -05:00
Giacinto Cifelli f9cde76095 ublox: Add voicecall support 2018-08-09 11:48:40 -05:00
Christophe Ronco ef3ebe5840 huawei: use VENDOR_HUAWEI quirk on gprs context creation 2018-07-25 14:11:58 -05:00
Denis Kenzior 08796aa391 udevng: Fix SIM900 detection 2018-06-19 12:37:15 -05:00
Denis Kenzior d0ab273615 mbim: Remove useless debug 2018-06-19 12:37:15 -05:00
Denis Kenzior b42bc11d85 gemalto: Whitespace fixes 2018-05-23 09:02:08 -05:00
Varun Gargi 0ee376ccab udevng: remove vendor ID to make it generic for intel modem 2018-05-23 08:55:39 -05:00
James Prestwood 34ff57e083 plugins: fixed crash in udevng
The return value from ofono_modem_register was not being checked. If this fails
the modem object is not setup and causes a crash. This was specifically seen
when using the mbim driver without having configured with mbim support.

Now the modem object gets destroyed properly if the modem registration fails.
2018-05-22 15:39:42 -05:00
Bob Ham 1a8960564e sim7100: Specify vendor ID while creating voicecall driver
This enables the atmodem voicecall driver to handle SIMCom quirks like
not setting AT+COLP=1.
2018-05-14 11:11:18 -05:00
Bob Ham 1d63b1d35f plugins: Add support for SIM7100E by SIMCom
Add support for the SIM7100E modem.  We add a new "sim7100" plugin
because there's no other AT-based modem that has support for both GPRS
and voice calls.
2018-04-30 11:17:47 -05:00
Mark van der Putten ac96c726f2 gemalto: signal sim initialized
Modem type PLS8-E, firmware 03.017
2018-04-23 13:46:44 -05:00
Jonas Bonn c0527a211c gobi: Update to the new version_list changes 2018-04-04 09:59:53 -05:00
Bassem Boubaker db9b292f92 gemalto: Clarify supported modem family name
Some gemalto modem family share almost the same base except some very
specific AT command and some hardware changes like ALSx and PXSx family
2018-03-19 12:11:12 -05:00
Mariem Cherif 1c83dc18c4 gemalto: handle sim is inserted or removed URCs 2018-03-19 12:08:52 -05:00
Gabriel Lucas 50ad43dbe5 gemalto: support ALS3 in gemalto's plugin
Force serial port opening options
Wait for modem to be ready to start
initializing it
Handle LTE
2018-03-19 10:24:02 -05:00
Bassem Boubaker 76b5a4044f gemalto: Add more details in setup_gemalto comment
ALS3, PLS8-E and PLS8-X have same vid/pid with same enumeration process
2018-03-16 12:39:56 -05:00
Gabriel Lucas 245d6a8a77 gemalto: add detection of ALS3 modem
The product ID is added to the list of
modems to be detected by Ofono.
The gemalto plugin is used to handle the
ALS3 modem.
2018-03-15 11:54:33 -05:00
Denis Kenzior 5d346349fb plugins: Update to the new LTE API 2018-03-12 09:37:58 -05:00
Jonas Bonn 12a943866a gobi: add LTE atom
This atom needs to be created in post_sim so that the APN can be
written to the default profile before the modem attempts to use the
setting to connect to the network.
2018-03-05 11:32:47 -06:00
Christophe Ronco 1df92289d4 udevng: Add modem string SystemPath 2018-02-20 11:09:25 -06:00
Slava Monich 0797b23c5d dbus: Use dbus_validate_path
Instead of __ofono_dbus_valid_object_path
2018-01-18 10:53:28 -06:00
Alexander Couzens 439524211d plugins/gobi: reset the qmi interface when enabling the modem 2017-12-05 22:04:15 -06:00
Denis Kenzior 44acd97dd9 mbim: Keep track of max_sessions
Also set the CID range 0..max sessions.  This forces the default context
into cid 0
2017-11-13 21:24:37 -06:00
Denis Kenzior a4a7e19379 mbim: Instantiate gprs-context atom 2017-11-13 21:24:37 -06:00
Denis Kenzior fcd419e2ea mbim: Add gprs atom 2017-11-13 21:24:37 -06:00
James Prestwood c4bb058e40 plugins: updated plugins using simauth module
The simauth creation API changed to not take the driver structure
2017-11-09 11:56:08 -06:00
Denis Kenzior 6a3888b2d4 xmm7xxx: Use sim_initialized_notify 2017-11-08 21:41:34 -06:00
Denis Kenzior b3a3d72825 ifx: Use sim_initialized_notify 2017-11-08 21:41:34 -06:00
Denis Kenzior 63341a1f09 telit: signal sim initialized 2017-11-08 21:41:34 -06:00
Denis Kenzior d9fb0eaa57 ste: signal sim initialized on EPEV 2017-11-08 21:41:34 -06:00
Denis Kenzior 0b514affee mbm: Signal sim initialized on EPEV 2017-11-08 21:41:34 -06:00
Denis Kenzior 8b98126da5 mbim: Set the subscribe list
Some devices don't seem to enable incoming SMS notifications.  So set
the notifications we're interested in at modem startup.
2017-11-08 21:41:34 -06:00
Denis Kenzior 2bb8feab07 mbim: Add sms atom 2017-11-08 21:41:34 -06:00
Denis Kenzior 79f5fc6207 mbim: Turn radio off before disabling 2017-11-08 21:02:22 -06:00
Denis Kenzior b9355ca392 mbim: Add netreg atom 2017-11-08 21:02:22 -06:00
Denis Kenzior 2ce556cb73 udevng: Save off MBIM modem's VID/PID 2017-11-08 21:02:22 -06:00
Gabriel Lucas 3a7a4d7ae6 gemalto: add PIN retries support in plugin
In SimManager, the Retries property isn't used for gemalto modems.
The at command AT^SPIC is used to get the remaining retries left
for the current required password type.

This commit enable the use of the driver in the gemalto plugin
2017-11-07 09:57:10 -06:00
Denis Kenzior 2dd64cda80 mbm: Add sim-auth 2017-10-26 10:23:47 -05:00
James Prestwood 472d84386f phonesim: Added sim-auth to phonesim plugin 2017-10-12 15:33:46 -05:00
James Prestwood 6105412d09 xmm7xxx: add sim-auth driver to xmm7xxx plugin 2017-10-12 15:33:43 -05:00
Denis Kenzior b7c768c74a mbim: Set device online and offline properly
At initialization time set the radio off and implement .set_online
to toggle the radio state.
2017-10-09 20:35:51 -05:00
Denis Kenzior 187b0840d6 mbim: Add sim atom to mbim modem driver 2017-10-09 16:37:57 -05:00
Ankit Navik 14031eabb5 xmm7modem: Add support for ims 2017-10-09 12:07:23 -05:00
Clayton Craft c33c567ef6 nokia-gpio: do not create links to gpios in /dev/cmt
The nokia-gpio plugin should not try to create symlinks to relevant gpio
pins under /dev/cmt, since the location it is looking is no longer
correct on newer kernels and it might change again in the future. This
patch removes code from nokia-gpio that tries to create a symlink.

Users will now need to symlink the modem gpios to /dev/cmt themselves.
On the 4.13 kernel, this can be done by, for example, adding a udev rule
to:
 # ln -sf /sys/bus/hsi/devices/n900-modem /dev/cmt
2017-10-05 11:32:59 -05:00
Richard Röjfors 5b4539fd9a ublox: Disable DCD to avoid HUP when leaving data mode.
The HUP results in errors in gatio which will deref parts
of the AT channel. This makes it impossible to recover and
send further AT commands after the HUP.
2017-10-05 11:20:05 -05:00
Denis Kenzior ab17a278c6 mbim: Instantiate devinfo atom 2017-10-05 11:08:38 -05:00
Denis Kenzior 09eed88553 mbim: Add basic enable/disable 2017-10-05 11:08:38 -05:00
Denis Kenzior e7597bcae2 mbim: Parse MBIM descriptors
This is needed to find out the maximum fragment size that this device
supports.  The minimum length specified in the spec is 64, however 512
bytes is recommended.

We also attempt to parse how many simultaneous commands can be
outstanding at a given time.  In theory MBIM supports multiple
outstanding commands through the use of transaction-id matching, but it
seems some devices only support a single outstanding command at a time.
2017-10-05 11:08:38 -05:00
Denis Kenzior 868ce1536b udevng: Store MBIM descriptors file 2017-10-05 11:08:38 -05:00
Denis Kenzior 4a6007ba2d udevng: Add basic detection for MBIM
Currently only Telit LN930 has been tested to work
2017-10-05 11:08:38 -05:00
Denis Kenzior 649d204158 mbim: Add skeleton mbim modem driver 2017-10-05 11:08:38 -05:00
Ankit Navik 215a6a1df3 udevng/xmm7xxx: Allow to detect xmm7xxx series modems
The Intel xmm7xxx series modem uses id as 8087:0930
2017-09-13 10:30:08 -05:00
Ankit Navik 66aa34b37e Add support for Intel xmm7xxx series modems
This adds plugin for xmm7xxx series modems
2017-09-13 10:30:01 -05:00
Jonas Bonn e267da8bc4 gobi: create NetworkMonitor atom 2017-09-12 12:53:05 -05:00
Joey Hewitt a7007fd0c3 gobi: enable message waiting atom 2017-09-12 12:44:55 -05:00
Jonas Bonn dd3a4768b0 udev: isi modems do not use 'Device' property
Neither the n900 nor u8500 drivers use this property so there's currently
no need to set it in the setup function.
2017-09-12 12:28:36 -05:00
Jonas Bonn 29c5cd238b udev: fixes for detection of non-USB modems
This patch fixes up some fallout from the merging of the udev and udevng
modules.

i)  The 'serial' modems in question are not necessarily serial modems at
all; for example, the N900 ISI modems appear as network devices and don't
have a devnode.  This patch relaxes the requirement that a devnode exist.

ii)  The modem driver was being set to 'legacy', which is a remnant of
an earlier approach to merging these modules.  The driver needs to be
properly set to the value of the OFONO_DRIVER property in order for the
setup function to be found.

iii)  The serial modem's private data was being added to the modem
structure incorrectly...

In particular point iii) above shows that there is essentially nobody
using these devices which makes modifications in this area tricky.
2017-09-12 12:28:36 -05:00
Clayton Craft 995eaca514 plugins: Fix compilation on armhf/Musl
The following patch is needed to successfully build ofono on armhf with
musl (in place of libc)
2017-09-08 12:09:54 -05:00
Jonas Bonn 1f5aa70b53 udev: fix quectelqmi gps interface
Using location-reporting requires both the 'aux' and 'gps' interfaces;
the GPS interface is interface 1, not 2.
2017-09-08 11:05:45 -05:00
Alexander Couzens 4e495ab7f4 plugins/udevng: use else if instead of if
The same variable is checked in two `if's.
2017-09-07 16:52:43 -05:00
Alexander Couzens 0b10110a87 udevng: use first cdc-wdm interface for sierra qmi
Using the voice firmware on a mc7304 the modem
stopped accepting qmi messages on the second
cdc-wdm interface.
2017-09-07 16:44:40 -05:00
Alexander Couzens a0a95be334 plugins: Remove AllowedAccessPoints interface
Without this patch, a modem that has been removed still shows the
AllowedAccessPoints interface
2017-08-07 13:47:20 -05:00
Marcel Holtmann a78ceff29c ril_intel: Fix wrong pointer derference for power status 2017-07-11 10:47:11 -07:00
Marcel Holtmann 7756e3700f ublox: Add missing break statement 2017-07-11 10:46:39 -07:00
Marcel Holtmann 88ef01ea97 u8500: Add missing fall through statement 2017-07-11 10:46:13 -07:00
Vincent Cesson 940db06cbd gemalto: Implement HardwareMonitor method
Use Gemalto commands ^SCTM and ^SBV to monitor temperature and voltage.
Use a single method GetStatistics to read and return both values.
2017-05-17 11:28:43 -05:00
Vincent Cesson 5e6770e38e gemalto: Prepare new interface for hardware monitoring
Gemalto modems have hardware related commands, allowing to monitor voltage
and temperature. These parameters will be accessible on DBus interface:
org.ofono.HardwareMonitor.

 - Create the DBus method table with one entry: GetStatistics. This method
would return temperature and voltage values.
 - Create a dedicated structure to handle the DBus methods.
 - Create enable/disable functions to handle DBus interface registration.
2017-05-16 13:13:48 -05:00
Alexander Couzens eef98e7a3f plugins/gobi: add the qmi type to the debug output of discover_cb() 2017-05-04 12:39:02 -05:00
Alexander Couzens fe8fa75691 udevng/gobi: allow to detect ec20 tty devices
The Quectel EC20 uses the same usb id as some gobi 2000 modules (05c6:9215).
2017-05-04 12:38:58 -05:00
Alexander Couzens 3b5aedc8ab udevng/gobi: use subsystem as first identification
Using kernel 4.10 with systemd 232 on archlinux the detection of
a gobi 2000 doesn't detect the qmi/cdc-wdm interface.

The device is detected as follows:

[devnode interface number label sysattr subsystem]
/dev/cdc-wdm1 255/255/255 00 (null) (null) usbmisc
wwan1 255/255/255 00 (null) (null) net
/dev/ttyUSB5 255/255/255 01 (null) (null) tty
/dev/ttyUSB6 255/255/255 02 (null) (null) tty
/dev/ttyUSB7 255/255/255 03 (null) (null) tty
2017-05-04 12:37:51 -05:00
Alexander Couzens cab919d699 udevng/gobi: improve debug output
Add info->sysattr and info->subsystem to the log message.
2017-05-04 12:37:34 -05:00
Luiz Augusto von Dentz 94839129d9 hfp_hf_bluez5: Rework code handling device changes
This splits the handling of device changes and modem registration so
they can be uses separately.
2017-05-04 12:34:31 -05:00
Luiz Augusto von Dentz cc41a2a4c0 hfp_hf: Handle ServicesResolved signal
This adds handling for ServicesResolved signal which tells when BlueZ
is done resolving the device services so the code will no longer ignore
devices that got its services resolved after Paired signal.
2017-05-01 10:45:25 -05:00
Luiz Augusto von Dentz bf005f5599 hfp_hf: Fix not creating modem during NewConnection
In case the UUIDs are not updated, as they are still being resolved, when
Paired property changes a modem will never be registered.

In order to fix this problem allow modems to be registered directly
during NewConnection.
2017-05-01 10:45:25 -05:00
Vincent Cesson ea0dfcc4ab gemalto: Set vendor for sms atom 2017-04-21 11:02:16 -05:00
Jonas Bonn e52d224d9a Add support for Quectel EC21/25 modems
This follows the same pattern as the Telit QMI modems, routing the
setup through a QMI driver.  I think this can be cleaned up somehow,
but for now this at least provides support for these two modem models
so that others can aid in testing.
2017-04-20 12:45:11 -05:00
Vincent Cesson 9cc3eaabf9 gemalto: Use sim_state_query for sim detection
Populate gemalto_data structure.
Add sim_state callbacks.
Fix enable/disable return value.
2017-04-20 12:43:28 -05:00
Vincent Cesson 920f77b770 gemalto: Change offline mode, keep USIM available
Gemalto has two airplane mode:
CFUN=0 disables USIM
CFUN=4 keeps USIM connected
2017-04-13 11:56:27 -05:00
Vincent Cesson 160a03e2bf gemalto: Clean post init functions
Remove inappropriate interfaces.
Move GPRS init from post_online to post_sim.
2017-04-13 11:55:15 -05:00
Jonas Bonn 174eddc80d udevng: remove 'option' driver setup
No driver named 'option' exists so this device can never be instantiated.
2017-03-31 18:15:19 -05:00
Jonas Bonn ed66682315 plugins: remove udev module
This functionality has been moved into the udevng module and was
already disabled in an earlier patch.
2017-03-29 09:56:32 -05:00
Jonas Bonn bf20f0df18 udevng: get properties from interface
Device properties are generally on the device, on the USB interface
descriptor, or the on the USB device descriptor.
2017-03-29 09:56:28 -05:00
Jonas Bonn 1b28cb5cc6 udevng: hook up legacy devices
...and disable old udev code by shorting it out in it's init() function.

The check_device function is augmented to differentiate between USB
and serial devices:

- if the device sits on a USB bus, the device is handled as before
- if not, an attempt is made to handle the device as a serial device
2017-03-29 09:55:51 -05:00
Jonas Bonn 90c8885f4f udevng: match on the hsi subsystem for legacy devices 2017-03-29 09:55:33 -05:00
Jonas Bonn 3ac449e25f udevng: add serial device handling functions
This adds, but does not hook up, support for simple serial modems.  These
modems generally have only a single device node so are simpler than the
USB devices which generally have different device nodes for different
functions.  These modems are currently handled by udev.c, but this
functionality will allow to remove that module completely in a later patch.

- A new "device_info" type is created called serial_device_info
- the function add_serial_device sets up a modem_info structure and a
  serial_device_info for the device
- A reference to the device's udev node is saved in the device info
- The device driver is retrieved from the OFONO_DRIVER environment variable
  which needs to be set up by some udev rule
- Setup functions are added for these types of devices: a common function
  setup_serial_modem covers the generic (simple) case, whereas modems
  with special requirements are given their own setup functions to handle
  the special bits
- Modem destroy needs to know the "device_info" type in order to clean
  up properly, so a 'type' value is set on the modem_info structure to
  guide selection of the proper cleanup function
2017-03-29 09:53:48 -05:00
Lukasz Nowak e1f42cb68a udevng: add Telit LE910 V1 support
Tested with LE910-SVG and Verizon.
2017-03-26 22:41:50 -05:00
Jonas Bonn 36be849043 udev: remove extraneous subsystem check
The enumeration construct is already set up with matches for these
subsystems.
2017-03-26 21:21:43 -05:00
Jonas Bonn 8c30bcf576 udev: simplify wavecom modem registration 2017-03-26 21:21:18 -05:00
Jonas Bonn 43e2be3574 udev: simplify ifx modem registration 2017-03-26 21:20:56 -05:00
Jonas Bonn 3c16db19e2 udev: add common modem registration code
Many of these drivers do exactly the same setup when registering
the modem.  Consolidate these setup functions into common code.
2017-03-26 21:19:46 -05:00
Jonas Bonn 55a4bbf7e3 udev: simplify add_modem
Adding a modem boils down to finding the device in the hierarchy with
the OFONO_DRIVER property.  The original code special-cased the property
being on the device itself rather than on a parent device.  This patch
combines the two cases.
2017-03-26 21:17:58 -05:00
Jonas Bonn 5a2591ce4d udev: remove unused modem property
The property 'Registered' is not used anywhere.
2017-03-26 20:50:50 -05:00
Jonas Bonn 428fdc7fb6 udev: get udev property via lib function 2017-03-26 20:50:36 -05:00
Jonas Bonn 0df3231f7f udev: remove extraneous subsystem check
The udev-monitor already guarantees that only devices with these
subsystems will be returned so we don't need to check again.
2017-03-26 20:49:34 -05:00
Jonas Bonn dd1e441966 ofono.rules: remove 'change' action
The code doesn't do anything with this action so don't bother setting
extra device properties for it.
2017-03-26 20:44:52 -05:00
Jonas Bonn 03e1ec2f66 udevng: simplify logic in check_usb_device
This patch simplifies and cleans up the check_usb_device function a bit
by doing the two following (slightly intertwined) things:

1)  The parent "usb_device" is searched for early in this function and this
device will always have the ID_VENDOR_ID and ID_MODEL_ID properties.
As such, we can get them from this device and thereby be certain that
we _always_ have them available.

2)  The logic of iterating the vendor_list table is cleaned up.  It's
easier to follow and won't be any less efficient.
2017-03-26 20:42:27 -05:00
Jonas Bonn b3b0cbb045 gobi: query presence of WDA service 2017-03-25 16:01:45 -05:00
Lukasz Nowak 988cec2fc2 gobi: Do not use low-power modes for some modems
Telit QMI modems have a problem with the low-power operating modes.
After entering and leaving such a state, UIM service does not return.
The sim card is still marked as powered-down. The QMI interface does
not have a way to power it back on.

To avoid this, keep modems with the "AlwaysOnline" flag online
in the disable-modem and offline-modem procedures.
2017-03-24 09:59:34 -05:00
Christophe Ronco 26aba4612c huawei: reopen modem channel if it disconnects
On E3372 after a GPRS disconnection, modem AT channel (used by PPP) gets
disconnected (G_IO_HUP and G_IO_ERR are detected in received_data
in gatio.c).
After that all connection attempts fail because we are not able to send
any AT commands on modem channel (it is closed).

With this patch, when this behavior is detected, we close gprs context
driver, reopen AT channel and gprs context driver.
2017-02-21 11:13:51 -06:00
Christophe Ronco 94fd4d804d provision: add plugin to provision from config file
This plugin allows to provision gprs-context data based on MCC and MNC.
This is useful when provisioning using mbpi fails (either because you
are using a private APN or because there are multiple internet type context
for your operator in mbpi database).
Config file is STORAGEDIR/provisioning.
Config file should look like that:
[operator:MCC1,MNC1]
internet.AccessPointName=apn1
internet.Username=myUsername
internet.Password=myPassword
internet.AuthenticationMethod=pap
internet.Protocol=ipv6
[operator:MCC2,MNC2]
internet.AccessPointName=apn2

The only mandatory parameter for each operator is internet.AccessPointName.

Parameter description:
internet.AccessPointName: APN
internet.Username: Username
internet.Password: Password
internet.AuthenticationMethod: authentication method.
 Possible values are:
  - pap
  - chap
 Default is chap if unset.
internet.Protocol: protocol
 Possible values are:
  - ip: ipv4
  - ipv6
  - dual
 Default is ip if not set.

All parameters are prefixed with internet to be able to extend this plugin
to other type of contexts (MMS, ...).
2017-02-21 11:08:27 -06:00
Piotr Haber 69c67fce7f telit: register SIM if it goes straight to ready
SIM without PIN goes straight to state 3 (INSERTED and READY)
on some modem/firmware versions.
2017-02-08 10:55:09 -06:00
André Draszik 177e39e44b plugins: telit: send AT&C0 on both channels
At least firmware version 12.00.405 on the UE910-EUR otherwise
closes the AT command port whenever the PPP connection is
dropped, and we'd be left in a funny state.
2017-02-07 10:58:07 -06:00
Antara Borwankar 61453d8688 ril_intel: Add support for stk 2017-02-07 10:56:57 -06:00
Piotr Haber 3ae33b2dd6 telit: add support for UE866 2017-02-02 11:58:51 -06:00
Piotr Haber 5c0a8e531e udevng: unify telit and xe910
Unified setup for Telit devices using
usbserial and cdc_acm drivers.
2017-02-02 11:58:13 -06:00
Piotr Haber ccd49f3fe6 plugins: rename xe910 to telit
Unify old telit and xe910 plugins.
Dropping support for Bluetooth SAP.
Add support for UC864 family.
2017-02-02 11:51:19 -06:00
Piotr Haber 6e4bf596e9 xe910: support for Telit LE910V2 modem
LE910V2 is next generation Telit LTE modem.
It supports 3GPP Rel. 9 LTE Cat. 4 over multiple bands.
2017-01-27 20:37:05 -06:00
Piotr Haber 0a7e4c0716 udevng: setup of Telit LE910V2
Setup LE910V2 in default USB composition (1bc7:0036)
with 6 CDC-ACM serial ports and 1 CDC-NCM network adapter.
2017-01-27 20:22:59 -06:00
Piotr Haber a88aaaac17 plugins: Handle HE910 and UE910 variants
Telit modems HE910 and UE910 share the same USB
vendor and device IDs (1bc7:0021) but they are
different devices.
HE910 is HSPA Class 14/6 and UE910 is Class 8/6.
Both come in voice-enabled variants.
HE910 also comes in variants with built-in GPS.
2017-01-26 13:29:40 -06:00
Piotr Haber 36d18310df plugins: rename he910 to xe910
In preparation for more generic support
of Telit xE910 family.
2017-01-26 13:10:18 -06:00
Vincent Cesson 8d330087cf gemalto: Add location reporting support 2017-01-19 13:34:45 -06:00
Vincent Cesson e8c80cbe8b udevng: complete gemalto setup
Complete the Gemalto setup with cdc_wdm and qmi,
so all enumerated devices are associated with gemalto.
2017-01-18 20:19:17 -06:00
Vincent Cesson 92c4b831dc udevng: Add Gemalto P-family detection
Add a new function setup, based on telit, to handle Gemalto P-family
discovery. The setup looks for USB interfaces:
application=/dev/ttyUSB2
gps=/dev/ttyUSB1
modem=/dev/ttyUSB3
2017-01-16 22:25:16 -06:00
Vincent Cesson 85c49528d0 plugins: Add Gemalto plugin for Cinterion P-family
Actual cinterion plugin is not compliant with newer Gemalto modems.
Gemalto plugin is based on cinterion with a custom struct to handle the
interfaces Application and Modem.
2017-01-16 22:25:16 -06:00
Christophe Ronco 4b38259a6f udevng: Sierra modems use SIM driver 2017-01-10 11:26:23 -06:00
Antara Borwankar 343f8cb48a ril_intel: changes for lte modem
plugin modified to bring up lte atom and set MODEM_PROP_LTE_CAPABLE
to TRUE
2016-12-12 21:34:17 -06:00
Antara Borwankar dc1f7bf67e ril_intel: renamed ril_sofia3gr to ril_intel
renamed ril_sofia3gr.c to ril_intel.c
2016-12-12 21:34:02 -06:00
Djalal Harouni ee0ca53a33 ubloxmodem: register and initialize the netmon driver 2016-12-01 11:22:31 -06:00
Dragos Tatulea 919e0b95ac plugins: ublox: enable lte driver for tobyl2 2016-11-15 13:46:04 -06:00
Kuba Pawlak de58109933 bluez5: fix crash on DBus transport disconnection
Do not register dbus notification if message failed to be sent out
because transport was already disconnected
2016-11-10 10:18:26 -06:00
Frédéric Dalleau 3079ccad45 udevng: Detect huawei E3372 modem and pcui
When the modes are modified with AT^SETPORT="FF;12,1,16", this modem
and pcui will appear using different ids. Update the interfaces
identifier accordingly.
2016-09-29 10:59:21 -05:00
Frédéric Dalleau 1978934740 udevng: Detect huawei E3372 pcui
The huawei E3372 exposes two USB tty at /dev/ttyUSB0 and /dev/ttyUSB1
/dev/ttyUSB1 is properly detected as modem.
/dev/ttyUSB0 is the pcui.

lsusb shows 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
2016-09-29 10:58:47 -05:00
Ankit Navik b1baea9830 ril_sofia3gr: use vendor modem power down command 2016-07-07 11:59:47 -05:00