Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Java Datagram problem | Telit Cinterion IoT Developer Community

June 28, 2016 - 2:20pm, 6344 views

Hello,

Why do i get Invalid host Exeption when trying to enter url address in the following statment:

String server = "0.europe.pool.ntp.org";

Datagram sendDatagram = udp.newDatagram(buf, buf.length, "datagram://"+server+":123"); 

If i enter ip address    in the server varible works just fine?

I even tried to  add dns  in connURL but no luck... 

connURL.append(";dns=213.229.192.161");

Is there a dns problem or newDatagram throws  exeption?

Regards,

T.