Jump to content




Control redstone over wireless modems!


7 replies to this topic

#1 rahph

  • Members
  • 81 posts

Posted 25 July 2017 - 08:03 PM

Tired of long, boring redstone lines going through all of your worlds?
Want something quick and nice?
Have computercraft?

I present to you

The remote redstone procol!

How does it work?
You set up a "server". It runs the rrp-server program and accepts remote signals.
Then, on clients you install the client. Seems self explanatory. The client can synchronise with up to 15 servers and send them ON / OFF / Simulate button press signals.

How to set it up?
Server:


Download the server software ( Xfbp9Aqx ) and save it. Run it with the argument "regen" to create / rebuild the .rrp file which stores the synchronisation key, channel and header.
Run the server. You need at least 1 modem connected to the server computer. The default redstone output side is back, but you can change it by altering the server file.
IT should look like thisPosted Image


Client:
Download the client software ( wUjM3Pva ) and run it. It should look like this:

Posted Image
Select an option and follow on-screen instructions. To add a server, type in "1". The sync-key is displayed in the server software.


BOTH SIDES NEED TO HAVE AT LEAST 1 MODEM CONNECTED! Server requires at least 21x3 screen.
I hope you enjoy my crappy piece of code and have some use out of it.
Both programs are released to the public domain. Do whatever you want.

Edited by rahph, 25 July 2017 - 09:48 PM.


#2 rahph

  • Members
  • 81 posts

Posted 25 July 2017 - 09:57 PM

The communication protocol has been documented.
https://markdownshar...5a-f8ec6164f152

#3 buzzawak

  • Members
  • 64 posts

Posted 25 July 2017 - 11:08 PM

Hi Rahph, not really sure what your setup does?

The link https://markdownshar...5a-f8ec6164f152 is not working

Does the server receive a redstone signal and passes the level and duration on to the client ?

Edited by buzzawak, 25 July 2017 - 11:10 PM.


#4 The Crazy Phoenix

  • Members
  • 136 posts
  • LocationProbably within 2 metres of my laptop.

Posted 25 July 2017 - 11:14 PM

You may be able to use those sync keys to add a layer of security to your protocol.

For example, if you were to generate a server ID from the sync key (which you'd keep secret), you could then create a single hash of the message, sync key and some sort of timestamp (to prevent someone from retransmitting a previously transmitted message).
Then all the server needs to do is hash the received message with its copy of the sync key and compare it to the received hash to verify that the sender can be trusted.
It may not be as good as one-way key encryption, but it's certainly better than nothing and very easy to implement. There are plenty of SHA-1 implementations on these forums.

Edited by The Crazy Phoenix, 25 July 2017 - 11:14 PM.


#5 rahph

  • Members
  • 81 posts

Posted 26 July 2017 - 06:44 AM

View Postbuzzawak, on 25 July 2017 - 11:08 PM, said:

Hi Rahph, not really sure what your setup does?
The link https://markdownshar...5a-f8ec6164f152 is not working
Does the server receive a redstone signal and passes the level and duration on to the client ?

Weird... The link works for me.

The setup allows the client to control servers redstone output. Example: Lights in my dirt shed are connected to the server and I can turn them on/off from my pocket computer.

View PostThe Crazy Phoenix, on 25 July 2017 - 11:14 PM, said:

You may be able to use those sync keys to add a layer of security to your protocol.
For example, if you were to generate a server ID from the sync key (which you'd keep secret), you could then create a single hash of the message, sync key and some sort of timestamp (to prevent someone from retransmitting a previously transmitted message).
Then all the server needs to do is hash the received message with its copy of the sync key and compare it to the received hash to verify that the sender can be trusted.
It may not be as good as one-way key encryption, but it's certainly better than nothing and very easy to implement. There are plenty of SHA-1 implementations on these forums.

I could do this yes, but I find the current solution secure enough. Also I don't want the protocol to be tricky to implement.

#6 buzzawak

  • Members
  • 64 posts

Posted 26 July 2017 - 09:09 AM

Will it work across chunks ?

#7 rahph

  • Members
  • 81 posts

Posted 26 July 2017 - 09:46 AM

View Postbuzzawak, on 26 July 2017 - 09:09 AM, said:

Will it work across chunks ?

As long as both sides are loaded, yes. It uses the normal modem api.

#8 rahph

  • Members
  • 81 posts

Posted 26 July 2017 - 08:49 PM

Fixed client crashing on adding profiles with 2 or more modems connected at once.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users