This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Communication with Usb
#7
I already changed it, but I still get the error, when I put mountusb ('/ mnt') the status is USB ok but it is not taking the USB.
With this code I also get error, I do not know what else to try.
<code>
function mountusb(part, mnt)
part = part or '/dev/sda1'
mnt = mnt or '/mnt'
local cmd = string.format('mount %q %q 2>&1', part, mnt)
local res, stat = io.readproc(cmd)
return stat == 0 and true or nil, res
end
res, err = mountusb('/dev/sda')
if res then
alert('USB OK')
else
alert('USB error: ' .. tostring(err))
end
</code>
Reply


Messages In This Thread
Communication with Usb - by Shalltear - 21.03.2017, 14:59
RE: Communication with Usb - by admin - 22.03.2017, 06:55
RE: Communication with Usb - by Shalltear - 22.03.2017, 14:31
RE: Communication with Usb - by admin - 23.03.2017, 07:00
RE: Communication with Usb - by Shalltear - 23.03.2017, 17:06
RE: Communication with Usb - by admin - 24.03.2017, 09:01
RE: Communication with Usb - by Shalltear - 24.03.2017, 16:19
RE: Communication with Usb - by Shalltear - 24.03.2017, 17:57
RE: Communication with Usb - by Shalltear - 28.03.2017, 15:07

Forum Jump: