In NCS v1.6.99 the HEX data format is removed from data send and receive commands (socket, udp/tcp cli/srv), only ascii and data mode is supported.
In case of binary data, there is required double silence both before and after the termination command of data mode.
CONFIG_SLM_DATAMODE_SILENCE is in seconds, so minimal 2s to exit data mode.
That behavior wastes energy by extending wakeup time for battery operated devices.
Proposal for #XSEND (and other send commands) - add optional parameter for data length, exit data mode after that many bytes.
Examples:
AT#XSENDTO="test.server.com",1234,,4
test
#XSEND: 4
OK
AT#XSENDTO="test.server.com",1234,"data"
#XSEND: 4
OK
It would be also convenient to be able to get data from #XRECVFROM asynchronously like in #XUDPCLI because minimum timeout is 1s
#XRECVFROM: <size>,<ip_addr>,<port>
Example:
#XRECVFROM: 4,"10.0.0.1",1234
data
Thank you.