Jump to content




[WIP/Beta] Wireless Printing

wireless

26 replies to this topic

#1 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 24 November 2012 - 09:17 PM

Hey there!

I made a little wireless printing program that allows you to print wirelessly through rednet. What's so special about this? Well it hooks into the peripheral API, so it makes a virtual peripheral. What this means is if you use it, you can print from any existing programs which already prints, like "edit", without having to use any special program to print. It is currently in beta and be careful, if two computers try to print at the same time to the same printer, it will stuff up ;)/>.

tl;dr: I made a wireless printing that "hooks" into the peripheral API, so you can print straight from "edit" wirelessly.

Here is the client software:
Syntax: programname <id of printer server> <side to mount your virtual printer to, ex: "left">
Make sure the side you mount your virtual printer to doesn't already have anything mounted on
http://pastebin.com/WQS0qCHi

Here is the server software:
http://pastebin.com/txhHKyDY

Enjoy,
1lann

#2 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 24 November 2012 - 09:34 PM

I love it!

#3 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 25 November 2012 - 05:01 AM

Pretty clever! Good job tricking it into thinking its a printer right next to the computer.

Permission to use this in my Operating System?

#4 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 25 November 2012 - 02:35 PM

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :D/>

#5 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 25 November 2012 - 02:49 PM

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :D/>/>

Of course ill give you credit. You're a genius.

#6 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 25 November 2012 - 04:45 PM

View Postdlcruz129, on 25 November 2012 - 02:49 PM, said:

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :D/>/>/>
Of course ill give you credit. You're a genius.
He is the person that made a fucking Olympic scoreboard in minecraft!

#7 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 25 November 2012 - 04:54 PM

View PostHuman, on 25 November 2012 - 04:45 PM, said:

View Postdlcruz129, on 25 November 2012 - 02:49 PM, said:

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :P/>/>/>/>
Of course ill give you credit. You're a genius.
He is the person that made a fucking Olympic scoreboard in minecraft!

It was funny cause he did that in 5 minutes while bored :D/> (I quote him there)

#8 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 25 November 2012 - 04:57 PM

View PostGravityScore, on 25 November 2012 - 04:54 PM, said:

View PostHuman, on 25 November 2012 - 04:45 PM, said:

View Postdlcruz129, on 25 November 2012 - 02:49 PM, said:

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :lol:/>/>/>/>/>
Of course ill give you credit. You're a genius.
He is the person that made a fucking Olympic scoreboard in minecraft!
It was funny cause he did that in 5 minutes while bored :D/>/> (I quote him there)
And Dan200 still tells everybody about it :P/>

#9 Expenox

  • Members
  • 137 posts
  • LocationIn the depths of my computer.

Posted 25 November 2012 - 06:10 PM

View Postcoolkid38, on 25 November 2012 - 06:04 PM, said:

ima call my dad cuz he gave me the phone he made cuz he makes phones nad ima ask him about printers cuz he make printers so ima asckil mil how to use it with this and thne try to blend it with the blednders he makes
Bad troll leave.

#10 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 25 November 2012 - 06:28 PM

View PostGravityScore, on 25 November 2012 - 04:54 PM, said:

View PostHuman, on 25 November 2012 - 04:45 PM, said:

View Postdlcruz129, on 25 November 2012 - 02:49 PM, said:

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :P/>/>/>/>/>
Of course ill give you credit. You're a genius.
He is the person that made a fucking Olympic scoreboard in minecraft!
It was funny cause he did that in 5 minutes while bored :D/>/> (I quote him there)
I didn't say 5 minutes >:lol:/> I said 30 min.

#11 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 26 November 2012 - 03:46 AM

View Post1lann, on 25 November 2012 - 06:28 PM, said:

View PostGravityScore, on 25 November 2012 - 04:54 PM, said:

View PostHuman, on 25 November 2012 - 04:45 PM, said:

View Postdlcruz129, on 25 November 2012 - 02:49 PM, said:

View Post1lann, on 25 November 2012 - 02:35 PM, said:

View Postdlcruz129, on 25 November 2012 - 05:01 AM, said:

Pretty clever! Good job tricking it into thinking its a printer right next to the computer. Permission to use this in my Operating System?
Sure! Giving credit would be nice but not necessary :P/>/>/>/>/>/>
Of course ill give you credit. You're a genius.
He is the person that made a fucking Olympic scoreboard in minecraft!
It was funny cause he did that in 5 minutes while bored :D/>/>/> (I quote him there)
I didn't say 5 minutes >:lol:/>/> I said 30 min.
Same difference.
This is also my 400th post on the forums.

#12 rick3333

  • Members
  • 30 posts

Posted 23 December 2012 - 12:40 PM

you are a genius to be able to make this in 30 minutes.

#13 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 25 December 2012 - 04:47 AM

One word: superawesomegenius.

#14 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 26 December 2012 - 05:11 AM

This program? Maybe not 30 min XD more probably like 1 hour with all dat debugging.

#15 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 30 December 2012 - 01:51 AM

I've been having issues with this.

I have the host computer set up nicely somewhere else. Seems to work.

I then run "WiPrint 7 left" as I have saved the program as WiPrint, the host is id 7 and I want the printer to be mounted on the left.

I then print. Bam, all computers in the game lock up completely and it becomes impossible to close minecraft without task manager.

#16 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 30 December 2012 - 02:48 AM

View Post6677, on 30 December 2012 - 01:51 AM, said:

I've been having issues with this.

I have the host computer set up nicely somewhere else. Seems to work.

I then run "WiPrint 7 left" as I have saved the program as WiPrint, the host is id 7 and I want the printer to be mounted on the left.

I then print. Bam, all computers in the game lock up completely and it becomes impossible to close minecraft without task manager.
Uhh, that's really strange. My program only tampers with the peripheral api, not the coroutine/os api which would most likely be the cause of this problem. Try updating your forge? Maybe submit a bug report on the forums? Idk what's wrong

#17 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 30 December 2012 - 03:07 AM

you should make it where the server sends a reply to all the connected computers on the network to wait till its done printing before it can take any more requests, or what you can do is make an array where everything is put in there as a que so the printer doesnt gum up

#18 1lann

  • Members
  • 516 posts
  • LocationSeattle

Posted 30 December 2012 - 02:10 PM

View PostCozzimoto, on 30 December 2012 - 03:07 AM, said:

you should make it where the server sends a reply to all the connected computers on the network to wait till its done printing before it can take any more requests, or what you can do is make an array where everything is put in there as a que so the printer doesnt gum up
Yeah I was planning to do that, great idea. I've thought it through before, but I'm worried someone could jam the printer by never doing printer.endPage(), but possibly make it so there is a timeout

#19 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 31 December 2012 - 11:18 AM

As there is a peripheral for adjacent computers, would it be possible to wirelessly control them? As in the commands at the bottom of this page:
http://computercraft...o/wiki/Computer

#20 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 31 December 2012 - 04:09 PM

Spoiler

just make it in the printer if it times out after the last line do a printer.endPage() in the program
or make it where people just send the contents and the printer handles the starting of a page and ending of a page

so you can add in some kind of formatting software to your wireless printer





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users