6 thoughts on “Volume counting with AT#GDATAVOL=2”
Hi,
I’m trying to count transferred data volume with AT#GDATAVOL.
Documentation
states, that the total session counters are stored in NVM
(AT#GDATAVOL=2). This is important because in our application the GSM
module is periodically switched off.
Questions:
chapter 3.3 of the AT Commands Reference Guide r15 does not mention GDATAVOL. So where is it actually stored?
startup
command sequence of our application does neither contain AT&F nor
ATZ. Querying AT#GDATAVOL=2 after providing the PIN always shows zero.
What’s wrong there?
shutdown is done with AT#SHDN. Are there any timing requeirements to allow the module to write data to NVM?
This all happens on a "GE864-QUAD-V2".
Thanks for help & regards
Hardy
PS: where are the bookmarks in the AT Commands Reference? In r10 they were contained while in r15 they are not… 🙁
Hi,
I confirm you the total GPRS counter is saved on NVM.
OK at#shdn OK at#gdatavol=2 #GDATAVOL: 1,2789,1683,1106
OK
My sequence is a little bit longer, but I cannot see any suspicious:
Modem_Puts: ATI Modem_Gets: 0, ATI Modem_Gets: 0, 332 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATI Modem_Gets: 0, ATI Modem_Gets: 0, 332 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATI1 Modem_Gets: 0, ATI1 Modem_Gets: 0, 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATE0;V1;+CMEE=1 Modem_Gets: 0, ATE0;V1;+CMEE=1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATQ3;&C1;&S3;&D1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SELINT=2;#SMSMODE=1;#REGMODE=1;#CPUMODE=2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMDET=1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#AUTOATT=0 Modem_Gets: 0, +CME ERROR: 10 Modem_Cmd-Resp FAILED Modem_Puts: AT#AUTOATT=0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMATR Modem_Gets: 0, #SIMATR: 3B9E95801FC7 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#ENHSIM=0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#QSS? Modem_Gets: 0, #QSS: 0,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#FASTCCID? Modem_Gets: 0, #FASTCCID: 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMINCFG? Modem_Gets: 0, ERROR Modem_Cmd-Resp FAILED Modem_Puts: AT+CGMM Modem_Gets: 0, GE864-QUAD-V2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGMR Modem_Gets: 0, 10.00.024 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#AUTOBND=2;S12=20 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#BND? Modem_Gets: 0, #BND: 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPIN? Modem_Gets: 0, +CPIN: SIM PIN Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#PCT Modem_Gets: 0, #PCT: 3 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPIN=xxxx
Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CNUM: "?","",129 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GAUTH=3 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=1 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=2 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CSCS="GSM" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGSN Modem_Gets: 0, 357005030016990 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+COPS? Modem_Gets: 0, +COPS: 0,0,"SWISS GSM" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGCLASS? Modem_Gets: 0, +CGCLASS: "B" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQMIN=1,0,0,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQMIN? Modem_Gets: 0, +CGQMIN: 1,0,0,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQREQ=1,0,0,1,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQREQ? Modem_Gets: 0, +CGQREQ: 1,0,0,1,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPWC? Modem_Gets: 0, +CPWC: 5,4,0,2,1,1,2,1,2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPWC=5,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPWC=2,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPWC=2,2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPWC? Modem_Gets: 0, +CPWC: 5,4,0,2,1,1,2,1,2
Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS=1,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SCFG=1,1,300,90,600,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATI4 Modem_Gets: 0, GE864-QUAD-V2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGDCONT=1,"IP","internet" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SGACT=1,1,"internet","internet" Modem_Gets: 0, #SGACT: 10.131.99.216 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CSQ Modem_Gets: 0, +CSQ: 23,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+COPS? Modem_Gets: 0, +COPS: 0,0,"sunrise" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SERVINFO Modem_Gets: 0, #SERVINFO: 733,-67,"sunrise","22802",55,0DAC,01,1,,"II",65,6 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MONI=7 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MONI Modem_Gets: 0, #MONI: Cell BSIC LAC CellId ARFCN Power C1 C2 TA RxQual PLMN Modem_Gets: 0, #MONI: S 55 0DAC 082F 733 -67dbm 29 29 1 0 sunrise Modem_Gets: 0, #MONI: N1 FF FFFF 0000 95 -78dbm -1 -1 Modem_Gets: 0, #MONI: N2 FF FFFF 0000 785 -81dbm -1 -1 Modem_Gets: 0, #MONI: N3 FF FFFF 0000 86 -86dbm -1 -1 Modem_Gets: 0, #MONI: N4 FF FFFF 0000 719 -91dbm -1 -1 Modem_Gets: 0, #MONI: N5 FF FFFF 0000 880 -92dbm -1 -1 Modem_Gets: 0, #MONI: N6 FF FFFF 0000 871 -95dbm -1 -1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#QDNS="rgrr.dnsalias.net" Modem_Gets: 0, #QDNS: "rgrr.dnsalias.net","84.56.233.59" Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SD=1,0,443,"84.56.233.59"
Modem_Gets: 0, CONNECT
:
Modem_Puts: +++ Modem_Puts: ATI Modem_Gets: 0, 332 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=1 Modem_Gets: 0, #GDATAVOL: 1,9528,6376,3152 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPIN? Modem_Gets: 0, +CPIN: READY Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CREG? Modem_Gets: 0, +CREG: 0,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SGACT? Modem_Gets: 0, #SGACT: 1,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQMIN? Modem_Gets: 0, +CGQMIN: 1,0,0,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQMIN=? Modem_Gets: 0, +CGQMIN: "IP",(0-3),(0-4),(0-5),(0-9),(0-18,31) Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQREQ? Modem_Gets: 0, +CGQREQ: 1,0,0,1,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGQREQ=? Modem_Gets: 0, +CGQREQ: "IP",(0-3),(0-4),(0-5),(0-9),(0-18,31) Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SS=1 Modem_Gets: 0, #SS: 1,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SI=1 Modem_Gets: 0, #SI: 1,5185,1825,0,53 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SH=1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=2 Modem_Gets: 0, #GDATAVOL: 1,9528,6376,3152 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=1 Modem_Gets: 0, #GDATAVOL: 1,9528,6376,3152 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SGACT=1,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CHUP Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SERVINFO Modem_Gets: 0, #SERVINFO: 733,-69,"sunrise","22802",55,0DAC,00,1,,"II",65,6
Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MONI=7 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MONI Modem_Gets: 0, #MONI: Cell BSIC LAC CellId ARFCN Power C1 C2 TA RxQual PLMN Modem_Gets: 0, #MONI: S 55 0DAC 082F 733 -69dbm 27 27 0 0 sunrise Modem_Gets: 0, #MONI: N1 66 0DAC 6601 95 -78dbm 22 22 Modem_Gets: 0, #MONI: N2 51 0DAC 0830 785 -81dbm 15 15 Modem_Gets: 0, #MONI: N3 56 4650 55CA 86 -86dbm 14 8 Modem_Gets: 0, #MONI: N4 53 0DAC 0000 719 -90dbm 6 6 Modem_Gets: 0, #MONI: N5 52 0DAC 0000 880 -93dbm -24 -24 Modem_Gets: 0, #MONI: N6 52 0DAC A84E 742 -94dbm -25 -25 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SHDN Modem_Gets: 0, OK
Modem_Puts: ATI Modem_Gets: 0, ATI Modem_Gets: 0, 332 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATI Modem_Gets: 0, ATI Modem_Gets: 0, 332 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATI1 Modem_Gets: 0, ATI1 Modem_Gets: 0, 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATE0;V1;+CMEE=1 Modem_Gets: 0, ATE0;V1;+CMEE=1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: ATQ3;&C1;&S3;&D1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SELINT=2;#SMSMODE=1;#REGMODE=1;#CPUMODE=2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMDET=1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#AUTOATT=0 Modem_Gets: 0, +CME ERROR: 10 Modem_Cmd-Resp FAILED Modem_Puts: AT#AUTOATT=0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMATR Modem_Gets: 0, #SIMATR: 3B9E95801FC78031E073FE211B66D001380000003A Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#ENHSIM=0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#QSS? Modem_Gets: 0, #QSS: 0,1 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#FASTCCID? Modem_Gets: 0, #FASTCCID: 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#SIMINCFG? Modem_Gets: 0, ERROR Modem_Cmd-Resp FAILED Modem_Puts: AT+CGMM Modem_Gets: 0, GE864-QUAD-V2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CGMR Modem_Gets: 0, 10.00.024 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#AUTOBND=2;S12=20
Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#BND? Modem_Gets: 0, #BND: 0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPIN? Modem_Gets: 0, +CPIN: SIM PIN Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#PCT Modem_Gets: 0, #PCT: 3 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CPIN=8080 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CIMI Modem_Gets: 0, +CME ERROR: 3 Modem_Cmd-Resp FAILED Modem_Puts: AT+CIMI Modem_Gets: 0, 228021502570867 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CME ERROR: 22 Modem_Cmd-Resp FAILED Modem_Puts: AT+CNUM Modem_Gets: 0, +CNUM: "?","",129 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GAUTH=3 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=1 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=2 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK
:
Hardy
How many modules you have tested, are behaving in this way?
For sure this is not a software feature of a standard module.
Can you please check if other parameters that are normally stored in NVM are kept on no?
e.g.
AT+CGDCONT=1,"IP","internet"
AT#MSCLASS=1,0
Can you check if the values are kept after shutdown?
Actually I have only one module available in my test environment. Firmware version is 10.00.024.
AT#MSCLASS behaves as expected:
Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 2 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS=3,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 3 Modem_Gets: 0, OK
Shutdown of the module and subsequent start up of the module shows:
Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 3 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS=3,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#MSCLASS? Modem_Gets: 0, #MSCLASS: 3
GDATAVOL shows the same as before: after startup of the moduleit shows
Modem_Puts: AT#GDATAVOL=1 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK Modem_Cmd-Resp is ok Modem_Puts: AT#GDATAVOL=2 Modem_Gets: 0, #GDATAVOL: 1,0,0,0 Modem_Gets: 0, OK
Any ideas?
Thanks
Hardy
Working together with Hardy we found the solution.
#GDATAVOL=2 is stored in NVM once the PDP context is deactivated (AT#SGACT=1,0).
In his application there is about one second between AT#SGACT=1,0 and AT#SHDN and after 100ms, VBATT is removed.
When #SGACT is issued, the OK is returned immediately but the PDP deactivation procedure can take more seconds.
The solution was in this case to verify with AT#SGACT? that the context was really deactivated #SGACT: 1,0, before remove the power.
In any case it is no recommended to remove the power from VBATT, 100ms after AT#SHDN since the network detach procedure can takes 2-3 seconds in normal conditions.
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
Hi,
I’m trying to count transferred data volume with AT#GDATAVOL.
Documentation
states, that the total session counters are stored in NVM
(AT#GDATAVOL=2). This is important because in our application the GSM
module is periodically switched off.
Questions:
command sequence of our application does neither contain AT&F nor
ATZ. Querying AT#GDATAVOL=2 after providing the PIN always shows zero.
What’s wrong there?
This all happens on a "GE864-QUAD-V2".
Thanks for help & regards
Hardy
PS: where are the bookmarks in the AT Commands Reference? In r10 they were contained while in r15 they are not… 🙁
Hi,
I confirm you the total GPRS counter is saved on NVM.
at+gmr
10.00.025
OK
at#sd=1,0,510,"xyz.xyz.xyz.xyz",0,0,0
CONNECT
Hello1234567890
OK
SRING: 1
at#gdatavol=2
#GDATAVOL: 1,2709,1643,1066
OK
at#sh=1
OK
at#gdatavol=2
#GDATAVOL: 1,2789,1683,1106
OK
at#shdn
OK
at#gdatavol=2
#GDATAVOL: 1,2789,1683,1106
OK
My sequence is a little bit longer, but I cannot see any suspicious:
Hardy
How many modules you have tested, are behaving in this way?
For sure this is not a software feature of a standard module.
Can you please check if other parameters that are normally stored in NVM are kept on no?
e.g.
AT+CGDCONT=1,"IP","internet"
AT#MSCLASS=1,0
Can you check if the values are kept after shutdown?
Actually I have only one module available in my test environment. Firmware version is 10.00.024.
AT#MSCLASS behaves as expected:
Shutdown of the module and subsequent start up of the module shows:
GDATAVOL shows the same as before: after startup of the moduleit shows
Any ideas?
Thanks
Hardy
Working together with Hardy we found the solution.
#GDATAVOL=2 is stored in NVM once the PDP context is deactivated (AT#SGACT=1,0).
In his application there is about one second between AT#SGACT=1,0 and AT#SHDN and after 100ms, VBATT is removed.
When #SGACT is issued, the OK is returned immediately but the PDP deactivation procedure can take more seconds.
The solution was in this case to verify with AT#SGACT? that the context was really deactivated #SGACT: 1,0, before remove the power.
In any case it is no recommended to remove the power from VBATT, 100ms after AT#SHDN since the network detach procedure can takes 2-3 seconds in normal conditions.