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

wired redent repeter for fireworlf?

Started by mtwiscool, 17 April 2013 - 06:17 AM
mtwiscool #1
Posted 17 April 2013 - 08:17 AM
I'm looking for a way to repeat the wired modem signals because of the 256 block limit due to me building project clean feel.
the idea is for something that repeats a rednet wired signal but works with firewolf

something a bit like this:
Sariaz #2
Posted 17 April 2013 - 08:22 AM
First and this may sound stupid what is firewolf?
mtwiscool #3
Posted 17 April 2013 - 08:23 AM
firewolf is a webbrowser for computercraft:
http://www.computercraft.info/forums2/index.php?/topic/4677-firewolf-website-browser-24-1500-lines-less/page__fromsearch__1
Kingdaro #4
Posted 17 April 2013 - 08:51 AM
All you really have to do is listen for and resend the received signals.


local receiver = peripheral.wrap("left")
local sender = peripheral.wrap("right")
receiver.open(5)
while true do
  local _, side, channel, rep, msg = os.pullEvent("modem_message")
  if side == "right" then
    sender.transmit(channel, rep, msg)
  end
end
Sariaz #5
Posted 17 April 2013 - 08:51 AM
nvm king answered your question
Edited on 17 April 2013 - 06:56 AM
mtwiscool #6
Posted 17 April 2013 - 09:04 AM
firewolf pagers
Kingdaro

code not working sorry
Sammich Lord #7
Posted 17 April 2013 - 09:05 AM
Kingdaro's code sent it one way but not the other way.
mtwiscool #8
Posted 17 April 2013 - 09:09 AM
iv'e tested crossing two repeaters different ways then crossing the connection but that seams still not to work.
Kingdaro #9
Posted 17 April 2013 - 09:37 AM
Is the input modem opened on the right channel?
mtwiscool #10
Posted 17 April 2013 - 09:40 AM
yes it was so it should of worked but firewolf is a bit strange how it uses rednet
Sariaz #11
Posted 17 April 2013 - 09:59 AM
From what I saw on the link you posted i think firewolf was using rednet.send to pass data not channels don't know if this could be a problem haunt worked with channels yet.
Sariaz #12
Posted 17 April 2013 - 11:09 AM
mtwiscool you might want to post something like this on the firewolf forum since the owner should really have a way to extend range anyways imo.
mtwiscool #13
Posted 17 April 2013 - 12:26 PM
I tried but got no reply
Spongy141 #14
Posted 17 April 2013 - 12:44 PM
Have it do something similar to this (I don't use the LAN cables, so please correct me.

if <What ever you do to receive LAN messages> right then
  <have it send in the opposite direction>
end
--Then the same thing, but for the other side...  It would be easier to use giant rednet towers pinging the message.
mtwiscool #15
Posted 18 April 2013 - 03:50 AM
no i have not
as i don't know how firewolf works
Dlcruz129 #16
Posted 18 April 2013 - 03:59 AM
no i have not
as i don't know how firewolf works

Rednet is rednet, no matter which program.
mtwiscool #17
Posted 18 April 2013 - 04:27 AM
i just am trying to find out how to reate the signal as i got a big city and town and villagers on project clean feel
and need to put cable like 7,000 blocks
Spongy141 #18
Posted 18 April 2013 - 06:10 PM
^
Why use cables for the most part? Make a couple of Towers (That are exactly 1 block below the max build height) then have computers receiving messages at the bottom, then have it use a LAN cable to the top of the tower, then have the computer at the top of the tower ping the message out, so it will cover 255 (Or what ever it the max rednet range at max build height), that should be enough room, especially with a couple of towers.
Dlcruz129 #19
Posted 19 April 2013 - 04:06 AM
You can also extend the range of rednet in your config.
BigSHinyToys #20
Posted 19 April 2013 - 06:05 AM
This might work I don't know. If a program broadcasts this will open a port for the returned messages.
I have knocked this up right now and done limited testing so there may me problems.
http://pastebin.com/NddHhCQS

Just run that and two directional message sending on the broadcast frequency will be opened.

[EDIT]
This relies on the fact most network programs broadcast when they startup opening the frequency for the reply messages to be made on. Then opening the frequency for the server to client messages. directly trying to send from one to another will fail as they have no open channel. adding a rednet.broadcast to the top or programs will open the return frequency.
[/EDIT]
mtwiscool #21
Posted 19 April 2013 - 07:29 AM
thank you BigSHinyToys you code works.

it really helps alot.
mtwiscool #22
Posted 19 April 2013 - 07:47 AM
BigSHinyToys code error:
if you use more then 1 repeater it stops working.
BigSHinyToys #23
Posted 19 April 2013 - 08:05 AM
BigSHinyToys code error:
if you use more then 1 repeater it stops working.
When adding to the network you probable need to restart the server and client. I will look into syncing the open list to newly added routers.

[EDIT]
I tested this through 4 routers and it worked for me.
[/EDIT]
mtwiscool #24
Posted 19 April 2013 - 09:08 AM
i tried adding rednet.broadcast line and it gave a error code:
expected <name>
Spongy141 #25
Posted 19 April 2013 - 12:03 PM
Why isn't anyone (Other than Dlcruz) listening to me? JUST USE GIANT REDNET TOWERS. gosh, you don't need to use cables.
mtwiscool #26
Posted 19 April 2013 - 12:43 PM
cables are more realistic

as it home connection for smp not mobile connections
Spongy141 #27
Posted 19 April 2013 - 03:02 PM
^
False, do you get your internet via LAN or Wifi, meaning wireless internet, and last time I check wireless meant no wires…. so no LAN. If you think when you make a world on minecraft and make a LAN server, you are not really making it LAN, but allowing other computers in your own network to join, same with how pocket addition network works. Either way though, the Towers is a better way since you do not need to make a weird program to read them, but have them send data through the bottom receiving computers, to the top computer at the top of the tower, so then it may broadcast a signal. Still you can use LAN, but having those Towers would be the more realistic thing.
mtwiscool #28
Posted 20 April 2013 - 03:18 AM
most isps use cables all the way to the custmers routor
making cable more realitic then wireless
anyway this thred was not about witch one is better but the coding for a wired repeater