Jump to content




Check if modem is wireless or wired


3 replies to this topic

#1 resdac

  • Members
  • 6 posts

Posted 10 August 2015 - 09:55 PM

sorry to be here again but i couldn't find an answer elsewere.
im looking for a way to check if the modem conected to the pc is wireless or wired. with the peripheral.getType() you can only see modem
is there a way to check this or must this be filled in manualy?

#2 valithor

  • Members
  • 1,053 posts

Posted 10 August 2015 - 09:56 PM

 resdac, on 10 August 2015 - 09:55 PM, said:

sorry to be here again but i couldn't find an answer elsewere.
im looking for a way to check if the modem conected to the pc is wireless or wired. with the peripheral.getType() you can only see modem
is there a way to check this or must this be filled in manualy?

You could use the isWireless function from the modem api example:
modem = peripheral.wrap(side)
modem.isWireless()

Edited by valithor, 10 August 2015 - 09:57 PM.


#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 10 August 2015 - 10:18 PM

Or you could call it without wrapping:

peripheral.call( "side", "isWireless" )


#4 Anavrins

  • Members
  • 775 posts

Posted 10 August 2015 - 11:36 PM

You can also do this to automatically wrap wired/wireless only.
peripheral.find("modem", function(n, o) return o.isWireless() end)






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users