Commit Graph

7862 Commits

Author SHA1 Message Date
Djalal Harouni d9c618fd94 netmon: handle NETMON_INFO_{RSCP|ECN0|RSRQ|RSRP}
Handle the newly added netmon info types.
2016-11-30 09:29:59 -06:00
Djalal Harouni 70d9228268 doc: Add additional netmon properties
This adds documentation for the following fields in
networkmonitor-api.txt

RSCP: Received Signal Code Power
ECN0: Received Energy Ratio
RSRQ: Reference Signal Received Quality
RSRP: Reference Signal Received Power
2016-11-30 09:26:32 -06:00
Djalal Harouni e75fca93d8 include: add NETMON_INFO_{RSCP|ECN0|RSRQ|RSRP}
Add more ofono netmon info types that will be served through the netmon
interface. The main user of this now will be the ublox modem.

RSCP: Received Signal Code Power
ECN0: Received Energy Ratio
RSRQ: Reference Signal Received Quality
RSRP: Reference Signal Received Power
2016-11-30 09:24:14 -06:00
Denis Kenzior c1cf5ae25e netmon: Fix style issue 2016-11-29 10:46:05 -06:00
Denis Kenzior 46c44a2b56 netmon: No need to initialize mcc/mnc 2016-11-29 10:45:19 -06:00
Dragos Tatulea c2b489dca8 gprs: lte: set attached after successful activation
Otherwise the attached state gets to be set before the actual LTE
automatic context is ready. This triggers a race between connman
and ofono: connman sees status attached before the context is active
so connman will try to activate another context with same apn and will
fail over and over again.
2016-11-22 10:51:09 -06:00
Dragos Tatulea 627b5df8a2 lte: fix early imsi free
storage_close was creating an empty sync file in /var/lib/ofono/lte
when it should have been closing the proper file
/var/lig/ofono/<imsi>/lte.
2016-11-22 10:03:10 -06:00
Slava Monich 52c2c401b4 smsutil: Fix receiving UTF-16 encoded messages
The spec supports UCS2, but in reality UTF-16 is used, which supports
4-byte characters, which could be split into different message
fragments. Accumulate the entire UTF-16 message before converting to
UTF8.

Author: Martin Jones <martin.jones@jolla.com>
2016-11-18 09:34:33 -06:00
Dragos Tatulea eeaabafdee ubloxmodem: tweak to work on different firmware
The U-Blox documentation specifies the following:
* get interface ip and dns from +CGDCONTRDP
* get gw ip and netmask from +UIPADDR

However, different firmware versions have different befaviour:

* On newer firmware, +UIPADDR returns error. But it's possible to configure
gateway ip == ipterface ip (read from CGDCONTRDP).

* On older firmware, we can actually use the commands specified in the
docs.

This patch runs +CGDCONTRDP, configures everything and then tries to run
+UIPADDR. In that works, reconfigures gw ip and netmask.
2016-11-16 11:49:38 -06:00
Dragos Tatulea 919e0b95ac plugins: ublox: enable lte driver for tobyl2 2016-11-15 13:46:04 -06:00
Dragos Tatulea e9f6b7ffd9 build: add support for ublox lte atom driver 2016-11-15 13:45:56 -06:00
Dragos Tatulea 5d276f953e ubloxmodem: add lte atom driver
Adds U-Blox Toby L2 driver for setting the default APN via the
+UCGDFLT command. Currently only IPv4 is supported. APN is
not stored to modem's non-volatile memory. oFono will manage this
default APN via it's config storage.

When receiving an empty default APN, the value is reset.
2016-11-15 13:45:35 -06:00
Denis Kenzior b8d6828388 lte: If method is NULL, return not implemented 2016-11-15 13:43:15 -06:00
Denis Kenzior 872c1a82f1 lte: Relax condition to g_free imsi
imsi malloc is not directly tied to l_settings being valid
2016-11-15 13:39:44 -06:00
Dragos Tatulea af3c060774 build: add lte atom support 2016-11-15 13:39:04 -06:00
Dragos Tatulea 1b3c844040 lte: add implementation for LTE atom
This implementation can only get/set the default APN setting. But
anything expected for this atom is there:
* D-Bus interface
* sync-ing settings to/from file
* interaction with driver
2016-11-15 13:38:42 -06:00
Dragos Tatulea c43e44b154 ubloxmodem: fix memory leak in gprs_context_remove 2016-11-14 11:27:39 -06:00
Denis Kenzior cd0b9b9ef7 include: Fix return signature in lte methods
Only the probe method returns a value.  All other methods use a void
return signature and report errors via the callback.
2016-11-11 10:55:00 -06:00
Denis Kenzior 0cfab7e436 build: add test/set-lte-property 2016-11-11 10:49:00 -06:00
Denis Kenzior 694bd1a0b4 build: Add lte-api.txt 2016-11-11 10:48:47 -06:00
Dragos Tatulea 4422ab43c6 doc: add lte atom documentation 2016-11-11 10:47:30 -06:00
Dragos Tatulea 217efa7f25 test: add script for setting lte atom properties 2016-11-11 10:46:26 -06:00
Denis Kenzior 71a870cd98 include: Make lte method const correct 2016-11-11 10:34:33 -06:00
Dragos Tatulea ec7c109c9d include: add header file for lte atom 2016-11-11 10:14:09 -06:00
Dragos Tatulea a39bd6c47e include: add LTE dbus service define 2016-11-11 10:13:07 -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
Kuba Pawlak 5a6fe84ec0 gatchat: Fix parsing fields with odd number of quotation marks
Events like +CLCC and +CCWA can have contact name attached to the
end of line. If this field contains odd number of quotation marks,
parser will eventually reject such message as malformatted.
2016-11-10 10:18:26 -06:00
Dragos Tatulea f750366261 src: add LTE atom define 2016-11-09 14:20:11 -06:00
Slava Monich 27a9428eec gprs: Check GPRS_FLAG_ATTACHED_UPDATE
... in pri_deactivate_callback

This prevents attached state from getting stuck at 0 like this:

1. Context deactivation is initiated over D-Bus, ctx->pending is set
2. Attached becomes FALSE, context is still marked as active
3. Attached becomes TRUE, gprs_attached_update sets GPRS_FLAG_ATTACHED_UPDATE
4. Deactivation completes, attached is 0, driver_attached is 1

Futher network status updates don't call gprs_attached_update because
driver_attached is still 1, so attached is staying 0 until we lose the
data registration again which may not happen for quite a long time.
2016-11-03 14:24:41 -05:00
Caiwen Zhang 20d8cf9495 gprs: fix crash removing a context being activated
If remove the context before context activation is completed, it may
cause a crash.
2016-11-01 11:29:37 -05:00
Marcel Holtmann e51b39e92c Release 1.19 2016-10-28 14:12:15 +02:00
Slava Monich 5c486138ba netmon: Fix corner cases in serving cell info
Make sure we don't pass NULL message to g_dbus_send_message
Also that we don't lose the reply message.
2016-10-25 14:41:53 -05:00
Alfonso Sánchez-Beato c31a27c180 gitignore: unit/test-rilmodem-gprs binary 2016-10-25 11:51:43 -05:00
Alfonso Sánchez-Beato 8da3726c83 build: add rilmodem gprs unit tests 2016-10-25 11:51:43 -05:00
Alfonso Sánchez-Beato 8062417071 unit: add rilmodem gprs tests
Add rilmodem gprs tests, which use the rilmodem test engine.
2016-10-25 11:51:43 -05:00
Alfonso Sánchez-Beato 6429e9178d unit: add rilmodem test engine
Add rilmodem test engine. This engine is an improvement on the rilmodem
test server that allows us to test generic interactions with the
rilmodem driver. Instead of just be able to check content of received/
sent bytes on the rild socket, we can now specify a set of steps for a
test that include interactions with the atom. The step types are

- TST_ACTION_SEND: The harness sends a parcel
- TST_ACTION_CALL: The harness calls a driver function
- TST_EVENT_RECEIVE: The driver sends a parcel
- TST_EVENT_CALL: The driver calls a harness (atom) function
2016-10-25 11:51:43 -05:00
Slava Monich 503775992d include: Remove unused field from primary_context 2016-10-10 17:09:32 -05:00
Denis Kenzior 1b2f52459f AUTHORS: Mention Antoine's contributions 2016-10-05 13:03:18 -05:00
Denis Kenzior a8d4e7960f gatchat: Fix style 2016-10-05 13:02:52 -05:00
Antoine Aubert da47398525 gatmux: fix read channel remove on error
In case of invalid IO, read_watch is not reset. This fix crash on
destroy gatmux.
2016-10-05 13:02:41 -05:00
Slava Monich 54fb56df24 main: Make -d option repeatable
Concatenating the patterns makes more sense than using the last
supplied value and leaking the previous allocated patterns.
2016-10-04 22:26:26 -05: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
Denis Kenzior 80a71f32cd handsfree-audio: Fix crash
For HFP 1.5 devices the driver is always set to NULL.  So if the AG
establishes the SCO connection first, we might crash.
2016-08-23 20:34:52 -05:00
Santtu Lakkala 54c9068ff2 huaweimodem: Fix DHCP parsing on 32-bit platforms
strtol clamps returned value between INT_MIN and INT_MAX, causing
invalid value (255.255.255.127) being reported for any address
if last octet > 127 when sizeof(long) == 4.
2016-08-10 11:21:56 -05:00
Samrat Guha Niyogi 27f9da901f sim: remove locked_pin reset from sim_free_main_state 2016-08-08 21:17:22 -05:00
Samrat Guha Niyogi 2ba2ccbee4 rilmodem: fix cbd init in ril_query_facility_lock 2016-08-06 11:06:58 -05:00
Samrat Guha Niyogi cafd98778d rilmodem: fix num_params in query_facility_lock_cb 2016-08-06 11:06:14 -05:00
Denis Kenzior eaed7dd7e9 rilmodem: Co-locate the callback with invocation 2016-08-06 11:05:12 -05:00
Denis Kenzior d2ec4a2309 rilmodem: Co-locate the callback with invocation 2016-08-06 11:04:20 -05:00