Wait for ^PBREADY before using Internet Services? | Thales IoT Developer Community
June 21, 2018 - 12:24pm, 4022 views
Hello,
When switching on my EHS6 (same with ELS61), after several seconds (after ^SYSSTART URC) the ^PBREADY URC appears.
Have I to wait with opening Internet Services (e.g. AT^SISO) for this URC?
Most time it seems to work, but can it cause problems?
^SYSLOADING
^SYSSTART
.......
AT+CREG?
+CREG: 0,5
OK
AT+CGREG?
+CGREG: 0,5
OK
AT+CSQ
+CSQ: 12,99
OK
......
AT^SISO=0
OK
^SIS: 0,0,2100,"Ftp open(80.66.37.34:21)"
^SIS: 0,0,2100,"220 DS214 FTP server ready."
+PBREADY
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"put VERIBOX-23125-21062018-091816.csv"
^SISW: 0,1
AT^SISW=0,53
^SISW: 0,53,0
OK
^SISW: 0,1
AT^SISW=0,0,1
^SISW: 0,0,0
OK
^SIS: 0,0,2100,"226 Transfer complete."
Thanks and best regards
Klaus
Hello,
This URC means that the module has finished reading data from SIM card so the network registration should rather not start before this URC. It is generally a good practice to verify a network registration status and not to proceed with network connections opening until the module is registered to the network. And to add a delay of at least 100ms between the consecutive AT commands execution to let all the URCs be thrown.
Regards,
Bartłomiej
Hello Bartłomiej,
thanks.
But as you can see some lines above, I called the CREG command, and the module is already booked in approx. 5s before the PBREADY URC appears.
Hello,
Yes, I have noticed that. I have probably never seen such sequence. My suspition was that '+PBREADY' URC might have been delayed for some reason, it could be because there were no delays between consecutive AT commands as it is recommended in AT commands specification. That's why I mentiond this 100 ms.
Is it always in this order regardless if the commands are sent automatically or manually?
Can you paste ATI1 command output?
Regards,
Bartłomiej
Hello Bartłomiej,
When sent manually, +PBREADY appears earlier, because it lasts longer to input the commands.
Also when sending automatically and make 2 seconds wait e.g. after ^SYSSTART, it comes earlier.
I think it has nothing to do with the 100ms delay, because I have a 1000 ms delay after each +CREG? command.
ATI1 for EHS6:
REVISION 03.001
A-REVISION 00.000.51
JRC-1.56.54-CDG-00006.01.jad
And for ELS61:
REVISION 02.000
A-REVISION 01.000.00
JRC-1.62.01.jad
Best regards
Klaus
Hello,
The question would be what is happening before the application asks for CREG. If it is the first command issued after SYSSTART URC or not. I suppose not because module ***** some time to register and before that it ***** to communicate with the SIM card.
Could you paste the complete log from the start, possibly with timestamps?
To be consistent with the documentation no command should be sent before SYSSTTART and the application should wait at least 100ms before each command execution (after getting reply from the previous one).
If 100ms was not the case (for low baudrates in case of RS232 it ***** to be more) I'd still suppose that maybe your application's activity just after SYSSTART together with some module's initialization that might still be taking place in the background may cause that this PBREADY URC is delayed a little bit. Nevertheless this delay should not make any harm as it's just a notification. The workaround for this could be, as you have discovered, to wait a few seconds after SYSSTART or to wait for +PBREADY before starting network activity.
Best regards,
Bartłomiej
Hello Bartłomiej,
thanks. I only wanted to know if late +PBREADY may be a problem.
But when I understood you right, successful CREG signals that the module is ready for further commands?
Best regards
Klaus
Hello,
Successful CREG means that the module is registered to the network. So it is ready for network connections.
Regards,
Bartłomiej