Hi,
I’m using the PPP example from the documentation. Everything works fine until the DNS has to be tested. This is what I get in the output window:
Dial-in using AT commands
OK
OK
CONNECT 9600
AT connected, Ready for PPP connection Establishing!
Connect PPP
PPP connection was established!
PPP Network settings:
IP Address: 10.172.24.11
Subnet Mask: 255.255.255.0
Default Getway: 192.168.111.111
DNS Server: 196.207.36.251
Test DNS
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::getaddrinfo [IP: 0000] ####
#### System.Net.Dns::GetHostEntry [IP: 0008] ####
#### EMX_Application1.Program::Main [IP: 010c] ####
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
A first chance exception of type ‘System.Net.Sockets.SocketException’ occurred in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
Faild to Get the host entry of the FQN from DNS server!
Disconnect PPP link.
I removed the line
“IPHostEntry myIP = Dns.GetHostEntry(“www.ghielectronics.com”);”
and replaced it with
“IPAddress myIP = new IPAddress(MyGetHostEnrty(“www.ghielectronics.com”));”
using the MyGetHostEntry() function in the Telit_PPP example which results in this output:
Dial-in using AT commands
OK
OK
CONNECT 9600
AT connected, Ready for PPP connection Establishing!
Connect PPP
PPP connection was established!
PPP Network settings:
IP Address: 10.184.134.75
Subnet Mask: 255.255.255.0
Default Getway: 192.168.111.111
DNS Server: 196.207.36.251
Test DNS
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### System.Net.IPAddress::.ctor [IP: 0004] ####
#### EMX_Application1.Program::Main [IP: 010f] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in System.dll
Faild to Get the host entry of the FQN from DNS server!
Disconnect PPP link.
I tried using google’s Public DNS (8.8.8.8 and 8.8.4.4) Still the same. Any help will be appreciated.
Thanks