Sign in to follow this  
Followers 0

Mutlicast Datagram

1 post in this topic

Hi there,

I try to find a Mediabox (B1080 PX-3) in my local network. There is a program (called "Pop-Center") which can easily find the MAC and the IP Address of the Box by sending two strings via UDP on IP at port 5555. Then it tooks some seconds and then the mediabox send its MAC address back to the Pop-Center. On Wireshark it looks like this (In the Attachement is the full Wireshark file):


Now i tried to do the same, when i take a look at Wireshark, exactly the same happens. UDP -> two String on -> some secs -> Mediabox send the MAC. But I dont receive anything in my AutoIt script. It seems like, that IBM using a similar method to find their Boxes in the LAN. I found this URL, but I can't translate it completly in AutoIt.

Here is what i got sofar:

;this are the two strings
$b01 = Binary("0x5365617263685f47726f75703a300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
$b02 = Binary("0x506f705f5365727665723a3139322e3136382e302e32000000000000000000000000000000000000000000000000000000000000000000000000000000000000")

;strings -> console

;Connecting to
$hUPDopen = UDPOpen("", 5555)
If @error Then Exit MsgBox(16, "", "")

;Bind a socket on my ip (
;im not sure if i need this!
$hUPDbind = UDPBind(@IPAddress1, 5555)
If @error Then Exit MsgBox(16, "", "")
;sending the two strings
ConsoleWrite("Send: " & UDPSend($hUPDopen, $b01) & "/" & BinaryLen($b01) & @CRLF)
ConsoleWrite("Send: " & UDPSend($hUPDopen, $b02) & "/" & BinaryLen($b02) & @CRLF)

While 1
    ;wait for recv... endless...
    $data = UDPRecv($hUPDopen, 50)
    If @error Then ConsoleWrite("Err: " & @error & @CRLF)
    $data &= UDPRecv($hUPDbind, 50)
    If @error Then ConsoleWrite("Err2: " & @error & @CRLF)
    If $data <> "" Then MsgBox(0, "", $data)

Func cleanup()
EndFunc   ;==>Cleanup

Any Ideas? Thank you for reading :unsure:


Spider - Moderator of the German AutoIt Froum

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0