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

Need help with Terminal Wireless Rednet Program

Started by Mindlessmage, 02 November 2016 - 02:37 AM
Mindlessmage #1
Posted 02 November 2016 - 03:37 AM
As my understanding is using the wireless commands via rednet or using the modem API the sending machine can issue commands on the receiving machine.

What I'm looking for is a way to make the sending machine be able to:

1. Execute any program on the sending machine and send it to the receiving machine
2. Allow the sending machines script to be visible on the receiving machines monitor if applicable
3. All this sending machine to require a password hidden by asterisks or any symbol defined by a variable to safeguard sending programs to be sent to the receiving machine

What I'm looking for the receiving machine to be able to do:

1. Accept any incoming connection but only display if true if the sending machines password matches
2. Allow the script from the sending machine to be run and executed from the sending machine and not the receiving machine.
3. Possibly for fail safe allow for computer ID check variables as well.

Preffered method of API usage would be the more secure modem API but if it has to be rednet it still fine considering if we could get the password script to run alongside it.

So some example would include:

Say you created a custom scripted game or just a standard program that listed rf/tic or energy storage and you wanted to broadcasted or transmit them wirlessly to a multitude of other computers but not wanting to copy the script to each other computer that is intended to display the information you could just make this one single computer run this "wrapper" command on any "program" to be sent. While the other computers or waiting for the signal to display the program.

I was wondering if this is possible and/or doable it would be nice and would also help out without having to rewrite a bunch of scrips to do all the rednet commands to each print string etc.

So in general it would just wrap any program and project to another computer and run normally.

Most effect use would most likely be able to set up a Big Reactor or Draconic Reactor create your program with all peripherals and see that it runs perfectly but you wanted multiple monitors throughout your base to keep close tabs on the danger levels.

Thanks for any help
Bomb Bloke #2
Posted 02 November 2016 - 06:55 AM
I suppose the short answer is "use nsh".
Mindlessmage #3
Posted 02 November 2016 - 05:49 PM
I have used nsh it but what it does is connects to a central hosting machine to run programs of the main machine. Hence the remote control/vncd functionality of nsh.

It does do the job right but it fails to display concurrent information to adjacent/connected monitors. It does however display all the information running on the Main hosted machine in the terminal but will not display on a monitor.

I do get what your saying though but when the two computers are connect the connecting machine cannot display any information on any connected peripheral related monitor.

Unless their is an option in the configs I can't seem to get it wrapped to an on screen display of the monitors.

Thanks for fast reply
Lyqyd #4
Posted 02 November 2016 - 06:52 PM
You could use the "monitor" program to start the nsh client if you only want to see the other computer's screen on the monitor, or find a mirroring version on the forums, or even write your own. Using the monitor program would be the easiest way to get the output on the monitor.
Mindlessmage #5
Posted 02 November 2016 - 08:23 PM
Well that was almost an eye opener for me thanks for that bit of info but is there a way to get a particular tab that is open to be projected through what you are saying Lyqyd

This is what is running on host machine
nsh host MS as tab 1
program on tab 2
program on tab 3 etc

Then what you are suggesting is do this with the monitor program on the receiving computer
monitor side nsh MS

However when doing that two issues arrive
1 You are unable to type in the password if you use
monitor side nsh MS auth due to the process of monitor stopping
2 it only displays the shell for the nsh host running on the host machine none of the tabs are visible

Unless there are other arguments that can be used when typing in the Monitor commands to insert the pass it will be insecure

I'll also see if I can't find a "mirror" as suggested but would you have any in mind already
KingofGamesYami #6
Posted 03 November 2016 - 12:46 AM
You should be able to type in the password; you just won't be able to see yourself doing it.

Type it into the computer, it should show up on the monitor (not the computer screen) as you type.
Mindlessmage #7
Posted 03 November 2016 - 01:15 AM
Okay that works but am still unable to view the other opened tabs on the host machine one the client machine.

Any way to view all the shells on the Monitor command? Or is there a command to switch the tab or would I have to edit the lua to force a switch?

Thanks for that info didn't realize it was just blanked out from preview
Lupus590 #8
Posted 04 November 2016 - 05:02 PM
vncd may be what you need then: http://www.computercraft.info/forums2/index.php?/topic/17229-vncd-an-nsh-compatible-vnc-server/
Mindlessmage #9
Posted 19 November 2016 - 04:46 AM
Tried that as well from the first post I'm unable to click the "process tabs" on the server machine but I am able to on the host machine. The server machine will not show anything but the firs process none of the other processes show up. Guess I'll have to work on it myself. I even tried a mirror and it didn't seem to work. :unsure:/>
Lupus590 #10
Posted 20 November 2016 - 10:24 PM
Tried that as well from the first post I'm unable to click the "process tabs" on the server machine but I am able to on the host machine. The server machine will not show anything but the firs process none of the other processes show up. Guess I'll have to work on it myself. I even tried a mirror and it didn't seem to work. :unsure:/>

what order where you running your programs? nsh and vncd can't access anything launched before they were.