[BC660K-GL] How to deal with PDP contexts (EPS bearers) for NB IoT?

Hello everyone,

I have been using a couple of BC660K-GL chips for a while now, and they send data to a server. This is all going quite well.

However every now and then something strange happens, where the modems continue to send data but the data is not received by my server. I contacted the network operator, and they said that it’s due to an issue with how PDP contexts (equivalent to EPS bearers?) are handled on my devices. The below commands is a rough outline of what happens on my devices. Would anyone be able to see if I’m doing something wrong there in terms of handling PDP contexts? Or if you know any good resources that might explain how to deal with PDP contexts well, that would also be great.

Many thanks,



// ----------------------------------------------------------------------
// SETUP CODE - the following happens once at startup 
// ----------------------------------------------------------------------

/*Disable sleep mode */
AT+QSCLK=0

/* select bands that are frequently used in europe */
AT+QBAND=3,3,8,20

/* disable radio */
AT+CFUN=0

/* set inactivity timer to zero */ 
AT+QCFG=\"DataInactTimer\",0

/* Automatic operator selection.  */
AT+COPS=0
AT+QCGDEFCONT=\"IP\",\"<APN>\"; 


/* Below commands will only take effect after reboot
reboot  */
AT+QRST=1

/*  disable sleep mode */
AT+QSCLK=0

/*  disable unsolicited result codes  */
AT+CEREG=0

/* attach to network  */
AT+CGATT=1	

/* Configure whether to enable the URC ENTER DEEPSLEEP of deep sleep event or not */
AT+QCFG=\"dsevent\",1 


/* Wait for device to obtain an IP addres. Using below command, check
periodically. */
AT+CGPADDR?

/* ---Below functions only happen once IP address has been obtained--- */

/* Request power save mode settings from the network  */
AT+CPSMS=1,,,\"01011111\",\"00000000\"

/* The amount of seconds that BC660K will not go to sleep after a
PSM_EINT or reboot. NOT to be confused with AT Lock Time.  */
AT+QCFG=\"slplocktimes\",1

/* set dataformat choosing between hex and string */
AT+QICFG=\"dataformat\",1,1 

/*Allow modem to go to sleep*/
AT+QSCLK=1

/* // -----------------------------------------------------------------------
// SENDING MESSAGE CODE - The BC660K-GL is periodically woken up by another MCU 
// using PSM interrupt and then the following code is executed 
// ----------------------------------------------------------------------- */

/*Disable sleep mode */
AT+QSCLK=0


/*  Get clock time  */
AT+CCLK? 

/*  Every now and then do a QNTP to synchronise clocks */
AT+QNTP=0,\"pool.ntp.org\"


/*  Open UDP socket, if it doesn't open soon, another attempt is made.  */
AT+QIOPEN=0,0,\"UDP\",\"<TARGET IP ADDRESS>\",<PORT>,<PORT>

/*  Send payload: data string and length is variable. 
Always done over CID = 0 (hardcoded) */
AT+QISEND=0,<PAYLOAD_LENGTH>, <PAYLOAD_STRING>, 1      

/*  closing socket  */
AT+QICLOSE=0 // Close socket, value is the "connectID",
always hardcoded as CID = 0  

/*  Go to deep sleep  */
AT+QSCLK = 1

/* N.B. if any ERROR pops up in the above process, 
the respective command is attempted a few more times before the host MCU resets
the BC660K-GL.  */

// ---------------------------------------------------------------------------
// END OF FILE 
// ---------------------------------------------------------------------------

Please provide your complete log and AT output results

I captured logs with EPAT. Which file of the logs do you need? These are the ones in the folder.

You can provide the zip file directly