EMX PPP DNS Not working

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

You default gateway is wrong

IP Address: 10.172.24.11
Subnet Mask: 255.255.255.0
Default Getway: 192.168.111.111

But I do not set it. That is what I get after connecting. Why would it be wrong and how do I fix it?

hmm
he default’s gateway’s IP address is really strange. IT is from a completely different subnet from the client IP address.

Ok. try to connect through a PC using the same modem and check if you get the same or close addresses. then chekc if you can access the DNS server. from the PC.

Sorry it took so long to come back, but I was cut of from the civilized world since late Friday afternoon (GMT +0200).

Anyway, I need some guidance on connecting it to the PC. I have no clue how to do that. I’m using Windows 7 Pro. Any help in this regard will also be much appreciated.

Regards
NXB

Usually the Modem manufacturers provide a software or examples on how to do that.

But here is a hint, of course you need to research the details, you need to connect the modem through an RS232 connection to one of the PC,s COM ports. If you don’t have COM port on your PC then you need to use one of these USB-to-Serial cable that enumerates as a virtual COM port. Then you need to create a Dial-up connection and use the same settings you used on EMX.

Thanks,

I will try that quickly.