File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
features/cellular/framework/AT Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class AT_CellularBase {
6060 PROPERTY_AT_CSDH, // 0 = not supported, 1 = supported. Show text mode AT command
6161 PROPERTY_IPV4_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV4?
6262 PROPERTY_IPV6_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV6?
63- PROPERTY_IPV4V6_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support dual stack IPV4V6 ?
63+ PROPERTY_IPV4V6_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV4 and IPV6 simultaneously ?
6464 PROPERTY_NON_IP_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support Non-IP?
6565 PROPERTY_AT_CGEREP, // 0 = not supported, 1 = supported. Does modem support AT command AT+CGEREP.
6666
Original file line number Diff line number Diff line change @@ -369,8 +369,9 @@ bool AT_CellularContext::get_context()
369369 // APN matched -> Check PDP type
370370 pdp_type_t pdp_type = string_to_pdp_type (pdp_type_from_context);
371371
372- // Accept exact matching PDP context type
373- if (get_property (pdp_type_t_to_cellular_property (pdp_type))) {
372+ // Accept exact matching PDP context type or dual PDP context for modems that support both IPv4 and IPv6 stacks
373+ if (get_property (pdp_type_t_to_cellular_property (pdp_type)) ||
374+ ((pdp_type == IPV4V6_PDP_TYPE && (get_property (PROPERTY_IPV4_PDP_TYPE) && get_property (PROPERTY_IPV6_PDP_TYPE))) && !_nonip_req)) {
374375 _pdp_type = pdp_type;
375376 _cid = cid;
376377 }
@@ -403,7 +404,7 @@ bool AT_CellularContext::set_new_context(int cid)
403404 if (_nonip_req && _cp_in_use && get_property (PROPERTY_NON_IP_PDP_TYPE)) {
404405 strncpy (pdp_type_str, " Non-IP" , sizeof (pdp_type_str));
405406 pdp_type = NON_IP_PDP_TYPE;
406- } else if (get_property (PROPERTY_IPV4V6_PDP_TYPE)) {
407+ } else if (get_property (PROPERTY_IPV4V6_PDP_TYPE) || ( get_property (PROPERTY_IPV4_PDP_TYPE) && get_property (PROPERTY_IPV6_PDP_TYPE)) ) {
407408 strncpy (pdp_type_str, " IPV4V6" , sizeof (pdp_type_str));
408409 pdp_type = IPV4V6_PDP_TYPE;
409410 } else if (get_property (PROPERTY_IPV6_PDP_TYPE)) {
You can’t perform that action at this time.
0 commit comments