Names of URCs are equal to command responses | Telit Cinterion IoT Developer Community
December 6, 2017 - 4:02pm, 1906 views
Hello,
we do development based on ELS61-E modules and UDP. One of the most anoying issue we experience is that it is very hard to decide if out an URC or the reply to a command was received via UART. Since URCs do happen during command execution this is no theoretical issue.
Example command "AT^SISR=0,1000"
Example command reply: "^SISR: 0,42" (42 Bytes are ready to read for service profile 0)
Example URC that may happen: "^SISR: 0,1" (Data is ready to read for service profile 0)
The same applies to other commands.
Regarding this, what are your sugesstions for proper driver implementations?
Best regards,
Seb
Hello,
You are right that in this case the syntax of URC is the same as the syntax of SISR command reply. However you only expect the command reply after sending the command and in other cases you can only expect the URC. Moreover URC only can have 2 values in the second parameter. The command reply is followed by data. Please also see the examples in the AT commands specification document - URC's are thrown in the specific moments and then the implementation should expect them.
Best regards,
Bartłomiej
Thanks for the clarification.
Well we experienced URCs (e.g. SISR-URC) while writing SISR commands and waiting for response although we included the suggested delay of 100 ms after every AT command. Maybe some other constraint is not met in our software.
If replies from the module are interpreted line based as done in most cases i saw when handling AT-based devices, the information how one line must be interpreted ist required just when it arrives. Otherwise every driver implementation would become way more complex than it could be.
We will try to take more care when URCs are expected and when not.
Regards,
Seb
In fact there are many other URC's that can be thrown by the module so the application must also be ready for that. But here the only proble is that the name is equal.
On the other side URC's should not be thrown in the middle of a command between the command echo and OK/ERROR reply.
And if this will become a real problem for your application besides the URC mode there is also the polling mode available where these internet services URC's are not thrown and the user application must retrieve all status information needed to control an internet session.
Regards,
Bartłomiej