2018-01-24 05:43 AM
Hi,
I'm working on SPWF04 linked by UART with a NUCLEO F411RE board; I'm facing with a strange problem: I'm trying to connect with an NTP server to synchronize the NUCLEO RTC, so after create a wifi connection, I open the socket, send the data, but the server not answer even if the request going well. This is what I send and what I receive:
TX: AT+S.SOCKON=193.204.114.105,123,,u
RX: AT-S.On:193.204.114.105:0
RX: AT-S.OK
TX: AT+S.SOCKW=0,48<CR><ESC><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>
RX: AT-S.OK
but after if I try to check any answer, I read:
TX: AT+S.SOCKQ=0
RX: AT-S.Query:0
RX: AT-S.OK
Please, could anyone tell me what's wrong ? Where's the problem ?
Regards
Davide Urbano
#spwf04 #ntp2018-01-24 06:44 AM
Build you own port 123 listener on the network and confirm you can receive packets.
2018-01-24 06:46 AM
Please, could you tell me how ?
2018-01-24 07:02 AM
NTP server is a public server (ntp.inrim.it) but I can see the ping to this server going well...is really really strange...I tested the server from my PC and is up and working well.
2018-01-24 07:27 AM
Can you see the NTP packets (UDP 123) from the board. I guess you can sniff them in the middle.
We need to know if the NTP packets from the boards are seen in the network.
2018-01-24 07:44 AM
Ping to the NTP server going well...now install Wireshark and check the packets...
2018-01-24 07:55 AM
Is the NTP server connected through the LAN port to the network - try to sniff the traffic (if linux - try tcp dump ) to see if the NTP request reaches the server.
The WiFi side: can you ping the NTP server - just to check the routing.
Can other device (real host connect to this time server) - just to verify that the NTP service is up and working.
Sniffing is the best way to follow OR look at the NTP Server logs to see if the NTP Client was able to reach the Server.
2018-01-24 07:59 AM
Wireshark is recommended if you do not use tcpdump.
Sorry I wasn't not able to edit the post.
2018-01-24 08:31 AM
Is the ping going well from the SPWF04 too?
I have just done the following:
AT+S.PING=,,193.204.114.105
AT-S.Start:193.204.114.105AT-S.Reply:56:52AT-S.Stop:0:52AT-S.OKAT+S.SOCKON=193.204.114.105,123,,uAT-S.On:193.204.114.105:0AT-S.OKAT+S.SOCKW=0,48<CR><ESC><NULL>.......AT-S.OK+WIND:55:Pending Data::0:48:482018-01-24 08:34 AM
Great idea to verify ping to check the routing. Also we want to see if the NTP packets are leaving the box since we have no response (it does not have to be the server if the packets do not leave the box)