These programs are an API for people like me who are annoyed of these noisy wired cable which are ruining designs.

This api simply allow a computer to acces a remote peripheral almost like the built'in peripheral.

Hope you will like it.

How to use:
Peripheral side:
  1. ​Place your periperal
  2. Connect it to a computer (Directly or via wired modem)
  3. On top of this computer place a wireless modem
  4. Download and launch the WirelessPeripheralModem program (pastebin get mSEjs3Xf wlm)
Computer side:
  1. Place your computer
  2. On top of it a wireless modem
  3. Dowload the WirelessPeripheralComputer api (pastebin get MQMMjJHY wlc)
  4. Load it and use it in your programs

Actual methods:

-- the side is the classical side for wired periperal or "mode/side" for wireless ones
-- in this case modem is just the label of the distant computer
-- other args are the same as there peripheral api counterpart

os.loadAPI("wlc")
wlc.getNames([modem])
--return the list of all peripherals connected to this computer

wlc.isPresent(side)
--return true if a peripheral id connectes on side

wlc.getType(side)
--return the type of peripheral connected on side. If no peripheral return nil

wlc.getMethods(side)
--return a list of the names of all methods of the peripheral connected on side. If no peripheral return nil

wlc.call(side,method,...)
--Call the method on the peripheral at side, arguments (...) and return type depend on the method being called. If no peripheral return nil.

wlc.find(type[,fnFilter( name,object)])
--Find an attached peripheral of the given type(formated like the side for wirelless peripheral) and if founds returns tables of functions( like peripheral.find() see the computercraft craft wiki for more informations)

wlc.wrap(side)
--Return a table of functions, allowing you to call peripherals methods sa if the were normal lua function. If no peripheral return nil.


Known differences( Kind of issues):
  • DiskDrive cannot be mounted( I don't think I will ever fix this)
  • Event thrown by peripheral are'nt transmitted ( Working on an event listener to do it)
  • Not Smp antigrief friendly ( If you have any suggestion to protect feel free to propose)
ToDo List:
  • Add an event listener
  • Change function to not use modem and side but just a side composed like "modem.side"
  • Change (or add) actual wirelessPeripheralComputer api to replace actual periperal API ( todo just before make it possible) (Possibly toggleable)
  • Change the actual use of rednet to a more safe solution (Something like a symetric encrypted TCP like connection maybe)
  • Add an other program to grant a computer to act as a peripheral
  • Automaticly detect the wireless modem
  • (Change variables' name)
Download:






[indent=1]Wireless Peripheral Modem[/indent]
[indent=1]pastebin get mSEjs3Xf wlm[/indent]

[indent=1]Wireless Peripheral Computer[/indent]
[indent=1]pastebin get MQMMjJHY wlc[/indent]

Changelog:

Version 1.1:
-No more need of using 2 parameters just do "modem/side"
-Automaticaly detect wireless modem
-Methode can now be used to acces wired peripheral
-The API can now override peripheral API (just uncomment the first line)

Version1.0:
-initial release


PS:I'm having trouble ta add image I suppose related with this being my first post so I will add them later and also no idea how to add spoil so sorry for the length