summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* qmimodem: Fix shared service creation logicIvaylo Dimitrov2022-09-191-34/+96
| | | | | | | | | | | | | qmi_service_create_shared() tries to find already created service of the same type and if it fails to find one, start a creation of a new service. This creation takes some time, so if while it is not complete, any new calls to qmi_service_create_shared() will still fail to find a service of that type and will start creation. This can easily lead to client ids exhaustion and service creation failures. Fix that by adding logic that delays responses to any shared service creation requests after the first one, until that request either fails or succeeds.
* qmimodem: Remove service create request on timeoutIvaylo Dimitrov2022-09-191-23/+43
| | | | Otherwise callback will be called on late response with dangling user_data.
* gemaltomodem: Fix GCC warningDenis Kenzior2022-09-081-2/+1
| | | | | | | | | | | | CC drivers/gemaltomodem/gprs-context.o drivers/gemaltomodem/gprs-context.c: In function ‘gemalto_gprs_activate_primary’: drivers/gemaltomodem/gprs-context.c:195:13: error: the comparison will always evaluate as ‘true’ for the address of ‘apn’ will never be NULL [-Werror=address] 195 | if (ctx->apn) | ^~~ In file included from drivers/gemaltomodem/gprs-context.c:36: ./include/ofono/gprs-context.h:44:14: note: ‘apn’ declared here 44 | char apn[OFONO_GPRS_MAX_APN_LENGTH + 1]; | ^~~
* mbmmodem: Fix GCC warningDenis Kenzior2022-09-081-3/+3
| | | | | | | | CC drivers/mbmmodem/gprs-context.o drivers/mbmmodem/gprs-context.c: In function ‘mbm_e2ipcfg_cb’: drivers/mbmmodem/gprs-context.c:138:25: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 138 | ofono_info("IP: %s Gateway: %s", ip, gateway); | ^~
* lte: switch auth to NONE if other options cannot be usedSergei Golubtsov2022-09-061-1/+2
| | | | | If the user name or user name together with the password for an AP are not provided the NONE auth method should be used
* rilmodem: fix a problem that manager_dial_callback is never calledXiaoyi Chen2021-12-162-1/+12
| | | | | | | | | | | | | This problem does not happen each time when dialing. It's only observed with some sim cards under certain network. The time sequence to reproduce the problem is: - send dial request - receive unsol event call state changed - send clcc poll request - clcc poll response (vd->cb is null here) - dial response - setup vd->cb (then it never gets called)
* rilmodem: fix handling both of SUCCESS AND FAILUREJongSeok Won2021-12-161-1/+3
|
* rilmodem: fix register of unsolicited notifyXiaoyi Chen2021-12-131-3/+3
|
* gemalto: radio-settings: cleanupSergey Matyukevich2021-07-271-9/+6
| | | | | | Enum ofono_radio_access_mode has been replaced by unsigned int. This change allows to move handling of all the modes into 'switch' in the function gemalto_set_rat_mode.
* gemalto: add radio-settings driverSergey Matyukevich2021-07-153-0/+272
| | | | Add support for Gemalto specific radio settings.
* radio-settings: Do not use enum ofono_access_modeDenis Kenzior2021-06-0111-35/+27
| | | | | | | Originally the enum was only meant to signify a single radio access mode preference, but over time its meaning was overloaded to be a bitfield with multiple preferences. Switch away from using an enum value to using an unsigned int to make it clearer that the value is a bitfield.
* qmimodem: Add handling of dual mode technology preferenceSean Nyekjaer2021-06-011-0/+6
| | | | | Handled dual mode technology preference "lte,gsm" for Quectel BG96. Quectel BG96 doesn't support ANY mode.
* treewide: Introduce support for missing g_memdup2Marcel Holtmann2021-05-056-0/+6
|
* treewide: Replace g_memdup with g_memdup2Marcel Holtmann2021-04-286-6/+6
|
* mbimmodem: Remove usage of likely and unlikelyMarcel Holtmann2021-04-282-46/+45
|
* qmimodem: Add USSD indication supportAlexey Andreyev2021-02-221-0/+44
| | | | | | Handle USSD QMI indication messages. Add support for UCS2 USS Data coding scheme. Check for User Action TLV type.
* gemalto: netmon measurements scalingSergey Matyukevich2021-01-151-4/+50
| | | | | | | | | | Gemalto modem reports raw measurements in dBm. Reported values may include negative numbers. Meanwhile oFono follows ETSI TS 27.007, so negative numbers do not really exist at the API level. Modify gemalto netmon driver to report measurements according to 27.007. For this purpose re-scale from what Gemalto firmware reports into something that 27.007 recommends.
* gemalto: add netmon driverSergey Matyukevich2021-01-153-0/+610
| | | | | | Implement network monitoring driver for gemalto modems that are able to provide serving cell information and basic measurements using AT+CQS and AT^SMONI commands.
* gemalto: gprs: support authentication settingsSergey Matyukevich2020-12-301-1/+52
| | | | | Add support for gprs contexts with username, password, and specific authentication type.
* gemalto: gprs: support automatic context activationSergey Matyukevich2020-12-301-47/+69
| | | | | | | | | | | | | | | | | Implement read_settings function to get configuration for automatic contexts. AT^SWWAN command activates PDP context unless it has been already activated automatically, and then starts DHCP server in the ME. So AT^SWWAN command should be run for automatic context as well in order to obtain IP settings from the ME. This commit also fixes the issue uncovered by the added support for automatic contexts: as per modem specs, AT+CGACT context should not be reused for AT^SWWAN. Though that worked for some reason when automatic context was reactivated without proper deactivation. Note that in both cases success code is reported to the core before AT^SWWAN response. This is because the ME waits until DHCP negotiation has finished before sending the "OK" or "ERROR" result code.
* gemalto: Fix compiler errorDenis Kenzior2020-12-261-4/+2
| | | | | | Fix compiler error introduced due to a bad merge Fixes: de0d5a19 ("gemalto: gprs: support different gprs protocols")
* gemalto: gprs: support different gprs protocolsSergey Matyukevich2020-12-221-6/+16
| | | | Add support for IPv6 and dual mode gprs contexts.
* gemalto: gprs: cgev gprs context deactivationSergey Matyukevich2020-12-221-0/+2
| | | | | Gemalto ELS81x modems use 'ME PDN DEACT' message to notify about gprs context deactivation. Process this 'deactivate' event in CGEV handler.
* huawei: Fix implicit enum conversionRichard Röjfors2020-12-221-1/+1
| | | | | | | | | | | GCC 10 warns about this implicit conversion: drivers/huaweimodem/radio-settings.c: In function ‘band_gsm_from_huawei’: drivers/huaweimodem/radio-settings.c:107:10: error: implicit conversion from ‘enum ofono_radio_band_umts’ to ‘enum ofono_radio_band_gsm’ [-Werror=enum-conversion] 107 | return OFONO_RADIO_BAND_UMTS_ANY; Member from the incorrect enum was returned, both had the value 0, so the code would still work.
* droid 4: special handling for SMSesPavel Machek2020-09-151-3/+13
| | | | | Droid 4 modem is "special" (aka broken) so and getting incoming SMSes to work is quite tricky. This should get it right.
* droid 4: add special handling required for voice calls and SIMPavel Machek2020-09-153-0/+7
| | | | | Droid 4 modem is "special" (aka broken) so it seems to need a bit of error handling.
* qmimodem: Fix format warningDenis Kenzior2020-09-081-8/+22
| | | | | | | | | | | | | | | | | | | ../../drivers/qmimodem/network-registration.c: In function ‘extract_ss_info’: ../../drivers/qmimodem/network-registration.c:131:54: warning: ‘%03d’ directive output may be truncated writing between 3 and 5 bytes into a region of size 4 [-Wformat-truncation=] 131 | snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1, "%03d", | ^~~~ ../../drivers/qmimodem/network-registration.c:131:53: note: directive argument in the range [0, 65535] 131 | snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1, "%03d", | ^~~~~~ The MCC/MNC fields are limited to three digits. Clamp the input to 999 to avoid the warning.
* atmodem: Detect usage of AT+CGEREPLars Poeschel2020-09-011-2/+62
| | | | | | | | Currently AT+CGEREP=2,1 is sent in case we don't know what the modem needs. (default case) Not all modems understand this. So, we first query what the modem supports with AT+CGEREP=? and then use this information to be nice to the modem. This way modems, like the Quectel M95 that do only understand AT+CGEREP=1 do also work nicely.
* atmodem: Signal quality on quectel serial modemsLars Poeschel2020-08-251-3/+21
| | | | | | | | | | | As the default way of getting the signal quality with +CIND is also unstable on quectel serial modems (the same as on quectel EC21). In fact the signal quality is only updated on cell changes. Those trigger a manual AT+CSQ in ofono and get an update this way, but the URCs do not work. So we implement a quectelish way here as well. The quectelish way is very similar to the way ifx modems work. We can reuse their csq_notify function.
* atmodem: Deactivate AT+CPSB for quectel serial modemsLars Poeschel2020-08-191-0/+1
| | | | | | | | | There are at the moment two quectel modems in ofono vendored as OFONO_VENDOR_QUECTEL_SERIAL: The M95 and the MC60. Both modems are GSM only modems, and their official documentation does not mention the AT+CPSB command. I have a M95 here that gives an error on issuing the AT+CPSB=1 command. So skip this command for these two modems.
* drivers: gemalto: add gprs-context driverSergey Matyukevich2020-08-193-1/+284
| | | | | | Some gemalto modems provide USB ethernet interfaces for data path. Implement gprs-context driver for such modems to send data via USB ethernet rather than fallback to PPP.
* gprs: Quectel EC21 does not understand AT+CPSBLars Poeschel2020-08-171-0/+2
| | | | | | | The Quectel EC21 modem does not understand the AT+CPSB command, and we did not find a suitable replacement in the Quectel_EC25&EC21_AT_Commands_Manual_V1.3.pdf AT+CPSB gives an error on this modem, so we just skip it.
* atmodem: Get strength and tech the quectel way on EC21Lars Poeschel2020-08-111-0/+71
| | | | | | | | | | 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-114-1/+6
| | | | | | | 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
* rilmodem: support cell type LTE for netmonJongSeok Won2020-07-311-0/+51
|
* rilmodem: set proto type during setting initial attach apnJongSeok Won2020-07-211-2/+4
| | | | | Added the protocol type of initial attach apn depends on protocol type in LTE Atom.
* rilmodem: fix typo error in netmon.cJongSeok Won2020-07-211-1/+1
|
* huawei: fix AT^SYSCFGEX acqorder "0201"Jimmy Gysens2020-06-261-2/+2
| | | | | | Commit 6c574ee24a57d0397e4e3c617016bf026405960a ("huawei: the AT^SYSCFGEX command supports additional modes") has a mistake for acqorder "0201". It should be UMTS and GSM preferred.
* huawei: the AT^SYSCFGEX command supports additional modesJimmy Gysens2020-06-251-0/+13
| | | | | | | | | | - LTE and UMTS preferred (acqorder = 0302); AT^SYSCFGEX="0302",40000000,2,4,40000000 - UMTS and GSM preferred (acqorder = 0201); AT^SYSCFGEX="0201",40000000,2,4,40000000 For AT^SYSCFG, the modes are not available.
* huawei: use AT^SYSCFG for radio setting operations on 3G only modemsChristophe Ronco2020-06-111-0/+1
| | | | | | | | | | | AT^SYSCFGEX must be used on LTE Huawei modems to enable LTE support. But some modems (or firmwares?) do not support this command and AT^SYSCFG must be used to get/set radio settings. This has been introduced in commit: 22adf6402c828f8b8cca1b65d8a46ba7792eb787 There is a bug in this commit and AT^SYSCFGEX commands are used even on modems not supporting it.
* qmimodem: Implement data capability bearer notifyMarius Gripsgard2020-06-103-0/+86
| | | | | | This implements data capability bearer notify to qmi modem. Since this is included in the serving system response this just adds a new data extraction for dc.
* voicecall: Quectel modem do not understand AT+CNAPLars Poeschel2020-05-211-1/+3
|
* rilmodem: update call direction from the isMT valueJongSeok Won2020-04-021-1/+1
| | | | | oFono cannot determines the call of direction when the voicecall is triggered in rilmodem
* ublox: network-registration: Handle UREG unsolicited during pollRichard Röjfors2020-02-141-9/+11
| | | | | | | | | | | | | | | | | | In the case a unsolicited indication for UREG was received while the status was polled. The poll response failed to parse. This since the unsolicited indication only carries one parameter, while the poll response is expected to carry two. Update the code to loop until the response is found. The log below shows a case where this happened. 10:07:55 ofonod[520]: Aux: > AT+UREG?\r 10:07:55 ofonod[520]: Aux: < \r\n+CGREG: 4\r\n\r\n+UREG: 0\r\n\r\n+CIEV: 9,1\r\n 10:07:55 ofonod[520]: src/gprs.c:ofono_gprs_status_notify() /ublox_0 status unknown (4) 10:07:55 ofonod[520]: src/gprs.c:ofono_gprs_detached_notify() /ublox_0 10:07:55 ofonod[520]: Aux: < \r\n+UREG: 1,0\r\n 10:07:55 ofonod[520]: Aux: < \r\nOK\r\n
* Instead of implementing an own copy of requesting and parsingRichard Röjfors2020-02-071-24/+16
| | | | CREG, reuse the existing one from at-modem.
* atutil: Add missing va_endDenis Kenzior2019-11-131-0/+1
|
* mbim: Don't copy too muchDenis Kenzior2019-11-131-1/+1
| | | | | _mbim_message_build doesn't really care about the fragmentation header contents, so just don't copy those unnecessarily.
* huawei: Increase string buffer to avoid overflowMarcel Holtmann2019-10-311-1/+1
|
* ublox: netreg: Also subscribe to UREG URC'sRichard Röjfors2019-10-011-51/+154
| | | | | | | | It turns out that both L2xx and L4xx modems are a bit buggy when it comes to send CREG URC's when the tech changes. Try to overcome this by subscribing to both UREG and CREG, and poll the other when any of the URC's are received. Protect from doing simultaneous polls though.
* atmodem: CGDCONT handling for cid 0Antara Borwankar2019-09-301-1/+1
| | | | Added handling for cid 0 in +CGDCONT callback.