BC26 How to disable MODEM or enter deep sleep rapidly

I’m developing a application using BC26 with OpenCPU which need wakeup frequently, such as once per minute, with rarely data exchange with internet. So I think maybe I can use BC26 as a normal application processor with MODEM disabled in most of time, and attach to the base station only when I need send data to internet. Is it possible? If possible, how should I do?
Another question is, when it was waken from deep sleep mode using RTC timer, it take a long time to enter deep sleep mode again, such as 10s, even had executed AT+CFUN=0. Is it possible to enter deep sleep mode more rapidly, such in the scale of millisecond? If possible, how should I do?
Thank you in advance.

First, you should make sure that PSM mode is enabled

AT+CPSMS? //Return 1,PSM enable;but 0 PSM disable 0
AT+CPSMS=1,β€œ01000011”,β€œ01000011” //if return 0 ,Execute it;
The last two configuration parameters are T3412 and T3324 timers, which are used to control the time to enter the PSM state. The actual time is decided by the core network. If you want the personal configuration parameters to be effective, you need to consult the SIM card service provider to see if relevant requirements are provided.

AT+QNBIOTRAI=1 //After you send data to the network and execute this command, the modem can quickly release the wireless channel resources and enter a low-power state.

Hi, herbert:
Thank you for your reply. Now I think I can keep the MODEM in PSM mode, but the module still need to take a long time to back to deep sleep mode after it was woken by rtc timer or external button. Hereafter is some of my test log and respective explanation.

[2021-07-19 18:03:31.389 R]OpenCPU: Customer Application
← RIL is ready β†’
[2021-07-19 18:03:31.428 R]<-- Power on reason: UNDEFINED β†’
[2021-07-19 18:03:32.910 R]<-- SIM Card Status: SIM_STAT_READY β†’
[2021-07-19 18:03:33.213 R]<-- EGPRS Network Status: NW_STAT_SEARCHING β†’
[2021-07-19 18:03:41.163 R]<-- EGPRS Network Status: NW_STAT_REGISTERED β†’
[2021-07-19 18:04:04.444 R]<-- PSM Status: ENTER_PSM β†’

First time the module power on. And after the module registered to the network, MODEM enter PSM mode.

[2021-07-19 18:04:32.586 R]OpenCPU: Customer Application
← RIL is ready β†’
[2021-07-19 18:04:32.667 R]<-- Power on reason: QL_DEEP_SLEEP β†’

Woken by external button w/o EXIT_PSM message, so I think the MODEM is still in PSM mode at the moment. But it still takes about 10 seconds to reenter deepsleep mode although there are no any task was running at this point.
I also tried AT+CFUN=0 and AT+QRELLOCK commands, but none of these took effect.
Am I miss something?
Any tips is appreciate, thank you in advance.

This is a normal phenomenon, when you wake up the module, the module will not immediately and quickly enter the PSM state, unless you perform AT+QSCLK=1,so the module will default to enter the PSM state after about 10s when you have not sent any data.

Hi, herbert:

when you wake up the module, the module will not immediately and quickly enter the PSM state

I think the modem was still in the PSM state while the AP was quit from idle state when the module was woken by external button because no exit PSM message was sent.
Anyway, I just want to know if there exist any command that can put the module in the deep sleep mode as soon as possible. Thank you again.



Actually the module is in the Sleep Mode 1 already. 10 seconds is unacceptable for my application. My goal is put the module into deep sleep mode immediately when there are not any more task need to process in the scale of millisecond delay. Is this possible? Thank you anyway.

[2021-07-19 19:38:33.756 T]AT+QSCLK?
[2021-07-19 19:38:33.767 R]AT+QSCLK?
[2021-07-19 19:38:33.838 R][ATResponse_Handler]

At present, I think your device may be unable to quickly enter PSM due to the AP side. Under normal circumstances, to execute β€œAT+QSCLK=1” can quickly enter PSM state without sending data.

Hi, herbert:
I have no idea. In my test, the only task is proc_main_task with the only thing it did is calling Ql_RIL_Initialize() and reporting subsequent URC messages.
Thank you.

I’m very sorry that I don’t have PSM state switching time and low power test for OpenCPU at present. I suggest that you can do a cross-test and try to test PSM state switching time and low power of the new (undeveloped)BC26 by AT Command and compare the results of the two.

Hi, herbert:
I tested PSM mode on another module of M5311 which was designed by China Mobile using the same NB-IoT chip of MT2625 as BC26 and it works as I expected.
The SDK of M5311 provide two useful API relating to the sleep mode. One of which is opencpu_entersleep_mode(), which can put the module into sleep mode immediately once it was called.
Another one is opencpu_waketime_set(), which can set the timeout duration to reenter sleep mode after it was waked by external button or RTC.
I guess both SDKs of M5311 and BC26 were based on LinkIt Development Platform. And I want to know if BC26 exposed these two APIs to developer too?


The following screenshot shows the PSM API provided by BC26:

At present, BC26 enters the PSM state through two stages: from the connected state to the idle state (determined by the core network inactivity timer, 20s by default), from the idle state or DRX state to the PSM state (determined by the T3324 timer), and from the PSM state to the T3412 timer (periodic awakening).If you need to wake up by a high power level, PIN or RTC, you refer to the instruction manual.
Modules can be quickly woken up, but they cannot quickly enter the PSM state (unless the operator supports custom timer parameters). You can check the interval by monitoring the URC reported by the module (AT+QNBIOTEVENT=1,1).

Hi, herbert:
Actually I had called Ql_SleepEnable() in application in my earlier test.
Seems that I have no choice but the M5311 module. Thank you for your patient help.