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

Data Sending with bundled cable.

Started by juget00, 27 April 2012 - 07:51 AM
juget00 #1
Posted 27 April 2012 - 09:51 AM
How-to send data with bundled cable

The reason to create this network was a steal diskette and virus who delete all in my computer (.

We need a bundled cable and computer. Connect it to back sides of computers. And let's analyze algoritm.
The algoritm of sending/reading work on the principle of XON/XOFF but without XOFF.
  1. Wait for start bit.
  2. Read byte over the interval T1 and write to terminal or file.
  3. Wait the end bit, if end input not end bit then do article 2.
This is was a client server work like client but send bit.

Code:
Spoiler

--client
while rs.getBundledInput("back")~=11 do
sleep(0.1)
end

while rs.getBundledInput("back")~=13 do
term.write(string.char(rs.getBundledInput("back")))
sleep(0.1)
end

--server
rs.setBundledOutput("back",11)
sleep(0.05)

line = "Test"

for i=1, string.len(line) do
rs.setBundledOutput("back",string.byte(string.sub(line,i,i)))
sleep(0.1)
end

rs.setBundledOutput("back",13)
sleep(0.1)
rs.setBundledOutput("back",0)

P.S. Sorry for my bad english.
cant_delete_account #2
Posted 28 April 2012 - 12:51 AM
You can hook up two computer with bundled cable and use this code (computer sending the message, much easier):
Spoiler

print("Side of bundled cable: ")
local side = read()
write("n")
print("ID of Computer to send message to: ")
local cID = tonumber(read())
rednet.open(side)
print("Message to send: ")
local msgToSend = read()
rednet.send(cID,msgToSend)

Computer receiving the message:
Spoiler

local sTime = textutils.formatTime(os.time(), false)
local sID, sMsg, sDistance =  rednet.receive()
print("You've got a message! nThe message is: n"..sMsg)
print("This message was received from Computer ID #"..tostring(sID).." from "..sDistance.." blocks away at "..sTime.."!")
juget00 #3
Posted 28 April 2012 - 01:53 AM
No, this is with modem but virus who was destroy my computer over the modem.
MysticT #4
Posted 28 April 2012 - 02:04 AM
rednet works with bundled cable also, so the code thesbros posted will work.
The only way to infect a computer by modem if it is receiving and executing code, wich you shouldn't do without checking if the sender id is secure.
juget00 #5
Posted 28 April 2012 - 02:26 AM
It's be a execute file and i run and …
Leo Verto #6
Posted 28 April 2012 - 09:39 PM
There was rednet before modems were implemented, and it used redpower bundled cables.