I am looking for some help in interpreting the data received from +KUDP_DATA (unsolicited notification).
I configured BX310X (v.2.7.3) module as client and setup a UDP connection to send a client request to NTP server, in order to receive a timestamp.
UDP Configuration:
AT+KUDPCFG=<cnx_cnf>,,<udp_port>,<data_mode>
cnx_cnf : left blank
mode : 0 - client, 1 - server
udp port : assigned 0
data mode: 0 (Default) — Do not display in URC, 1 — Display in URC
AT+KUDPSND=<udp_session_id>,<udp_remote_address>,<udp_remote_port>, //NTP server address and Port
udp_remote_address = 0.pool.ntp.org
udp_remote_port = 123
Communication between BX310X module and NTP server:
Tx>> AT+KUDPCFG=,0,0,0
Smodule_Rx<<
+KUDPCFG: 1
OK
Tx>> AT+KUDPCFG?
Smodule_Rx<<
+KUDPCFG: 1,0,0,0
OK
Tx>> AT+KUDPSND=1,0.pool.ntp.org,123,"\1b00000000000000000000000000000000000000000000000,48"
Smodule_Rx<<
OK
+KUDP_DATA: 1,48,“162.159.200.1”,123,0ç
The time request packet is of 48 bytes which has been sent successfully and received a response of 48 bytes from NTP server (Reference for NTP client Time request packet is here).
My question is how to process this received data in order to put it in desired timestamp format.
From the user manual, I could see:
+KUDP_DATA: <udp_session_id>, <ndata_available>, <udp_remote_address>, <udp_remote_port>, data
where, data (UDP data packet received)
• Data in octet format (raw bytes, no encoding)
Kindly let me know how can I read this received data, or please inform if I have missed out something in configuration.
Thank you very much in advance.