Getting gprs context in lte atmodem
I have made a patch to have gprs internet context available in gemalto plugin. Reason behind this, is to have the same authentication information available as with gprs, and could not wait for the rework Giacinto is doing on gemalto plugin.
Maybe it is of some use, please feel free to comment on the code.
Looking forward to the work of Giacinto.
Please consider the environment before printing this email. This e-mail, and any files transmitted with it, is confidential and is intended solely for the use of the person or entity to whom it is addressed. If you have received this e-mail in error, please notify the sender and delete it from your records. On all our offers, sales and deliveries our General Terms of Delivery are applicable, excluding all other Terms and Conditions. Our terms have been deposited at the Chamber of commerce Eindhoven (The Netherlands), reference number 17065041, a copy of these terms is enclosed with all quotations, a hardcopy also can be send on your request. You can find our General Terms online at https://www.intemo.com/wp-content/uploads/2018/05/FHI-Algemene-Leveringsvoorwaarden-2014-ENGELS.pdf Op al onze aanbiedingen, verkopen en leveringen zijn, met uitsluiting van alle andere voorwaarden, onze algemene voorwaarden van toepassing. Deze zijn gedeponeerd bij de Kamer van Koophandel te Eindhoven onder nummer 17065041. Bij iedere offerte hoe ook verzonden zijn de algemene voorwaarden bijgevoegd, een kopie kan op aanvraag ook per post worden toegezonden. U kunt onze algemene voorwaarden online inzien op https://www.intemo.com/wp-content/uploads/2018/05/FHI-Algemene-Leveringsvoorwaarden-2014-NEDERLANDS.pdf
drivers/atmodem/lte.c +2 -2
@@ -69,10 +69,10 @@ static void at_lte_set_default_attach_info(const struct ofono_lte *lte,DBG ("LTE config with APN: %s" , info->apn);if (strlen (info->apn) >0 ) -snprintf (buf,sizeof (buf),"AT+CGDCONT=1,\"IP\",\"%s\"" , +snprintf (buf,sizeof (buf),"AT+CGDCONT=0,\"IP\",\"%s\"" , info->apn);else -snprintf (buf,sizeof (buf),"AT+CGDCONT=1,\"IP\"" ); +snprintf (buf,sizeof (buf),"AT+CGDCONT=0,\"IP\"" );/* We can't do much in case of failure so don't check response. */ if (g_at_chat_send(ldd->chat, buf, NULL,
include/lte.h +2 -17
@@ -26,27 +26,14 @@ extern "C" { #endif -#define OFONO_LTE_MAX_APN_LENGTH 100 -#define OFONO_LTE_MAX_USERNAME_LENGTH 63 -#define OFONO_LTE_MAX_PASSWORD_LENGTH 255 - #include <ofono/types.h> -#include <gdbus.h> -enum ofono_lte_auth_method { - OFONO_LTE_AUTH_METHOD_CHAP = 0, - OFONO_LTE_AUTH_METHOD_PAP, -}; +struct ofono_lte; struct ofono_lte_default_attach_info { - char apn[OFONO_LTE_MAX_APN_LENGTH + 1]; - char username[OFONO_LTE_MAX_USERNAME_LENGTH + 1]; - char password[OFONO_LTE_MAX_PASSWORD_LENGTH + 1]; - enum ofono_lte_auth_method auth_method; + char apn[OFONO_GPRS_MAX_APN_LENGTH + 1]; }; -struct ofono_lte; - typedef void (*ofono_lte_cb_t)(const struct ofono_error *error, void *data); struct ofono_lte_driver {
@@ -74,8 +61,6 @@ void ofono_lte_set_data(struct ofono_lte *lte, void *data);void *ofono_lte_get_data (const struct ofono_lte *lte); -struct ofono_lte_default_attach_info *ofono_lte_get_default_attach_info (struct ofono_lte *lte); - #ifdef __cplusplus }#endif
plugins/gemalto.c +17 -41
108 lines not on this page · raw message
src/lte.c +1 -88
111 lines not on this page · raw message