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?
0
Check if modem is wireless or wired
Started by resdac, Aug 10 2015 09:55 PM
3 replies to this topic
#1
Posted 10 August 2015 - 09:55 PM
#2
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?
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
Posted 10 August 2015 - 10:18 PM
Or you could call it without wrapping:
peripheral.call( "side", "isWireless" )
#4
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