Regards,
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Signal Converter
Started by gngz, 02 January 2013 - 04:29 AMPosted 02 January 2013 - 05:29 AM
Make a way to convert the signal from RP2 Cables to Modem and vice-versa.
Regards,
Regards,
Posted 02 January 2013 - 05:35 AM
That's quite easy to achieve in CC right now. What would be the benefits of this?
Posted 02 January 2013 - 06:06 AM
I don't get the aim?
Posted 02 January 2013 - 07:45 AM
The aim is can make a network with cable a wireless modems. To connect citys to anothers.
Posted 02 January 2013 - 07:56 AM
local cableSide = "left"
local modemSide = "right"
while true do
rednet.open(modemSide)
id, msg = rednet.receive()
rednet.close(modemSide)
rednet.open(cableSide)
rednet.broadcast(msg) -- Can be replaced with rednet.send()
rednet.close(cableSide)
end
I can't guarantee this will work but doing what you want is about as simple as that, no need to add or change anything.Posted 02 January 2013 - 08:04 AM
I can't guarantee this will work but doing what you want is about as simple as that, no need to add or change anything.local cableSide = "left" local modemSide = "right" while true do rednet.open(modemSide) id, msg = rednet.receive() rednet.close(modemSide) rednet.open(cableSide) rednet.broadcast(msg) -- Can be replaced with rednet.send() rednet.close(cableSide) end
I want to connect computers , but computers have to comunicate to another and no broadcast to allnetwork.
Posted 02 January 2013 - 08:24 AM
Replace rednet.broadcast(msg) with rednet.send(99, msg) and change 99 to the receiver's ID:I want to connect computers , but computers have to comunicate to another and no broadcast to allnetwork.
Posted 02 January 2013 - 08:25 AM
Replace rednet.broadcast(msg) with rednet.send(99, msg) and change 99 to the receiver's ID:I want to connect computers , but computers have to comunicate to another and no broadcast to allnetwork.
But have to be compatible with created programs. It have to be hardware.
Posted 02 January 2013 - 08:29 AM
That sounds suspiciously like "I don't want to program it myself".
Posted 02 January 2013 - 08:34 AM
This is so easy to set up but you want the mighty CC devs to add a new peripheral just because you are too lazy?
Posted 02 January 2013 - 08:36 AM
This is so easy to set up but you want the mighty CC devs to add a new peripheral just because you are too lazy?
No, beacause have to be compatible with all programs that uses rednet… Its like a router.
Posted 02 January 2013 - 08:38 AM
You can use a computer with a simple script (like mine) to do that.No, beacause have to be compatible with all programs that uses rednet… Its like a router.This is so easy to set up but you want the mighty CC devs to add a new peripheral just because you are too lazy?
Posted 02 January 2013 - 08:42 AM
You can use a computer with a simple script (like mine) to do that.No, beacause have to be compatible with all programs that uses rednet… Its like a router.This is so easy to set up but you want the mighty CC devs to add a new peripheral just because you are too lazy?
No because it's no compatible. If you use a program in computer in A City and you want to send a message to a computer in City B. (Connected by Modems but your city have only a cable network). You have to send a message to computer converter with message and id to the person of the other city and it's no compatible with current programs .
Posted 02 January 2013 - 08:42 AM
Yeah, rednet relays are pretty easy. Signal converters are something different, but also pretty easy. Making something that does both, pretty easy.
Posted 02 January 2013 - 08:54 AM
P.S: Another use is to make a larger areas with wireless.
If CC team wants, they can make this sugestion by connecting a bundled cable to a modem.
If CC team wants, they can make this sugestion by connecting a bundled cable to a modem.
Posted 02 January 2013 - 08:56 AM
It depends on how your city's network works, using bundled cables means you need to specify where you want the message and my script does not touch the message at all so it would still include the receiver.No because it's no compatible. If you use a program in computer in A City and you want to send a message to a computer in City B. (Connected by Modems but your city have only a cable network). You have to send a message to computer converter with message and id to the person of the other city and it's no compatible with current programs .You can use a computer with a simple script (like mine) to do that.No, beacause have to be compatible with all programs that uses rednet… Its like a router.This is so easy to set up but you want the mighty CC devs to add a new peripheral just because you are too lazy?
Posted 02 January 2013 - 02:13 PM
Wtf are you talking about?It depends on how your city's network works, using bundled cables means you need to specify where you want the message and my script does not touch the message at all so it would still include the receiver.
Also, you can't open and close rednet every time you send a message. They have to stay open.
Rednet supports both bundled cable and wireless modems. In both cases, the sender is always set to the computer that sent the message, and the message is only received by the computer you send it to.
Say computer A is connected to computer B, which is connected to C, which is connected to D.
B and C are relays.
When A wants to send a message to D, it will call rednet.send(ID_of_D, message).
B will not receive the message, since B's ID is not the same as D's ID, so the message cannot be relayed.
However, you could override the rednet API on A and D, so that they send specially formatted messages to the relays, translating:
rednet.send(ID_of_D, message)
into:
rednet.send(ID_of_B, "send "..ID_of_D.." "..message)
so that B will be able to relay the message.
Posted 02 January 2013 - 02:24 PM
Does bundled cable rednet allow you to directly send messages to other computers? Sorry, I wasn't sure about that.Snip
I probably was thinking faster than writing again, I wanted to say "you need to specifiy where you want the message to go" and I thought of something like you explained, maybe I should've explained that further.
I also should have mentioned my term "receiver's ID" is supposed to be the ID of the receiving router.
Posted 02 January 2013 - 06:09 PM
Does bundled cable rednet allow you to directly send messages to other computers? Sorry, I wasn't sure about that.Snip
I probably was thinking faster than writing again, I wanted to say "you need to specifiy where you want the message to go" and I thought of something like you explained, maybe I should've explained that further.
I also should have mentioned my term "receiver's ID" is supposed to be the ID of the receiving router.
Bundled cable rednet acts exactly like wireless rednet, except it's slower… you could also modify it to intercept messages sent directly to other computers, and probably fake sender IDs. So you *could* have a transparent relay with bundled cables, but you'd have to modify rednet, which might not be worth the trouble.
Posted 02 January 2013 - 07:34 PM
You need some calculations to use bundled cable for rednet. It is not easy for "special converter" but easy for Computers.If CC team wants, they can make this sugestion by connecting a bundled cable to a modem.
Program your router yourself or use one of programs from this forum.
Posted 02 January 2013 - 08:00 PM
That's also a problem. Bundled cables are just 16 redstone wires, how would you reasonably connect one directly to a modem?You need some calculations to use bundled cable for rednet. It is not easy for "special converter" but easy for Computers.If CC team wants, they can make this sugestion by connecting a bundled cable to a modem.
Program your router yourself or use one of programs from this forum.
Posted 03 January 2013 - 06:26 AM
Yeah, this isn't going to happen. We may add a wired networking solution in the future, but we would never make a converter - this would be handled by the computers trivialy.