NguyenQVu
Posts: 1
Joined: Fri Sep 27, 2013 4:17 pm

Network Programming Problem

Fri Sep 27, 2013 4:39 pm

Hi all, I have a problem that:

I'm writing a simple socket connection program through network ( client program is on raspberry and connect to server program on my ubuntu laptop ).
It's all ok when I plug both laptop and rpi to a Router. But when i plug them to a Switch ( without internet access ), my client program cannot connect to server program ( although i can ping and ssh from laptop to raspberry normally ), the error when running connect() function of client program is "Connection timed out". I think the problem is around the Switch. But I don't know what it is.. my rpi running Raspbian, i already set static ip for my raspberry and my laptop

Can anyone help me? Thanks so much for reading.

gmc
Posts: 123
Joined: Fri Mar 09, 2012 11:31 am
Location: Cheshire, UK
Contact: Website

Re: Network Programming Problem

Sun Sep 29, 2013 9:10 pm

From the pi can you ping the server. Are you using the IP or the server name?

Return to “C/C++”