[PATCH] atmodem: added vendor Gemalto
by Giacinto Cifelli
---
drivers/atmodem/vendor.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/atmodem/vendor.h b/drivers/atmodem/vendor.h
index 721796e..abe2d89 100644
--- a/drivers/atmodem/vendor.h
+++ b/drivers/atmodem/vendor.h
@@ -49,4 +49,5 @@ enum ofono_vendor {
OFONO_VENDOR_UBLOX_TOBY_L2,
OFONO_VENDOR_CINTERION,
OFONO_VENDOR_XMM,
+ OFONO_VENDOR_GEMALTO,
};
--
1.9.1
2 years, 4 months
[PATCH] atmodem: added inline function to parse AT+CESQ result for signal strenght It complements the function at_util_convert_signal_strength for AT+CSQ, which does not apply well to 3G and not at all to LTE. The AT+CESQ returns 3 sets of values, one for each technology (2G, 3G, LTE).
by Giacinto Cifelli
---
drivers/atmodem/atutil.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/atmodem/atutil.h b/drivers/atmodem/atutil.h
index 7113a4c..57573cb 100644
--- a/drivers/atmodem/atutil.h
+++ b/drivers/atmodem/atutil.h
@@ -115,6 +115,20 @@ static inline int at_util_convert_signal_strength(int strength)
return result;
}
+static inline int at_util_convert_signal_strength_cesq(int strength_GSM, int strength_UTRAN, int strength_EUTRAN)
+{
+ int result = -1;
+
+ if (strength_GSM != 99)
+ result = (strength_GSM * 100) / 63;
+ else if (strength_UTRAN != 255)
+ result = (strength_UTRAN * 100) / 96;
+ else if (strength_EUTRAN != 255)
+ result = (strength_EUTRAN * 100) / 97;
+
+ return result;
+}
+
#define CALLBACK_WITH_FAILURE(cb, args...) \
do { \
struct ofono_error cb_e; \
--
1.9.1
2 years, 4 months
[PATCH] fixed typo in doc/emergency-call-handling.txt
by Giacinto Cifelli
---
doc/emergency-call-handling.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/emergency-call-handling.txt b/doc/emergency-call-handling.txt
index 69b217d..0436047 100644
--- a/doc/emergency-call-handling.txt
+++ b/doc/emergency-call-handling.txt
@@ -14,7 +14,7 @@ What oFono will do:
- Post online atoms will be created.
- Upon reception of Dial request, Emergency mode is activated.
- Once the call is ended, Emergency mode is deactivated.
- - Modem remains in online mode with full funcationality.
+ - Modem remains in online mode with full functionality.
Case 2: Call in SIM Present and PIN required state
--
1.9.1
2 years, 4 months
[PATCH] atmodem: add AT+CREG handling for lte status
by Anirudh Gargi
added CREG 'status' 6 and 7 for sms only registered state on E-UTRAN
for CREG cmd reply callback and URC notfiy.
---
drivers/atmodem/network-registration.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 0854cd1..c0ec8c7 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -228,6 +228,10 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
if ((status == 1 || status == 5) && (tech == -1))
tech = nd->tech;
+ /* Handle EUTRAN cases */
+ if ((status == 6 || status == 7) && (tech == -1))
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+
cb(&error, status, lac, ci, tech, cbd->data);
}
@@ -1522,8 +1526,11 @@ static void creg_notify(GAtResult *result, gpointer user_data)
&lac, &ci, &tech, nd->vendor) == FALSE)
return;
- if (status != 1 && status != 5)
- goto notify;
+ /* Not camped case */
+ if (status != 1 && status != 5) {
+ if (status != 6 && status != 7)
+ goto notify;
+ }
tq = g_try_new0(struct tech_query, 1);
if (tq == NULL)
@@ -1569,6 +1576,9 @@ static void creg_notify(GAtResult *result, gpointer user_data)
if ((status == 1 || status == 5) && tech == -1)
tech = nd->tech;
+ if ((status == 6 || status == 7) && tech == -1)
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+
notify:
ofono_netreg_status_notify(netreg, status, lac, ci, tech);
}
--
2.7.4
2 years, 4 months
[PATCH] sms: fix send sms in case of lte registration
by Anirudh Gargi
CREG status 6 and 7 added in network registration status, sms atom
to consider new states also.
---
src/common.h | 14 ++++++++------
src/sms.c | 2 ++
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/common.h b/src/common.h
index 1b6b01d..b826228 100644
--- a/src/common.h
+++ b/src/common.h
@@ -37,12 +37,14 @@ enum access_technology {
/* 27.007 Section 7.2 <stat> */
enum network_registration_status {
- NETWORK_REGISTRATION_STATUS_NOT_REGISTERED = 0,
- NETWORK_REGISTRATION_STATUS_REGISTERED = 1,
- NETWORK_REGISTRATION_STATUS_SEARCHING = 2,
- NETWORK_REGISTRATION_STATUS_DENIED = 3,
- NETWORK_REGISTRATION_STATUS_UNKNOWN = 4,
- NETWORK_REGISTRATION_STATUS_ROAMING = 5,
+ NETWORK_REGISTRATION_STATUS_NOT_REGISTERED = 0,
+ NETWORK_REGISTRATION_STATUS_REGISTERED = 1,
+ NETWORK_REGISTRATION_STATUS_SEARCHING = 2,
+ NETWORK_REGISTRATION_STATUS_DENIED = 3,
+ NETWORK_REGISTRATION_STATUS_UNKNOWN = 4,
+ NETWORK_REGISTRATION_STATUS_ROAMING = 5,
+ NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN = 6,
+ NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN = 7,
};
/* 27.007 Section 7.3 <stat> */
diff --git a/src/sms.c b/src/sms.c
index b86158e..c604e05 100644
--- a/src/sms.c
+++ b/src/sms.c
@@ -782,6 +782,8 @@ static void netreg_status_watch(int status, int lac, int ci, int tech,
switch (status) {
case NETWORK_REGISTRATION_STATUS_REGISTERED:
case NETWORK_REGISTRATION_STATUS_ROAMING:
+ case NETWORK_REGISTRATION_STATUS_REGISTERED_SMS_EUTRAN:
+ case NETWORK_REGISTRATION_STATUS_ROAMING_SMS_EUTRAN:
sms->registered = TRUE;
break;
default:
--
2.7.4
2 years, 4 months
[PATCH] ril driver: commented out pragma
by Giacinto Cifelli
gcc 4.8.4 rejects the line:
and this breaks the default compilation.
Since they may be needed for other compilers,
I have just commented them out with '//', so that they stand out.
---
drivers/rilmodem/call-forwarding.c | 2 +-
drivers/rilmodem/network-registration.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rilmodem/call-forwarding.c b/drivers/rilmodem/call-forwarding.c
index 4aff4d3..0bdab3f 100644
--- a/drivers/rilmodem/call-forwarding.c
+++ b/drivers/rilmodem/call-forwarding.c
@@ -38,7 +38,7 @@
#include <ofono/call-forwarding.h>
#include "common.h"
-#pragma GCC diagnostic ignored "-Wrestrict"
+//#pragma GCC diagnostic ignored "-Wrestrict"
#include "gril.h"
diff --git a/drivers/rilmodem/network-registration.c b/drivers/rilmodem/network-registration.c
index 809b3bc..9895c6d 100644
--- a/drivers/rilmodem/network-registration.c
+++ b/drivers/rilmodem/network-registration.c
@@ -37,7 +37,7 @@
#include <ofono/modem.h>
#include <ofono/netreg.h>
-#pragma GCC diagnostic ignored "-Wrestrict"
+//#pragma GCC diagnostic ignored "-Wrestrict"
#include <gril/gril.h>
--
1.9.1
2 years, 4 months
ublox TOBY-R200
by Frank Vasquez
Greetings,
I have an embedded device with a ublox TOBY-R200 on it. I want to use
connman to manage any cellular connection on that modem since connman is
already managing ethernet and wifi connectivity. oFono seems like the best
option. I see that there is already a ublox plugin for oFono but I don't
think the TOBY-R200 is supported. The cell module is soldered onto the
board and appears as a USB device.
[ 6.519190] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 6.519197] usb 1-1: Product: u-blox Cellular Module
[ 6.519204] usb 1-1: Manufacturer: u-blox
[ 6.519211] usb 1-1: SerialNumber: 352848080392646
I can send AT commands to the modem over /dev/ttyACM0.
Cheers,
Frank
2 years, 4 months
vendor models and options
by Giacinto Cifelli
Dear Denis, all,
while preparing the Gemalto driver, I see that there is a potential
shortcoming with the vendor structure in the atmodem. I can set
OFONO_VENDOR_GEMALTO_model, but this could be a very long list for all
options to maintain. I see the tendency also for other manufacturers.
Would it be ok if I convert the vendor integer in a structure with model
and flags?
This would make the current code more compact and clearer.
The alternative of cloning the atmodem is less tempting, because then it
needs constant monitoring of the atmodem to porting the features in it, or
conversely missing features in this general driver. One example is for the
indicators +CGREG/+CEREG/+C5GREG that we are adding in atmodem (gprs.c),
instead of the unique +CGREG that doesn't work anymore for LTE (in the
27.007). If I add it in Gemalto driver, it will be missing in the atmodem.
thank you for any commments.
Regards,
Giacinto
2 years, 4 months