473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Strange: Cannot recieve UDP packets that are broadcast on the network.

Hi All,

I have this problem,

I have developed a Master - Slave kinda appliacation , were the slave
is generally a device.when i broadcast a message from my application,
the Device seems to recieve the message and responds correctly, and
replies with a broadcast frame. Here is where i face the problem, what
happens is that my application seems to Time out even if Ethereal (
Network Sniffer ) detects and shows all the frames that were
broadcasted.

I have used a Event based approach for the sockets ( Winsock 1.1 for
UDP ) in C++ . I never faced this problem when it was being simulated
here ( Windows 2000 machine ) , using another computer on the same
network, that ran a Third part server. But when i went on site and
tested it with a actualy device ( ran My application on a Xp Machine ),
i noticed this problem.

Thank you in Advance...

Nov 14 '06 #1
7 2716
VJ
sreehari wrote:
I have developed a Master - Slave kinda appliacation , were the slave
is generally a device.when i broadcast a message from my application,
the Device seems to recieve the message and responds correctly, and
replies with a broadcast frame. Here is where i face the problem, what
happens is that my application seems to Time out even if Ethereal (
Network Sniffer ) detects and shows all the frames that were
broadcasted.
Ethereal detects all packets on the hardware, therefore it means your
packet was received, but blocked by a higher layer
I have used a Event based approach for the sockets ( Winsock 1.1 for
UDP ) in C++ . I never faced this problem when it was being simulated
here ( Windows 2000 machine ) , using another computer on the same
network, that ran a Third part server. But when i went on site and
tested it with a actualy device ( ran My application on a Xp Machine ),
i noticed this problem.
Can be anything, most likely blocked ports...

Anyway, if it works on one machine and not another - most likely not a
c++ problem :d
Nov 14 '06 #2

VJ wrote:
Ethereal detects all packets on the hardware, therefore it means your
packet was received, but blocked by a higher layer
so do u suggest that implementing somethin in Raw Sockets, ( tho have
never done that befo ) would be helpful in such case ?
Can be anything, most likely blocked ports...

Anyway, if it works on one machine and not another - most likely not a
c++ problem :d
Yup , has nothin to do with C++, but i just wanted to confirm if it had
to do with enabling if any socket flags while implementation. Well but
again like ya said, since it works on One machine , why not the other ?
:(

Nov 14 '06 #3
VJ
sreehari wrote:
VJ wrote:
>>Ethereal detects all packets on the hardware, therefore it means your
packet was received, but blocked by a higher layer

so do u suggest that implementing somethin in Raw Sockets, ( tho have
never done that befo ) would be helpful in such case ?

>>Can be anything, most likely blocked ports...

Anyway, if it works on one machine and not another - most likely not a
c++ problem :d


Yup , has nothin to do with C++, but i just wanted to confirm if it had
to do with enabling if any socket flags while implementation. Well but
again like ya said, since it works on One machine , why not the other ?
:(
Yes, the socket is wrongly configured. You can check next things:
1) wrong server and client names provided
2) blocked ports
Most likely one these 2 (or both)
Nov 14 '06 #4
Yes, the socket is wrongly configured. You can check next things:
1) wrong server and client names provided
2) blocked ports
Most likely one these 2 (or both)
Not sure what you ment by wrong server and client names ? cos AFAIK
using UDP , when one broadcasts a message , there is no specific
recipient, and hence it has to be recieved by all open ports on that
network.

Another thing regarding blocked ports,
the device that i am talking about, sends me two kinds of messages,
one it sends directly to my computers Ip address, which i recieve with
out any problem, and the second, it broadcasts to the whole network for
which my application fails to read and times out.

The same setup when i run it with a 3rd party application ( instead of
my application i run the 3rd party application on my comp and
communicate it with the device, so the remaining set up is the same )
the third party application seems to read all the packets with out any
problem, when both my application and the 3rd party application send
and recieve the same kind of frames from and to the device.

Nov 14 '06 #5
On 14 Nov 2006 03:39:00 -0800, "sreehari" <ps*********@gmail.com>
wrote:
>Yes, the socket is wrongly configured. You can check next things:
1) wrong server and client names provided
2) blocked ports
Most likely one these 2 (or both)

Not sure what you ment by wrong server and client names ? cos AFAIK
using UDP , when one broadcasts a message , there is no specific
recipient, and hence it has to be recieved by all open ports on that
network.

Another thing regarding blocked ports,
the device that i am talking about, sends me two kinds of messages,
one it sends directly to my computers Ip address, which i recieve with
out any problem, and the second, it broadcasts to the whole network for
which my application fails to read and times out.

The same setup when i run it with a 3rd party application ( instead of
my application i run the 3rd party application on my comp and
communicate it with the device, so the remaining set up is the same )
the third party application seems to read all the packets with out any
problem, when both my application and the 3rd party application send
and recieve the same kind of frames from and to the device.
Although this is OffTopic, I will try to give you a hint: are you
using socket function "connect"? If it is so, please read connect
description and you will see why all this is happening to your
porgram.

Regards,

Zara
Nov 14 '06 #6


On Nov 14, 5:09 pm, Zara <me_z...@dea.spamcon.orgwrote:
Although this is OffTopic, I will try to give you a hint: are you
using socket function "connect"? If it is so, please read connect
description and you will see why all this is happening to your
porgram.

Regards,

Zara
Have not used the "connect" function as its an UDP , datagram, and is
a connection less sockets, also when doing a broadcast , not sure which
Ip to connect to ?

regarding the Off topic post, did not get any response from the correct
groups, programmer.winsock, and so on, also since its coded in C++,
posted it here.

Nov 14 '06 #7
VJ
sreehari wrote:
>
On Nov 14, 5:09 pm, Zara <me_z...@dea.spamcon.orgwrote:
>>Although this is OffTopic, I will try to give you a hint: are you
using socket function "connect"? If it is so, please read connect
description and you will see why all this is happening to your
porgram.

Have not used the "connect" function as its an UDP , datagram, and is
a connection less sockets, also when doing a broadcast , not sure which
Ip to connect to ?
When you use UDP, you do not connect. When broadcasting, all computers
in a network gets a message, therefore no need to supply an IP.

I havent used broadcasting, so cant tell more :(

Tried looking other newsgroups? Or googling for UDP broadcast?
Nov 14 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Adam Balgach | last post by:
Greets all, i am in the process of writing a simple client/server file upload program that sends data via UDP packets. I have the process of opening.sending, recieving & writing all working...
0
by: Alphamacaroon | last post by:
All, I'm wondering if anyone can help me with a strange problem I'm having. First off, here's what I'm trying to do: I'm developing a UDP network application that should allow the end user to...
2
by: Gerard Stafleu | last post by:
I have a project with the following module: Module mdlDeclarations Public Enum getMethod gmFirst gmLast End Enum End Module and the following class:
5
by: cmrchs | last post by:
Hi, I try to build code that is located on a network drive but allways get a Security Exception ??? How can I solve this ? (we need to keep the code on the server) thanks Chris
1
by: cmrchs | last post by:
Hi, I try to build code that is located on a network drive but allways get a Security Exception ??? How can I solve this ? (we need to keep the code on the server) thanks Chris
0
by: Wilson | last post by:
Hi, I got two strange problems today. 1. I have deleted a page - "default2.aspx" in the web site. But when I type the link again, it still display it. How can I remove it ? 2. I have a...
6
by: White Spirit | last post by:
I have the following code to send a packet to a remote socket and receive a response in return: System.Net.Sockets.Socket locSocket = new System.Net.Sockets.Socket (AddressFamily.InterNetwork,...
4
by: FireWall | last post by:
Hi all, I have a question about the netsh command. I looked everywhere but nobody seems to have my problem. For the moment if i do "netsh wlan show profiles" i see my current network under the...
7
by: maheshinvent | last post by:
Hello friends I need to know how data packets are actually transferred through network adapters...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.