Posted 26 May 2012 - 12:22 PM
Hello,
I am using Computercraft and RedPower and I just build a little network of ca. 12 PCs.
All of these are connected through bundled cables but two (the PC in my house :)/>/> and one of the PCs in the center)
also have a modem.
Now I got a program on two PCs running which just loops with os.pullEvent and responds to network pings (rednet.send(…, "ping"))
with a "pong".
On my home PC I wrote a little ping program which either sends a broadcast ping (when it is launched without paramaters) or it sends a
ping to every hostid it gets as a parameter…
So… now comes the strange stuff :/
When I send a broadcast ping only the PC with modem responds…
When I ping the PC with the modem directly (through the parameter) I get a response from host 14 (which doesn't event exist.. the hostid pinged was 6).
When I ping the PC that doesn't have a modem directly the same happens… I get a response from host 14 (the real hostid is 7)
When I ping a hostid that doesn't exist there is no response at all.
Therefore it seems as if the programs on the pinged hosts receive the pings and also respond to it correctly.
But somehow the ping program receives the wrong host ID…
Also it seems as if rednet.broadcast only works on wireless…
Any help would be appreciated…
If you need my programs I can attach them here, but currently I think it's not the code.
I am using Computercraft and RedPower and I just build a little network of ca. 12 PCs.
All of these are connected through bundled cables but two (the PC in my house :)/>/> and one of the PCs in the center)
also have a modem.
Now I got a program on two PCs running which just loops with os.pullEvent and responds to network pings (rednet.send(…, "ping"))
with a "pong".
On my home PC I wrote a little ping program which either sends a broadcast ping (when it is launched without paramaters) or it sends a
ping to every hostid it gets as a parameter…
So… now comes the strange stuff :/
When I send a broadcast ping only the PC with modem responds…
When I ping the PC with the modem directly (through the parameter) I get a response from host 14 (which doesn't event exist.. the hostid pinged was 6).
When I ping the PC that doesn't have a modem directly the same happens… I get a response from host 14 (the real hostid is 7)
When I ping a hostid that doesn't exist there is no response at all.
Therefore it seems as if the programs on the pinged hosts receive the pings and also respond to it correctly.
But somehow the ping program receives the wrong host ID…
Also it seems as if rednet.broadcast only works on wireless…
Any help would be appreciated…
If you need my programs I can attach them here, but currently I think it's not the code.