473,326 Members | 2,438 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,326 software developers and data experts.

[offtopic?] problem with UDP broadcast on Windows XP

Hello

Sorry this might be a bit offtopic but I don't really know where else
to post this question. If you could point me in the right direction that
is much appreciated.

I'm running into a weird thing on Windows XP.

I'm using Python 2.5 with latest pywin32 from Mark Hammond.

I have this UDP socket server that binds on ('',9090) and is used
to be a broadcast responder. It works fine when I start the server
from the cmd prompt. UDP broadcast packets sent to ('<broadcast>',9090)
arrive in the server.

However now I'm running the same server as a Windows NT Service.
The same code is executed, the UDP server socket is bound to the
same address. But this time, the UDP broadcast packets do NOT arrive.... !?

When sending an UDP packet to the server's IP address directly,
it works. So the socket server is running.
Only thing is it doesn't seem to receive any broadcast packets.

Is this a known 'feature' of a windows NT service?
Doesn't windows allow a service to receive broadcast packets?
Again, sorry that I post this here it is probably more of a windows
question. But I don't know a good place to ask this type of thing.

Thanks for any help,
--Irmen de Jong
Apr 9 '07 #1
9 3672
En Mon, 09 Apr 2007 08:43:23 -0300, Irmen de Jong <ir**********@xs4all.nl>
escribió:
I have this UDP socket server that binds on ('',9090) and is used
to be a broadcast responder. It works fine when I start the server
from the cmd prompt. UDP broadcast packets sent to ('<broadcast>',9090)
arrive in the server.

However now I'm running the same server as a Windows NT Service.
The same code is executed, the UDP server socket is bound to the
same address. But this time, the UDP broadcast packets do NOT arrive....
Try running the service impersonating another user (not LOCAL_SERVICE, the
default).
You can change that from the service control panel.

--
Gabriel Genellina

Apr 9 '07 #2
Gabriel Genellina wrote:
Try running the service impersonating another user (not LOCAL_SERVICE,
the default).
You can change that from the service control panel.
Alas, that didn't change anything.
I made it run as a user account that has admin privileges even,
and it still doesn't respond to the broadcasts. :-(

--Irmen
Apr 9 '07 #3
En Mon, 09 Apr 2007 13:08:03 -0300, Irmen de Jong <ir**********@xs4all.nl>
escribió:
Gabriel Genellina wrote:
>Try running the service impersonating another user (not LOCAL_SERVICE,
the default).
You can change that from the service control panel.

Alas, that didn't change anything.
I made it run as a user account that has admin privileges even,
and it still doesn't respond to the broadcasts. :-(
Ouch, no more ideas from me. You'll surely get more answers from a Windows
networking group - this appears not to be related to Python anyway.

--
Gabriel Genellina

Apr 9 '07 #4
Gabriel Genellina wrote:
Ouch, no more ideas from me. You'll surely get more answers from a
Windows networking group - this appears not to be related to Python anyway.
Yeah I know that... That's what I mentioned in my original post...
But I'm a noob on that type of thing, no idea where to get reliable
help. So I hoped the good folks in this group could help me out a little. :)
Thanks for your idea anyway!

-Irmen
Apr 9 '07 #5
"Irmen de Jong" <i..n.******@xs4all.nlwrote:

Gabriel Genellina wrote:
Try running the service impersonating another user (not LOCAL_SERVICE,
the default).
You can change that from the service control panel.

Alas, that didn't change anything.
I made it run as a user account that has admin privileges even,
and it still doesn't respond to the broadcasts. :-(
I am not sure if this is at all relevant - but I seem to recall seeing
something once that had a list of socket numbers, splitting them
between UDP & TCP - can the socket actually rx UDP?

- Hendrik

Apr 10 '07 #6
Hendrik van Rooyen wrote:
"Irmen de Jong" <i..n.******@xs4all.nlwrote:

>Gabriel Genellina wrote:
>>Try running the service impersonating another user (not LOCAL_SERVICE,
the default).
You can change that from the service control panel.
Alas, that didn't change anything.
I made it run as a user account that has admin privileges even,
and it still doesn't respond to the broadcasts. :-(

I am not sure if this is at all relevant - but I seem to recall seeing
something once that had a list of socket numbers, splitting them
between UDP & TCP - can the socket actually rx UDP?
That's probably a red herring, Hendrik. Both UDP and TCP define ports
from 1 through 65535, and so a port number doesn't "belong" to one
protocol or the other.

It's most likely, I suspect without knowing to much about it, that the
service is stalling because of a failure to "pump" Windows messages.
Irmen, are you taking any action in your service to ignore Windows
messages that your service process receives?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 10 '07 #7
Hendrik van Rooyen wrote:
>I am not sure if this is at all relevant - but I seem to recall seeing
something once that had a list of socket numbers, splitting them
between UDP & TCP - can the socket actually rx UDP?
Yeah, as I wrote: when I'm sending UDP packets to the port directly
on the server's IP address, it responds just fine.

It's just the broadcast packets that don't seem to arrive.
(sent to ('<broadcast>',9090) )

Steve Holden wrote:
It's most likely, I suspect without knowing to much about it, that the
service is stalling because of a failure to "pump" Windows messages.
Irmen, are you taking any action in your service to ignore Windows
messages that your service process receives?
Hm, seeing that it processes TCP and "directed" UDP packets just fine,
there shouldn't be a problem here?

No I'm not knowingly doing stuff that ignores windows messages...
(I could maybe put up the code if someone wants to take a look but
not right now. Need to rip a fair deal out - there's a lot of
other stuff in there that's not relevant to the problem.)

--Irmen
Apr 10 '07 #8
On Apr 10, 3:30 pm, Irmen de Jong <irmen.NOS...@xs4all.nlwrote:
Hendrik van Rooyen wrote:
I am not sure if this is at all relevant - but I seem to recall seeing
something once that had a list of socket numbers, splitting them
between UDP & TCP - can the socket actually rx UDP?
Yeah, as I wrote: when I'm sending UDP packets to the port directly

on the server's IP address, it responds just fine.

It's just the broadcast packets that don't seem to arrive.
(sent to ('<broadcast>',9090) )

Steve Holden wrote:
It's most likely, I suspect without knowing to much about it, that the
service is stalling because of a failure to "pump" Windows messages.
Irmen, are you taking any action in your service to ignore Windows
messages that your service process receives?

Hm, seeing that it processes TCP and "directed" UDP packets just fine,
there shouldn't be a problem here?

No I'm not knowingly doing stuff that ignores windows messages...

(I could maybe put up the code if someone wants to take a look but
not right now. Need to rip a fair deal out - there's a lot of
other stuff in there that's not relevant to the problem.)

--Irmen
I would investigate Windows security settings as a likely culprit. My
guess is that you are running WinXP SP2 with the default security
policies, which are likely to prohibit such promiscuous behavior.

Here's a URL that may shed some light, it seems surprisingly
instructive for MS support: http://support.microsoft.com/kb/842242 -
Some programs seem to stop working after you install Windows XP
Service Pack 2

-- Paul
Apr 10 '07 #9
Paul McGuire wrote:
I would investigate Windows security settings as a likely culprit. My
guess is that you are running WinXP SP2 with the default security
policies, which are likely to prohibit such promiscuous behavior.

Here's a URL that may shed some light, it seems surprisingly
instructive for MS support: http://support.microsoft.com/kb/842242 -
Some programs seem to stop working after you install Windows XP
Service Pack 2
Paul, that was terrific.
Seems that the windows firewall blocks the broadcast stuff for services.
After I disabled the thing, my service works again as intended!
Have to add this to the notes of my software ;)

Wonderful that my windows specific problem got solved in this Python group.

Thanks again for all the ideas everyone for my silly offtopic problem.

--Irmen
Apr 11 '07 #10

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

Similar topics

10
by: Flare | last post by:
Hi I just read and experimented with normal .net GUI apps and deployed them with notouch deployment strategie as smartclients. Is it just me, or i this an very neglected topic? For me it...
1
by: R Hedges | last post by:
Hi there-I'm an AMATEUR VB.NET programmer, who has hacked together a small VB.NET application that can get information from remote machines using the System.Management namespace. MY APPLICATION...
2
by: WhatHappend | last post by:
I have converted a .Net 1.0 application to .Net 2.0 and the web service invocations have delay of around 10seconds on each intial access. After the first access subsequent access are fast (After a...
0
by: salman | last post by:
Hello i have to broadcast over vpn. I have local network and vpn, LAN ips are 192.168.1.x and vpn ips are 10.0.0.x. i am creating vpn thru windows server 2003 RAS. i have to broadcast msgs over...
2
by: =?Utf-8?B?TWljaGVsIFNjaGF3YW5u?= | last post by:
Hi all, I try to create a service witch handle the session switch events: Lock, unlocked etc... I can do this with a standard executable like this (it's just an example):...
3
by: siujoe | last post by:
Hi, My app is written in vb.net 2003, I need to receive broadcast messages sent from another application written in VC++6. It doesn't seem i can import system.messaging, I also tried windows...
1
by: ElvisRS | last post by:
Hi, I'm writing a simple udp client using sockets. My code looks like this: initServer2 = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);...
2
by: Wolf Saenger | last post by:
Hi, Is Sombody using a Business Rule Manager System? Is there a affordable system to recomended? You opinion please tia / regards Wolf
9
by: Mythran | last post by:
Can someone please point me to some articles explaining how to convert the code comment xml files into MSDN documentation? I've made some modifications to Enterprise Library and would like to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.