[En-Nut-Discussion] TCP connection to fixe IP

Ulrich Prinz uprinz2 at netscape.net
Thu Nov 12 21:24:13 CET 2009


Hi Gilles,

I am not a moderator, but I have to interrupt because some clarification 
is needed.

Please specify the _complete_ configuration of the networks and devices. 
Otherwise no one can help.

A device on a network has 3 parameters not two, a Router has more.

So to understand your problem we need:
EtherNut IP
EtherNut Netmask
EtherNut Gateway

Your routers parameters for the internal network:
IP
Netmask

If your Router spans a network of IP/Netmask 192.168.0.254/255.255.0.0
and your EtherNut has a IP/Netmask of 192.168.1.86/255.255.0.0
and this does'nt work, Nut/OS has a problem.

If _one_or_both_ of these devices has/have a netmask of 255.255.255.0 
like it is defined for the Class-C Range 192.168.x.y, you have a problem 
with the configuration.
Remember that, again, 192.168.x.y is an IP-Range defined for 256 Class-C 
networks what means, that there should be a 255.255.255.0 netmask. Very 
often Home-Routers are assuming an Class-C Netmask if they are assigned 
to 192.168.x.y. networks.
I know, that 10.x.y.z is used to be 1 Class-A network, where 255.0.0.0 
is the right netmask. I forgot about the Class-B, i.e. 255.255.0.0

As all these networks specify numberings for internal networks, everyone 
is free to use it as specified... or not.

If you use a Class-B network and there is no router in between your 
ethernut on 192.168.1.x and your internet-router on 192.168.0.y then you 
have to set the netmask in every device on both networks to 255.255.0.0

I hope, you can clarify the situation, so we are talking about the same 
data to find the bug.

I cannot really believe that exchanging ip-packets through the internet 
doesn't work with Nut/OS, as I use the Elektor Internet Radio. It gets 
its playlists via http-request and receives the selected streams without 
any problems.

Best regards,
Ulrich

Gilles schrieb:
>  
> 
> Hi all,
> 
> I have developed a piece of code to establish a dialog between my ARM9 board
> and a PC in 2 different location.(2 different IP fix addresses)
> 
>  
> 
> When the PC establish the TCP link ,  the ARM9 receive and respond to the
> TCP frame correctly.
> 
>  
> 
> If I try to establish the TCP dialog starting from the ARM9, it fails on the
> NutTcpConnect(sock1,dest_addr, PortSend)
> 
>  
> 
> All is good if I stay inside my office network.
> 
>  
> 
> Mask and IPgate seems correct.
> 
>  
> 
> Is anybody has an idea about my trouble?
> 
>  
> 
> Thanks for the help
> 
> Best regards
> 
> Gilles
> 
>  
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list