From 2301af398eff72ab1e81e9b11797caec0ca325b6 Mon Sep 17 00:00:00 2001 From: Ari Parkkila Date: Tue, 19 Nov 2019 21:47:27 -0800 Subject: [PATCH] Cellular: Enable ePCO IE for BG96 driver As per 3GPP TS 24.301: If the UE supports NB-S1 mode, Non-IP PDN type, or N1 mode, then the UE shall support the extended protocol configuration options IE. ... If the UE supports the extended protocol configuration options IE, then the UE shall set the ePCO bit to extended protocol configuration options supported in the UE network capability IE of the ATTACH REQUEST message. --- .../targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp | 6 ++++++ .../targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp b/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp index 40a4bdfef8..e4646166b8 100644 --- a/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp +++ b/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularNetwork.cpp @@ -43,6 +43,12 @@ nsapi_error_t QUECTEL_BG96_CellularNetwork::set_access_technology_impl(RadioAcce _at.at_cmd_discard("+QCFG", "=\"nwscanseq\",030201"); _at.at_cmd_discard("+QCFG", "=\"nwscanmode\",3,1"); _at.at_cmd_discard("+QCFG", "=\"iotopmode\",1,1"); +#ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES + // enable ePCO IE for DNS address + _at.cmd_start("AT+QNVFW="); + _at.write_string("/nv/item_files/modem/nas/nas_ciot_capability_config"); + _at.write_string("0101", false); +#endif break; case RAT_GSM: case RAT_GSM_COMPACT: diff --git a/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp b/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp index b5a452e613..9c14154183 100644 --- a/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp +++ b/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp @@ -32,6 +32,9 @@ using namespace mbed; QUECTEL_BG96_CellularStack::QUECTEL_BG96_CellularStack(ATHandler &atHandler, int cid, nsapi_ip_stack_t stack_type) : AT_CellularStack(atHandler, cid, stack_type) #ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES +#if (MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES != 1) +#error Define cellular.offload-dns-queries to null or 1. +#endif , _dns_callback(NULL), _dns_version(NSAPI_UNSPEC) #endif , _tls_sec_level(0)