summaryrefslogtreecommitdiff
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* plugins: quectel: re-organize code for ussd & lte initAlexandru Ardelean2023-02-131-2/+14
| | | | | | | The BG95 modem (family) supports LTE, but not USSD. So, we'll split the init of the LTE separately, and add a helper function (called quectel_model_supports_lte()) which will return true if the modem supports LTE.
* quectel: fixing EC200T modem initializationSergei Golubtsov2022-09-061-1/+6
| | | | | EC200T doesn't indicate that the Phonebook initialization is completed (==4) if AT+CFUN=4
* file provision plugin: use CHAP auth by defaultSergei Golubtsov2022-09-061-1/+1
| | | | 3GPP mandated CHAP to be used as the default
* mbpi: switch to auth NONE if other options cannot be usedSergei Golubtsov2022-09-061-0/+4
| | | | | If a user name or user name together with a password for an AP are not provided the NONE auth method should be used
* Revert "mbpi: support for auth NONE"Sergei Golubtsov2022-09-061-6/+0
| | | | This reverts commit a5bdf48ca7be70a9b33a47dae0ea03bf842efdd2.
* quectel: get devinfoSean Nyekjaer2021-12-061-0/+2
| | | | | | | Quectel devices returns "Revision:" before the manufacture and revision. Via dbus: "Manufacturer" s "Revision: MTK 0828" "Revision" s "Revision: M95FAR02A08"
* plugins: gemalto: move ussd atom to post_onlineSergey Matyukevich2021-07-151-2/+2
| | | | | Gemalto modem does not allow to enable Supplementary Service during post_sim stage. So move ussd atom to post_online stage.
* plugins: gemalto: add radio-settings atomSergey Matyukevich2021-07-151-0/+2
| | | | Instantiate Gemalto radio-settings atom in post_sim.
* plugin: gemalto: enable netmonSergey Matyukevich2021-01-151-0/+6
| | | | Enable netmon functionality for Gemalto ELS81x modems.
* quectel: adding support for the Quectel EC200 USB modem seriesSergei Golubtsov2021-01-072-49/+85
| | | | | | Support for the Quectel EC200 USB modem series has been added. The model identification AT command has been added as the first step in the communication with a Quectel USB modem.
* plugin: gemalto: fix source of gprs notificationsSergey Matyukevich2020-12-221-1/+1
| | | | | | Modem USB interface does not receive certain gprs context notifications. Fix gprs chat: use Application USB interface to receive all the modem notifications.
* quectel: Power on/off with a gpio pulseLars Poeschel2020-10-062-2/+48
| | | | | | | | | | | | | | | | | | | | | | Current implementation uses a gpio level of 1 for powering on quectel modems using a gpio and a level of 0 for powering off. Normally quectel modems are powered on or off by a gpio pulse on their PWR_KEY pin. They turn on by the first pulse and turn then off by the next pulse. The pulse length varies between different modems. For power on the longest I could in the quectel hardware is "more than 2 seconds" from Quectel M95 Hardware Design Manual. For Quectel EC21 this is ">= 100 ms". For Quectel MC60 this is "recommended to be 100 ms". For Quectel UC15 this is "at least 0.1 s". For power off the four modems in question vary between a minimum pulse length of 600-700ms. This implements a 2100ms pulse for power on and 750ms for power off. If you have some special circuitry that powers your modem by gpio level and you need the old behaviour, you can switch to gpio level powering by setting environment variable OFONO_QUECTEL_GPIO_LEVEL. The gpio goes to high level for the modem to power on and to low level if it should power off.
* quectel: Extend power-on timeoutLars Poeschel2020-09-291-2/+2
| | | | | | | More complicated modems emerge and they need longer start-up times. An EC21 takes about 13 seconds to boot up. This is slightly longer than the 20 * 500 ms we have at the moment. This extends the retries to 30, so we have 30 * 500 ms and this does successfully power up an EC21 modem.
* droid 4: Add probing.Pavel Machek2020-09-152-0/+237
| | | | Probe Droid 4 modem. This should result in basic support working.
* xmm7xxx: Fix non compiling fileLars Poeschel2020-09-081-1/+0
| | | | | | | | CC plugins/xmm7xxx.o ../plugins/xmm7xxx.c:63:10: fatal error: dbus.h: No such file or directory 63 | #include "dbus.h" | ^~~~~~~~ compilation terminated.
* plugins: gemalto: alternative gprs-context driverSergey Matyukevich2020-08-191-1/+11
| | | | | Use alternative gprs context driver for gemalto modems that provide USB ethernet interfaces for data path.
* plugins: udevng: detect gemalto network interfacesSergey Matyukevich2020-08-191-3/+11
| | | | | | Some gemalto modems, including ELS81x, may provide more than one USB ethernet interface. Detect and save both network interfaces rather than only the last one.
* xmm7xxx-enable-esim-feature-in-xmm_ofonoShweta Jain2020-08-131-0/+391
|
* atmodem: Get strength and tech the quectel way on EC21Lars Poeschel2020-08-111-1/+1
| | | | | | | | | | I had some trouble getting network strengh and access technology the standard way on Quectel EC21. It does work - but only kind of. I did not get URCs when I am sure I should. This way through CIEV, CIND and CMER is also not documented in Quectel documentation, so I suspect this to be unsupported. This is now changed to the "quectelish" way of gettings those values and this does work more fine-grained and reliable on the Quectel EC21.
* Add a vendor OFONO_VENDOR_QUECTEL_EC2XLars Poeschel2020-08-111-1/+1
| | | | | | | The distinction between OFONO_VENDOR_QUECTEL and OFONO_VENDOR_QUECTEL_SERIAL does not suffice for EC21/EC25 in some places, so introduce and use a new vendor: OFONO_VENDOR_QUECTEL_EC2X
* quectel: Try to update voltage only, when received "vbatt"Lars Poeschel2020-08-071-3/+5
| | | | | | | | | | As there are some more sources of +QIND: activated, do now only update voltage when we get the +QIND: "vbatt",-1 but not on things like +QIND: "act","LTE" or +QIND: "csq",20,99
* quectel: Set URC port to uart1 on EC21Lars Poeschel2020-08-071-2/+4
| | | | | | Set the URC port of the Quectel EC21 to uart1 when it is used through it's serial port. This setting is saved to non-volatile storage by the modem automatically.
* Revert "quectel: EC21 needs aux channel to be the first mux channel"Lars Poeschel2020-08-071-47/+14
| | | | | | | | | | | | | | This reverts commit 1868dbf2b3e5929a7081b03a8ff76d214fd38624. Development for this was done on EC21 firmware version EC21EFAR06A01M4G_BETA0318. It now turns out, that actual release firmware versions for this modem again need the original mux order with aux channel as the second mux channel. (We know for sure for firmware version EC21EFAR06A03M4G.) We do not know for sure when and for what firmware versions quectel did the switch back on the mux order, but we suspect that the "BETA" firmware is the only one with the reversed mux order. This "BETA" firmware was only given out for development purposes and will not appear "in the wild", so we revert the patch here and hope for the best.
* udevng: Add support for Quectel BG96 modemSean Nyekjaer2020-07-131-0/+2
|
* plugins: gemalto: enable LTE for ELS81xSergey Matyukevich2020-06-291-1/+4
| | | | Enable LTE atom for Cinterion ELS81x modems.
* plugins: udevng: detect Centirion ELS81x modemSergey Matyukevich2020-06-291-0/+2
| | | | Enable detection of Centirion ELS81x modem.
* huawei: send restore settings command on startupJimmy Gysens2020-06-251-0/+4
| | | | | | | | When initializing a Huawei device, send the AT&F0 command to restore the default AT settings on device restart. Huawei stores all APN settings, which can cause issues when changing the APN. The AT&F0 command makes sure the device starts from a clean state.
* quectel: EC21 needs aux channel to be the first mux channelLars Poeschel2020-05-261-14/+47
| | | | | | | | | The Quectel EC21 does only work correctly, if the mux channel used for aux is the first mux channel. It does only put it's URC messages in the first mux channel, so this has to be the aux channel in our case. To be flexible on the mux order we introduce two arrays here, that then contain the initialization data in their needed order. Initialization data is then applied by for-looping over this array.
* quectel: EC21 add ussd with atmodem driverLars Poeschel2020-05-211-1/+3
|
* quectel: EC21 does not understand AT+QIURCLars Poeschel2020-05-211-2/+8
| | | | | Because the Quectel EC21 does not understand the AT+QIURC command, we leave that out during initialisation.
* quectel: Query the model before setting up the muxLars Poeschel2020-05-211-43/+43
| | | | | | This is a change for the EC21. It will require specific handling before and right after setting up the mux. So this change prepares this. It queries the modem model before the mux (CMUX) is activated.
* quectel: use lte atom on EC21Lars Poeschel2020-05-211-0/+3
|
* quectel: Add Quectel EC21 to known serial modemsLars Poeschel2020-05-211-1/+8
| | | | | This adds the Quectel EC21 to the known modems of the quectel driver and therefore allows to use it with its serial interface.
* allowed-apns: Do not try to unregister unnecessarilyDenis Kenzior2020-02-071-0/+6
| | | | | | | | | allowed-apns plugin will try to uregister the AllowedAccessPoints interface whenever the sim state changes, even when not registered. This results in the (benign) error being printed inside ofono_modem_remove_interface: Interface org.ofono.AllowedAccessPoints not found on the interface_list
* xmm7xxx: modified handling of XSIM states for xmm modemsAntara Borwankar2019-12-201-12/+12
| | | | | | | | | | | | | +XSIM:7 state as defined in xmm7560 functional AT specification only indicates ready for attach. +CPIN: READY is received after SIM is completely initialized. Also indicating readiness of Phonebook and SMS. Hence moving the creation of SMS and Phonebook atom to xmm7xxx_post_sim function. +XSIM:4 PUK needed state was not handled. It must be handled same as PIN needed state. Added handling of this case to switch_sim_state_status function.
* huawei: Fix infinite loop on modem removalJimmy Gysens2019-11-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After unplugging a Huawei USB dongle, the 'atoms' in oFono are removed via 'flush_atoms'. Every atom has a destruct function pointer, used as destructor. This includes the gprs_context atom that is currently active. The function calls are: flush_atoms -> destruct -> gprs_context_remove -> at_gprs_context_remove -> modem_disconnect Because the device is physically removed, the IO channel for the AT port is gone. In 'at_gprs_context_remove', there is an attempt to resume communication over that AT port, but that is not possible. This is detected, and 'io_disconnect' (pointer to 'modem_disconnect') is called. 'modem_disconnect' has the same atom and tries to remove it again, so it calls the same destructor. This continues infinitely. This patch moves the GPRS context removal so that it only happens if the modem port could be re-opened successfully. If the port cannot be re-opened (in the case of modem removal), the atom is already in the process of being removed by the process kicked off in flush_atoms. This fix is limited to Huawei devices and has been tested using the following devices: - E3531i-2 - E3372 - E3531s-2 - E369 - E1552
* xmm7xxx: Remove unreachable statementDenis Kenzior2019-11-131-2/+0
|
* udevng: Support quectel MUX settingsMartin Hundebøll2019-10-111-0/+5
|
* quectel: support both internal and n_gsm muxesMartin Hundebøll2019-10-111-42/+161
| | | | | | | | | | | | | | | The in-kernel implementation of gsm0710 causes deadlocks in the kernel[1], so switch the default back to the user-space implementation in ofono. The change also removes the timeout-callback used to defer disabling the n_gsm line discipline, as that is no longer needed[2] To enable use of the kernel line discipline, add an udev env entry with OFONO_QUECTEL_MUX="n_gsm". [1] https://lore.kernel.org/lkml/4b2455c0-25ba-0187-6df6-c63b4ccc6a6e@geanix.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7030082a7415d18e3befdf1f9ec05b3d5de98de4
* quectel: rework sim detectionMartin Hundebøll2019-10-111-161/+94
| | | | | | | | | | | | | | | | | | | | | | Use at_util_sim_state_query_new() to query the sim inserted state. Once that returns, the locked state is queried by issuing a AT+CPIN? command. If not locked, a timer is started to query the quectel init status of the sim. Once the init status is ready, the sim atom is created, and the modem is set to powered, and the sim is signaled both inserted, and initialized. If locked, the modem is set to powered, and the sim atom is created. This allows users to enter the pin to unlock the sim. Once the sim is unlocked, a +CPIN: READY indication is caught to query the quectel init status. Once the init status is ready, the sim is signaled initialized. All the above is needed, because the modem indicated +CPIN: READY before the sim is really ready. The only way to be certain, is to wait for the quectel init status to be ready. Even signaling the sim inserted prematurely can cause to modem to hang during the initial AT+CRSM commands.
* udev: Adding PCIe as a subsystem in udevAntara Borwankar2019-09-301-43/+135
| | | | Adding support for enumerating PCIe types of modems in ofono
* quectel: remove leftover reset of wakeup commandMartin Hundebøll2019-09-261-1/+0
|
* ublox: rework device initialization sequenceJonas Bonn2019-09-251-14/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uBlox devices present their USB interfaces well before those interfaces are ready to respond to any commands. The documentation says to monitor the 'greeting text' to detect readiness, but this 'greeting text' is not actually specified for any device other than the TOBY L4. What seems to work is to probe the device with 'AT' commands until the device responds, and then to wait an additional second before proceeding. The TOBY L4 reliably sends its 'greeting text' (+AT: READY) within this interval. It would be more rigorous to actually wait for the 'READY' indication for the TOBY L4, but that would require knowing the device model before the device model is actually queried. This is doable via the USB product ID, but overkill when the above heuristic seems to work reliably. Before this patch, the ublox plugin was trying to achieve something like the above with the g_at_chat_set_wakeup_command() function, but that had some issues: i) it did not work reliably, in particular failing badly on the TOBY L4 with responses getting out of sync with commands ii) it was an inappropriate use of the wakeup_command which is intended for devices that may sleep when there is no communication during some interval This patch adds an init sequence that probes the device for readiness before continuing with initialization.
* ublox: use common close_devices when modem disabledJonas Bonn2019-09-251-7/+5
| | | | | | | Just reshuffling the code a bit and the 'disable' path can use the close_devices() helper to finish up. This also prevents a bug should the CFUN command fail to disable the modem whereby the 'aux' device remains open but the 'modem' device has already been closed.
* ublox: consolidate teardown in common functionJonas Bonn2019-09-251-16/+14
| | | | | | The code for closing all the modem devices and flagging the modem as unpowered is repeated several times in the driver... this patch puts this code into a common helper for readability.
* ublox: raise call to open deviceJonas Bonn2019-09-241-10/+6
|
* plugins: quectel: Fix compiler warningRichard Röjfors2019-09-241-1/+0
| | | | | | plugins/quectel.c: In function ‘quectel_pre_sim’: plugins/quectel.c:1150:20: error: unused variable ‘sim’ [-Werror=unused-variable] struct ofono_sim *sim;
* quectel: handle sim statesMartin Hundebøll2019-09-101-99/+237
| | | | | | | | | | | | | | | | | | | The quectel M95 and MC60 modems are picky about when the sim is properly initialized, so the logic to detect this needs to be in the quectel plugin. After doing basic initialization, a CPIN query is issued to detect sim state. If the sim is unlocked and ready, a timer is created to wait for the modem state (AT+QINISTAT) to complete. At this point ofono is notified about the initialized sim. If the sim is locked, a listener for "+CPIN: READY" is set up to know when a pin is entered. Once the indication is received, the timer is set up as if the sim was unlocked from the beginning. If the sim is busy/resetting, the CPIN query is issued again.
* quectel: swap cmuxed portsMartin Hundebøll2019-09-021-2/+2
| | | | | | According to the manual, when using CMUX on the UC15, it outputs unsolicited indications on port 2 (i.e. /dev/gsmtty2), so the quectel plugin must use this when registering for such.
* quectel: convert power event reasons to lower caseMartin Hundebøll2019-08-131-5/+5
|