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 {
60
60
PROPERTY_AT_CSDH, // 0 = not supported, 1 = supported. Show text mode AT command
61
61
PROPERTY_IPV4_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV4?
62
62
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 ?
64
64
PROPERTY_NON_IP_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support Non-IP?
65
65
PROPERTY_AT_CGEREP, // 0 = not supported, 1 = supported. Does modem support AT command AT+CGEREP.
66
66
Original file line number Diff line number Diff line change @@ -369,8 +369,9 @@ bool AT_CellularContext::get_context()
369
369
// APN matched -> Check PDP type
370
370
pdp_type_t pdp_type = string_to_pdp_type (pdp_type_from_context);
371
371
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)) {
374
375
_pdp_type = pdp_type;
375
376
_cid = cid;
376
377
}
@@ -403,7 +404,7 @@ bool AT_CellularContext::set_new_context(int cid)
403
404
if (_nonip_req && _cp_in_use && get_property (PROPERTY_NON_IP_PDP_TYPE)) {
404
405
strncpy (pdp_type_str, " Non-IP" , sizeof (pdp_type_str));
405
406
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)) ) {
407
408
strncpy (pdp_type_str, " IPV4V6" , sizeof (pdp_type_str));
408
409
pdp_type = IPV4V6_PDP_TYPE;
409
410
} else if (get_property (PROPERTY_IPV6_PDP_TYPE)) {
You can’t perform that action at this time.
0 commit comments