This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Zequan's profile picture

Networking

Started by Zequan, 12 June 2014 - 11:32 AM
Zequan #1
Posted 12 June 2014 - 01:32 PM
I'm trying to setup a big network from point A my place to point B my friends base. It's approximatly 1000 blocks aware and I am using networking cable, I am aware 256 blocks is the max the networking cable will work for a distance but I am wondering if there is any way to extend this range like adding extra computers along the way with 2 modems on each to relay the network? The main reason for this it to use talk and email and such other things.

Regards

Zequan
GamerNebulae #2
Posted 12 June 2014 - 01:58 PM
You can do it like they did with the intercontinental cable under the Atlantic Ocean. They use an amplifier every 50 km if I am not mistaking.
willhoot #3
Posted 12 June 2014 - 02:06 PM
you might also want to check the config file. you might be able to change the max range (but you might need chunkloaders because it will not work in unloaded chunks)
CometWolf #4
Posted 12 June 2014 - 02:42 PM
Or just do the logical thing, using wireless modems instead. 1 computer at the world height limit could reach another computer at the same height from 384(i forgot the exact range) blocks away. So you'd need 3-4 computers and 4 modems. Instead of 1k cable, 4 computers and 8 modems.
theoriginalbit #5
Posted 12 June 2014 - 02:48 PM
if you're using the latest version of ComputerCraft there is a program included on the computers called `repeat` simply setup a computer with two modems and run the program and it will send any message it receives from one modem out through the other modem.
Bomb Bloke #6
Posted 12 June 2014 - 04:06 PM
If using wireless modems, the "repeat" script should only require one to be attached to each repeater system.

Wired range is not configurable. Wireless is indeed the way to go, as it potentially has a longer range even with the default config. Assuming it's not raining…

It doesn't matter whether the signal has to pass through unloaded chunks so long as all the systems involved in sending / receiving it (including repeaters) are in loaded chunks.
Zequan #7
Posted 12 June 2014 - 05:43 PM
Unfortunatly the server I play on does not have the latest version with the 'repeat' command. Could someone pastebin the code for me so I can download it?
Lyqyd #8
Posted 12 June 2014 - 08:36 PM
Search github for "computercraftlua", someone put the Lua folder up in a repo. I think repeat is under rom/programs/rednet.
theoriginalbit #9
Posted 12 June 2014 - 10:24 PM
If using wireless modems, the "repeat" script should only require one to be attached to each repeater system.
actually taking a look at the code that actually made it into 1.6x it seems only one modem is required now (it used to have a minimum set, but that's fixed it seems). Looks like the repeat program could also be used to merge up to 6 networks into 1.

It doesn't matter whether the signal has to pass through unloaded chunks so long as all the systems involved in sending / receiving it (including repeaters) are in loaded chunks.
and this is the same with cabled networks, the chunks the cables are in do not need to be loaded, only the chunks computers are in need to be loaded.
Bomb Bloke #10
Posted 12 June 2014 - 11:22 PM
To get "repeat" to work in older CC builds, you'd need to also bring over the updated rednet API - if you're on a server, then you'd need to be admin to get it installed in place and working. I suspect it'd be easier to devise your own forwarding script…
theoriginalbit #11
Posted 13 June 2014 - 03:05 AM
To get "repeat" to work in older CC builds, you'd need to also bring over the updated rednet API
why? the only reference that I can see that is at all needed is rednet.CHANNEL_REPEAT which is simply CHANNEL_REPEAT = 65533 … the repeat program does its own message timeouts and such, so as far as I can tell it doesn't need any logic from the 'new' rednet API.
Bomb Bloke #12
Posted 13 June 2014 - 03:49 AM
rednet.send() now transmits everything on that repeat channel, as well as the channel you specify. If you used the old version of the function then the "repeat" script wouldn't detect anything to repeat.

Edit:

That, plus the messages are now encapsulated within tables, from which the rednet API extracts them at the other end. The "repeat" script also expects this structure to be in use.
Edited on 13 June 2014 - 01:53 AM
theoriginalbit #13
Posted 13 June 2014 - 04:11 AM
rednet.send() now transmits everything on that repeat channel, as well as the channel you specify. If you used the old version of the function then the "repeat" script wouldn't detect anything to repeat.
ah of course.

That, plus the messages are now encapsulated within tables, from which the rednet API extracts them at the other end. The "repeat" script also expects this structure to be in use.
well old versions would error with trying to send a table anyway, using the new rednet API won't stop the error, you'd need to edit both to (un)serialise the table.
Bomb Bloke #14
Posted 13 June 2014 - 04:17 AM
Depends how old you're talking - table transmissions aren't new to 1.6, if I'm not mistaken.
Lyqyd #15
Posted 13 June 2014 - 04:56 AM
No, they work fine at least as far back as 1.57, iirc. I can't vouch for version before that.
theoriginalbit #16
Posted 13 June 2014 - 05:01 AM
Depends how old you're talking - table transmissions aren't new to 1.6, if I'm not mistaken.
well of course, but given recent posts on the forums from people there's a high chance that OP still has Tekkit Classic which is all the way back at like 1.33 or something. I do believe Lyqyd is right, I believe it came in when it was ported to MC 1.6.4