Jump to content




[Rednet][GPS]LeoSat - Remotely controllable turtle satellite OS

wireless networking

  • You cannot reply to this topic
24 replies to this topic

#1 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 23 December 2012 - 11:37 AM

LeoSat is a turtle operating system designed for remotely operated turtles floating at maximum height, serving as rednet nodes and GPS hosts simultaneously.
It includes a login system to prevent unauthorized users from using administrative commands.

List of commands to user over rednet:
  • help: Returns basic info and list of commands (create a file called "help" and write something into it for custom help)
  • ping: Returns PONG by default, returns location if GPS host is enabled
  • pingmap: Returns a serialized table containing id, msg and distance of computers that answered a ping
  • login <password>: Attempts to authenticate
  • logout: Removes the current computer from the list of authenticated IDs
  • up: Sends the turtle up into the sky, only works if there is enough fuel for traveling up and down, requires auth
  • down: Sends the turtle back to the ground, requires auth
  • reboot: Reboots the turtle, requires auth
The GPS host works similar to the built-in one, you can either provide coordinates manually or it will try to get them automatically from other hosts in range. You can also disable the feature manually.

I highly recommend changing the variable 'sPass' (at the top of the code) before starting leosat, otherwise anyone else who knows the default password will be able to hijack your turtle.

Examples:
leosat <x> <y> <z> uses these coordinates for the host
leosat false disables the GPS host and does not attempt to get the coordinates
leosat attempts to get the coordinates from other hosts in range, disables GPS host if unable to determine position

Download:
LeoSat:
pastebin get rjiYpE0r leosat

LeoSat without fuel check (for servers with infinite fuel enabled):
pastebin get YhkxJG4E leosat

Simple rednet console for testing to be executed on another computer:
pastebin get CFwBqJEv rednetconsole

Changelog
v1.4: Added "reboot" command, added automatic creation of startup file if none is found, made height variable
v1.3: Fixed logout crashing the program
v1.2: Made pingmap easier to read, you need a timeout higher than 2 on the client to receive the answer
v1.1: Fixed some minor bugs, apparently the maximum height a turtle can get to is 254 and not 255
v1.0: Initial release

ToDo
  • Add rednet forwarding
  • Create proper client
Feel free to give feedback and please report any bugs you encounter. ;)

Edited by Leo Verto, 06 January 2013 - 12:37 PM.


#2 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 23 December 2012 - 11:46 AM

i made a similar program that integrated into my turtle swarm code
it could scramble gps and share the distances with every turtle in the network allowing you to track any id

you could also update the program in mid air

#3 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 23 December 2012 - 11:57 AM

View PostPixelToast, on 23 December 2012 - 11:46 AM, said:

you could also update the program in mid air
Do you mean allowing it to receive commands on it's way up or down?
I didn't allow that by purpose, it would mess up the GPS server and other turtles using it as reference point would get lost.

#4 Budman17r

  • Members
  • 11 posts

Posted 24 December 2012 - 04:22 AM

Hey Mind if I code along with you? I kinda want the experience.

#5 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 24 December 2012 - 05:28 AM

View PostBudman17r, on 24 December 2012 - 04:22 AM, said:

Hey Mind if I code along with you? I kinda want the experience.
Sorry, what do you mean?

#6 Budman17r

  • Members
  • 11 posts

Posted 24 December 2012 - 06:35 AM

Well I wanted to help with an item. I'll show you in a bit, its rudimentary but will help the GPS function better.

#7 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 24 December 2012 - 06:56 AM

View PostLeo Verto, on 23 December 2012 - 11:57 AM, said:

View PostPixelToast, on 23 December 2012 - 11:46 AM, said:

you could also update the program in mid air
Do you mean allowing it to receive commands on it's way up or down?
I didn't allow that by purpose, it would mess up the GPS server and other turtles using it as reference point would get lost.
it has rcon and ftp

#8 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 24 December 2012 - 08:04 AM

View PostPixelToast, on 24 December 2012 - 06:56 AM, said:

View PostLeo Verto, on 23 December 2012 - 11:57 AM, said:

View PostPixelToast, on 23 December 2012 - 11:46 AM, said:

you could also update the program in mid air
Do you mean allowing it to receive commands on it's way up or down?
I didn't allow that by purpose, it would mess up the GPS server and other turtles using it as reference point would get lost.
it has rcon and ftp
Oh, remote file access?
Maybe I should create a similar system too.

#9 Budman17r

  • Members
  • 11 posts

Posted 24 December 2012 - 10:48 AM

Hey Leo, Like I said I'm new at lua programming so the code sucks

I modified (and giving it to you) the up command added a 4th targ west or east, this makes the 2 west/east go down 3 after reaching the top, gets rid of the ambiguous cords

http://pastebin.com/B6ub2vHL

Let me know if you like it.

It also writes the startup file based on the targs, (and the new north/east/west/south targ (Only added East/west, did not code for north/south.

#10 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 24 December 2012 - 01:27 PM

View PostBudman17r, on 24 December 2012 - 10:48 AM, said:

-snip-
Thanks a lot, I integrated this partly, I'll try to release an updated version soon but I'll remove the y parameter completely and update the OP.

#11 Budman17r

  • Members
  • 11 posts

Posted 24 December 2012 - 07:40 PM

I'm honored. its no problem, I like what you have thus far, pretty damn sweet.

#12 Budman17r

  • Members
  • 11 posts

Posted 25 December 2012 - 07:05 PM

typo in the 1.4 adds an extra " to the else for writing to file

#13 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 26 December 2012 - 10:44 AM

View PostBudman17r, on 25 December 2012 - 07:05 PM, said:

typo in the 1.4 adds an extra " to the else for writing to file
Ok, rewrote most of it, sorry for removing your code but you can now specify the height you want the turtle to get to.
Your idea of automatically writing a startup script is great though. ;)

#14 Budman17r

  • Members
  • 11 posts

Posted 28 December 2012 - 04:26 PM

View PostLeo Verto, on 26 December 2012 - 10:44 AM, said:

View PostBudman17r, on 25 December 2012 - 07:05 PM, said:

typo in the 1.4 adds an extra " to the else for writing to file
Ok, rewrote most of it, sorry for removing your code but you can now specify the height you want the turtle to get to.
Your idea of automatically writing a startup script is great though. ;)

lol its no worries, I like the idea, been using them since I found it =)

You're welcome

#15 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 30 December 2012 - 01:38 PM

Ok, I updated the console, you can send messages to a certain computer only by starting it like this:
rednetconsole <id>
Using it without a parameter will broadcast messages.

Thanks to ChaddJackson12 for helping with the console and providing me a turtle and a computer to test it on Geevancraft. :)

#16 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 06 January 2013 - 12:40 PM

Added a version without fuel check.

I tested this program on Geevancraft and it seems to work great, except for that turtle that decided to shut down at y 254 (I had to tower up and down twice).
The startup file should be automatically created once you send the turtle up into the sky, it will launch leosat with the same parameters you entered before.

#17 D3matt

  • Members
  • 830 posts

Posted 08 January 2013 - 09:42 PM

View PostLeo Verto, on 06 January 2013 - 12:40 PM, said:

Added a version without fuel check.

I tested this program on Geevancraft and it seems to work great, except for that turtle that decided to shut down at y 254 (I had to tower up and down twice).
The startup file should be automatically created once you send the turtle up into the sky, it will launch leosat with the same parameters you entered before.
Doesn't Geevancraft have a super-long rednet range?

Either way, nice program. A simple way to automate a simple process, with a few extra bells and whistles.

#18 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 09 January 2013 - 04:08 AM

View PostD3matt, on 08 January 2013 - 09:42 PM, said:

View PostLeo Verto, on 06 January 2013 - 12:40 PM, said:

I tested this program on Geevancraft and it seems to work great, except for that turtle that decided to shut down at y 254 (I had to tower up and down twice).
The startup file should be automatically created once you send the turtle up into the sky, it will launch leosat with the same parameters you entered before.
Doesn't Geevancraft have a super-long rednet range?
Either way, nice program. A simple way to automate a simple process, with a few extra bells and whistles.
It does have a very huge rednet range and I'm currently working on providing 24/7 global free rednet. Keeping your turtles close to max height also protects them from grievers.

I thought of adding a rednet forward/broadcast command, I might do that soon.

#19 amtra5

  • Members
  • 166 posts
  • LocationMelbourne, Australia

Posted 03 February 2013 - 04:26 PM

Is it not possible to change the co-ods that are transmitted if the turtle is moving, thus not confusing any turtles. This could be done by writing the current coordinates in a file and changed when moving

#20 Leo Verto

  • Members
  • 620 posts
  • LocationOver there

Posted 22 May 2013 - 05:08 PM

I'm currently working on an update for LeoSat allowing you to move around the turtles freely, my next goals are encrypted communication and support for your own networking handlers, so you can use LeoSat as a wrapper for them.

Are there any people still interested in this program?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users