| Posted: 11:29am 24 Aug 2023 |
|
|
|
I've now received another Pico W. I've been able to set up communication between two Webmites via an HTML page. It's working great, thanks to all especially to Tassy Jim.
I upgraded to WebMiteV5.07.08b4 in order to be able to use fixed IP addresses. This works fine on my remote Webmite. However the master is getting NTP time from the internet. This works fine if I let the router allocate the IP address, but if I fix the IP address it fails. I can't see where my error is.
'Setup NTP time DO WHILE MM.INFO(IP ADDRESS) = "0.0.0.0" IF TIMER > 5000 THEN CPU RESTART LOOP
ON ERROR SKIP 3 WEB NTP 1 IF MM.ERRNO THEN WEB NTP 1 IF MM.ERRNO THEN PRINT "Failure to connect to the Internet" : CPU RESTART
When using fixed IP I get the error message from the last line above in the console output.
Pico_MS connecting to WiFi... Connected 192.168.1.242 Starting TCP server at 192.168.1.242 on port 80 Failure to connect to the Internet
When using DHCP I get
PICOE6616408437 connecting to WiFi... Connected 192.168.1.242 Starting TCP server at 192.168.1.242 on port 80 ntp address 162.159.200.1 got ntp response: 24/08/2023 11:59:05
If I comment out the NTP time code above there are no error messages when using fixed IP address.
I'm sure it must be some rookie error, but I'm not seeing it.
Derek |