Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = require("component")
- local f = require("filesystem")
- local shell = require "shell"
- local m = c.modem
- if not m then error("Wireless card required.", 0) end
- local a,o = shell.parse(...)
- if #a < 1 then
- error("syntax: rflash [file] {port}", 0)
- end
- local port = tonumber(a[2]) or 8192
- local mm = f.open(a[1])
- local data = mm:read(4096) --Covers the 4k limit
- mm:close()
- m.broadcast( port, "flash;"..data )
- print("Sent flash packet over port "..tostring(port))
- print("If it succeeded, the device will BEEP.")
Advertisement
Add Comment
Please, Sign In to add comment