UDP on HD210
Hello,
I have a script that receives a UDP packet and it works fine on an HD2000 but doesn't work on the HD210. For the 2000 I name it autorun.bas and for the 210 it's named autorun.brs. Other than that it's exactly the same. Is there something else that needs to be done to get it to work on the HD210? I've included the script below.
Thanks,
Brian
nc = CreateObject("roNetworkConfiguration", 0)
nc.SetIP4Address("10.3.10.52")
nc.SetIP4Netmask("255.255.255.0")
nc.SetIP4Broadcast("10.3.10.255")
nc.SetIP4Gateway("10.3.10.1")
nc.Apply()
u=CreateObject("roUrlTransfer")
v=CreateObject("roVideoMode")
v.SetMode("800x600x75p")
p=CreateObject("roMessagePort")
i=CreateObject("roImagePlayer")
i.DisplayFile("Energy0.bmp")
v1=CreateObject("roVideoPlayer")
udp=CreateObject("roDatagramReceiver", 21075)
udp.SetPort(p)
ListenLoop:
msg=wait(0,p)
if type(msg) = "roDatagramEvent" then
if msg = "STOP" then
v1.Stop()
else if msg = "PLAY" then
goto FlagLoop
endif
endif
goto ListenLoop
FlagLoop:
nc.SetDHCP()
nc.Apply()
u.SetUrl("http://artfiles.art.com/images/-/USA-Flag-Poster-C10084150.jpeg")
u.SetPort(p)
u.AsyncGetToFile("flag.jpg")
url_loop:
msg=wait(0,p)
if type(msg)="roUrlEvent" then
if (msg.GetInt() = 1) then goto displayFlag
endif
goto url_loop
displayFlag:
i.DisplayFile("flag.jpg")
LoopLoop:
goto LoopLoop